desktop/qa/desktop_lib/test_desktop_lib.cxx | 2 include/vcl/ctrl.hxx | 2 include/vcl/implimagetree.hxx | 2 include/vcl/longcurr.hxx | 2 include/vcl/slider.hxx | 2 sal/qa/osl/pipe/osl_Pipe.cxx | 2 sc/inc/externalrefmgr.hxx | 4 - sc/inc/tablink.hxx | 2 sc/qa/unit/filters-test.cxx | 4 - sc/qa/unit/helper/qahelper.cxx | 2 sc/qa/unit/helper/qahelper.hxx | 2 sc/qa/unit/helper/xpath.cxx | 2 sc/qa/unit/helper/xpath.hxx | 2 sc/qa/unit/ucalc_formula.cxx | 2 sc/source/filter/excel/xechart.cxx | 6 - sc/source/filter/excel/xeescher.cxx | 2 sc/source/filter/excel/xelink.cxx | 12 +-- sc/source/filter/excel/xestream.cxx | 4 - sc/source/filter/excel/xestyle.cxx | 4 - sc/source/filter/excel/xetable.cxx | 8 +- sc/source/filter/excel/xichart.cxx | 6 - sc/source/filter/excel/xiescher.cxx | 4 - sc/source/filter/excel/xistream.cxx | 2 sc/source/filter/excel/xlroot.cxx | 4 - sc/source/filter/ftools/ftools.cxx | 8 +- sc/source/filter/inc/condformatbuffer.hxx | 2 sc/source/filter/inc/ftools.hxx | 8 +- sc/source/filter/inc/stylesbuffer.hxx | 2 sc/source/filter/inc/xechart.hxx | 2 sc/source/filter/inc/xestream.hxx | 4 - sc/source/filter/inc/xestyle.hxx | 4 - sc/source/filter/inc/xetable.hxx | 6 - sc/source/filter/inc/xichart.hxx | 8 +- sc/source/filter/inc/xiescher.hxx | 4 - sc/source/filter/inc/xistream.hxx | 2 sc/source/filter/inc/xlroot.hxx | 4 - sc/source/filter/oox/condformatbuffer.cxx | 2 sc/source/filter/oox/stylesbuffer.cxx | 2 sc/source/filter/oox/workbookfragment.cxx | 2 sc/source/filter/xml/xmlexprt.cxx | 2 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx | 4 - sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx | 2 sc/source/ui/app/inputhdl.cxx | 4 - sc/source/ui/dbgui/csvsplits.cxx | 2 sc/source/ui/docshell/externalrefmgr.cxx | 4 - sc/source/ui/docshell/tablink.cxx | 2 sc/source/ui/inc/StatisticsInputOutputDialog.hxx | 4 - sc/source/ui/inc/TableFillingAndNavigationTools.hxx | 2 sc/source/ui/inc/csvsplits.hxx | 2 sc/source/ui/sidebar/CellBorderUpdater.cxx | 2 sc/source/ui/sidebar/CellBorderUpdater.hxx | 2 sc/source/ui/uitest/uiobject.cxx | 6 - sc/source/ui/vba/vbainterior.cxx | 2 sc/source/ui/vba/vbainterior.hxx | 2 sw/source/core/access/accmap.cxx | 8 +- sw/source/core/docnode/observablethread.cxx | 2 sw/source/core/docnode/retrievedinputstreamdata.cxx | 2 sw/source/core/inc/observablethread.hxx | 2 sw/source/core/inc/retrievedinputstreamdata.hxx | 2 sw/source/core/inc/wrong.hxx | 2 sw/source/core/text/wrong.cxx | 2 sw/source/filter/ww8/WW8TableInfo.cxx | 6 - sw/source/filter/ww8/WW8TableInfo.hxx | 6 - sw/source/filter/ww8/attributeoutputbase.hxx | 4 - sw/source/filter/ww8/docxattributeoutput.cxx | 36 +++++----- sw/source/filter/ww8/docxattributeoutput.hxx | 22 +++--- sw/source/filter/ww8/docxexport.cxx | 4 - sw/source/filter/ww8/docxexport.hxx | 4 - sw/source/filter/ww8/wrtww8.cxx | 6 - sw/source/filter/ww8/wrtww8.hxx | 2 sw/source/filter/ww8/wrtww8gr.cxx | 2 sw/source/filter/ww8/ww8attributeoutput.hxx | 2 sw/source/uibase/inc/langhelper.hxx | 4 - sw/source/uibase/shells/langhelper.cxx | 4 - sw/source/uibase/sidebar/ThemePanel.cxx | 2 sw/source/uibase/uitest/uiobject.cxx | 2 vcl/inc/opengl/LineRenderUtils.hxx | 6 - vcl/opengl/LineRenderUtils.cxx | 6 - vcl/qa/cppunit/BitmapTest.cxx | 4 - vcl/source/control/ctrl.cxx | 2 vcl/source/control/longcurr.cxx | 2 vcl/source/control/slider.cxx | 2 vcl/source/filter/jpeg/jpeg.h | 2 vcl/source/filter/jpeg/jpegc.cxx | 2 vcl/source/image/ImplImageTree.cxx | 4 - vcl/unx/kde4/KDESalGraphics.cxx | 8 +- vcl/workben/outdevgrind.cxx | 2 87 files changed, 176 insertions(+), 176 deletions(-)
New commits: commit 90576b93244ea836714cb1b75dff16503a270772 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Jul 19 10:50:07 2016 +0200 clang-tidy performance-unnecessary-value-param in vcl Change-Id: I0b53c4bf5b4619cde357cf4eb432b153b1f7e6b5 diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index c72a0d3..ae3266f 100644 --- a/include/vcl/ctrl.hxx +++ b/include/vcl/ctrl.hxx @@ -72,7 +72,7 @@ protected: if the Control instance has been destroyed in any of the call */ bool ImplCallEventListenersAndHandler( - sal_uLong nEvent, std::function<void()> callHandler + sal_uLong nEvent, std::function<void()> const & callHandler ); /** draws the given text onto the given device diff --git a/include/vcl/implimagetree.hxx b/include/vcl/implimagetree.hxx index 154b56a..95fca46 100644 --- a/include/vcl/implimagetree.hxx +++ b/include/vcl/implimagetree.hxx @@ -104,7 +104,7 @@ private: void loadImageLinks(); - void parseLinkFile(std::shared_ptr<SvStream> stream); + void parseLinkFile(std::shared_ptr<SvStream> const & stream); /// Return name of a real .png according to links.txt. OUString const & getRealImageName(OUString const & name); diff --git a/include/vcl/longcurr.hxx b/include/vcl/longcurr.hxx index 48eca60..7c03c0f 100644 --- a/include/vcl/longcurr.hxx +++ b/include/vcl/longcurr.hxx @@ -30,7 +30,7 @@ class LocaleDataWrapper; class VCL_DLLPUBLIC LongCurrencyFormatter : public FormatterBase { private: - SAL_DLLPRIVATE friend bool ImplLongCurrencyReformat( const OUString&, BigInt, BigInt, sal_uInt16, const LocaleDataWrapper&, OUString&, LongCurrencyFormatter& ); + SAL_DLLPRIVATE friend bool ImplLongCurrencyReformat( const OUString&, BigInt const &, BigInt const &, sal_uInt16, const LocaleDataWrapper&, OUString&, LongCurrencyFormatter& ); SAL_DLLPRIVATE void ImpInit(); protected: diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx index 4f035b1..3112d00 100644 --- a/include/vcl/slider.hxx +++ b/include/vcl/slider.hxx @@ -109,7 +109,7 @@ public: Size CalcWindowSizePixel(); - void SetLinkedField(VclPtr<NumericField> pField); + void SetLinkedField(VclPtr<NumericField> const & pField); void SetSlideHdl( const Link<Slider*,void>& rLink ) { maSlideHdl = rLink; } void SetEndSlideHdl( const Link<Slider*,void>& rLink ) { maEndSlideHdl = rLink; } diff --git a/vcl/inc/opengl/LineRenderUtils.hxx b/vcl/inc/opengl/LineRenderUtils.hxx index 7c9018a..58ae6a8 100644 --- a/vcl/inc/opengl/LineRenderUtils.hxx +++ b/vcl/inc/opengl/LineRenderUtils.hxx @@ -40,9 +40,9 @@ public: void appendAndConnectLinePoint(const glm::vec2& rPoint, const glm::vec2& aNormal, GLfloat aExtrusion); - void appendMiterJoint(glm::vec2 point, glm::vec2 prevLineVector, glm::vec2 nextLineVector); - void appendBevelJoint(glm::vec2 point, glm::vec2 prevLineVector, glm::vec2 nextLineVector); - void appendRoundJoint(glm::vec2 point, glm::vec2 prevLineVector, glm::vec2 nextLineVector); + void appendMiterJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 const & nextLineVector); + void appendBevelJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector); + void appendRoundJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector); void appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2); void appendSquareLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2); }; diff --git a/vcl/opengl/LineRenderUtils.cxx b/vcl/opengl/LineRenderUtils.cxx index 1b7fb99..c815b8a 100644 --- a/vcl/opengl/LineRenderUtils.cxx +++ b/vcl/opengl/LineRenderUtils.cxx @@ -93,7 +93,7 @@ void LineBuilder::appendAndConnectLinePoint(const glm::vec2& rPoint, const glm:: } } -void LineBuilder::appendMiterJoint(glm::vec2 point, glm::vec2 prevLineVector, glm::vec2 nextLineVector) +void LineBuilder::appendMiterJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 const & nextLineVector) { // With miter join we calculate the extrusion vector by adding normals of // previous and next line segment. The vector shows the way but we also @@ -111,7 +111,7 @@ void LineBuilder::appendMiterJoint(glm::vec2 point, glm::vec2 prevLineVector, gl appendAndConnectLinePoint(point, extrusionVector, length); } -void LineBuilder::appendBevelJoint(glm::vec2 point, glm::vec2 prevLineVector, glm::vec2 nextLineVector) +void LineBuilder::appendBevelJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector) { // For bevel join we just add 2 additional vertices and use previous // line segment normal and next line segment normal as extrusion vector. @@ -125,7 +125,7 @@ void LineBuilder::appendBevelJoint(glm::vec2 point, glm::vec2 prevLineVector, gl appendAndConnectLinePoint(point, nextNormal, 1.0f); } -void LineBuilder::appendRoundJoint(glm::vec2 point, glm::vec2 prevLineVector, glm::vec2 nextLineVector) +void LineBuilder::appendRoundJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector) { // For round join we do a similar thing as in bevel, we add more intermediate // vertices and add normals to get extrusion vectors in the between the diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx index d2444b1..6823cfb 100644 --- a/vcl/qa/cppunit/BitmapTest.cxx +++ b/vcl/qa/cppunit/BitmapTest.cxx @@ -165,12 +165,12 @@ void checkAndInsert(CRCHash &rHash, sal_uInt64 nCRC, const char *pLocation) rHash[nCRC] = pLocation; } -void checkAndInsert(CRCHash &rHash, Bitmap rBmp, const char *pLocation) +void checkAndInsert(CRCHash &rHash, Bitmap const & rBmp, const char *pLocation) { checkAndInsert(rHash, rBmp.GetChecksum(), pLocation); } -Bitmap getAsBitmap(VclPtr<OutputDevice> pOut) +Bitmap getAsBitmap(VclPtr<OutputDevice> const & pOut) { return pOut->GetBitmap(Point(), pOut->GetOutputSizePixel()); } diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 13ea3d0..2235cd4 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -311,7 +311,7 @@ void Control::AppendLayoutData( const Control& rSubControl ) const } } -bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, std::function<void()> callHandler ) +bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, std::function<void()> const & callHandler ) { VclPtr<Control> xThis(this); diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 6eb44c5..b928366 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -259,7 +259,7 @@ inline bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue, return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, true ); } -bool ImplLongCurrencyReformat( const OUString& rStr, BigInt nMin, BigInt nMax, +bool ImplLongCurrencyReformat( const OUString& rStr, BigInt const & nMin, BigInt const & nMax, sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, OUString& rOutStr, LongCurrencyFormatter& rFormatter ) diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index 96e3106..a59eb77 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -823,7 +823,7 @@ void Slider::Resize() Invalidate(InvalidateFlags::NoChildren | InvalidateFlags::NoErase); } -void Slider::SetLinkedField(VclPtr<NumericField> pField) +void Slider::SetLinkedField(VclPtr<NumericField> const & pField) { if (mpLinkedField) { diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h index 63c4b2a..08caa47 100644 --- a/vcl/source/filter/jpeg/jpeg.h +++ b/vcl/source/filter/jpeg/jpeg.h @@ -40,7 +40,7 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile); bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, - long nWidth, long nHeight, basegfx::B2DSize aPPI, bool bGreyScale, + long nWidth, long nHeight, basegfx::B2DSize const & aPPI, bool bGreyScale, long nQualityPercent, long aChromaSubsampling, css::uno::Reference<css::task::XStatusIndicator> const & status); diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index ef3c91c..74be061 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -231,7 +231,7 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, } bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, - long nWidth, long nHeight, basegfx::B2DSize aPPI, bool bGreys, + long nWidth, long nHeight, basegfx::B2DSize const & aPPI, bool bGreys, long nQualityPercent, long aChromaSubsampling, css::uno::Reference<css::task::XStatusIndicator> const & status ) { diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index b512dd4..1f7f1ec 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -78,7 +78,7 @@ std::shared_ptr<SvStream> wrapStream(css::uno::Reference< css::io::XInputStream return s; } -void loadImageFromStream(std::shared_ptr<SvStream> xStream, OUString const & rPath, BitmapEx & rBitmap) +void loadImageFromStream(std::shared_ptr<SvStream> const & xStream, OUString const & rPath, BitmapEx & rBitmap) { if (rPath.endsWith(".png")) { @@ -359,7 +359,7 @@ void ImplImageTree::loadImageLinks() } } -void ImplImageTree::parseLinkFile(std::shared_ptr<SvStream> xStream) +void ImplImageTree::parseLinkFile(std::shared_ptr<SvStream> const & xStream) { OString aLine; OUString aLink, aOriginal; diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index c3239ae..0a7066f 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -116,7 +116,7 @@ bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart par /// helper drawing methods namespace { - void draw( QStyle::ControlElement element, QStyleOption* option, QImage* image, QStyle::State state, QRect rect = QRect()) + void draw( QStyle::ControlElement element, QStyleOption* option, QImage* image, QStyle::State const & state, QRect rect = QRect()) { option->state |= state; option->rect = !rect.isNull() ? rect : image->rect(); @@ -125,7 +125,7 @@ namespace QApplication::style()->drawControl(element, option, &painter); } - void draw( QStyle::PrimitiveElement element, QStyleOption* option, QImage* image, QStyle::State state, QRect rect = QRect()) + void draw( QStyle::PrimitiveElement element, QStyleOption* option, QImage* image, QStyle::State const & state, QRect rect = QRect()) { option->state |= state; option->rect = !rect.isNull() ? rect : image->rect(); @@ -134,7 +134,7 @@ namespace QApplication::style()->drawPrimitive(element, option, &painter); } - void draw( QStyle::ComplexControl element, QStyleOptionComplex* option, QImage* image, QStyle::State state ) + void draw( QStyle::ComplexControl element, QStyleOptionComplex* option, QImage* image, QStyle::State const & state ) { option->state |= state; option->rect = image->rect(); @@ -143,7 +143,7 @@ namespace QApplication::style()->drawComplexControl(element, option, &painter); } - void lcl_drawFrame(QStyle::PrimitiveElement element, QImage* image, QStyle::State state) + void lcl_drawFrame(QStyle::PrimitiveElement element, QImage* image, QStyle::State const & state) { #if ( QT_VERSION >= QT_VERSION_CHECK( 4, 5, 0 ) ) QStyleOptionFrameV3 option; diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index e6ff4f4..1b983bc 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -580,7 +580,7 @@ void setupMethodStubs( functor_vector_type& res ) } void grindFunc( OutputDevice& rTarget, - functor_vector_type::const_iterator iter, + functor_vector_type::const_iterator const & iter, sal_Int32 nTurns, const char* pMsg ) { commit 454ab144c9f531a090a38ad23b5f50af85f1fbea Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Jul 19 10:49:54 2016 +0200 clang-tidy performance-unnecessary-value-param in sw Change-Id: I6cd0d28dade01366b087aebff894b6f003d87b31 diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 3f9ddc9..0c10f29 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -114,7 +114,7 @@ public: void clear() { maMap.clear(); } iterator find(const key_type& key) { return maMap.find(key); } std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); } - iterator erase(const_iterator pos) { return maMap.erase(pos); } + iterator erase(const_iterator const & pos) { return maMap.erase(pos); } }; class SwDrawModellListener_Impl : public SfxListener, @@ -261,7 +261,7 @@ public: bool empty() const { return maMap.empty(); } iterator find(const key_type& key) { return maMap.find(key); } std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); } - iterator erase(const_iterator pos) { return maMap.erase(pos); } + iterator erase(const_iterator const & pos) { return maMap.erase(pos); } }; SwAccessibleShapeMap_Impl::~SwAccessibleShapeMap_Impl() @@ -598,7 +598,7 @@ public: iterator end() { return maMap.end(); } iterator find(const key_type& key) { return maMap.find(key); } std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); } - iterator erase(const_iterator pos) { return maMap.erase(pos); } + iterator erase(const_iterator const & pos) { return maMap.erase(pos); } }; struct SwAccessibleParaSelection @@ -638,7 +638,7 @@ public: iterator end() { return maMap.end(); } iterator find(const key_type& key) { return maMap.find(key); } std::pair<iterator,bool> insert(const value_type& value ) { return maMap.insert(value); } - iterator erase(const_iterator pos) { return maMap.erase(pos); } + iterator erase(const_iterator const & pos) { return maMap.erase(pos); } }; // helper class that stores preview data diff --git a/sw/source/core/docnode/observablethread.cxx b/sw/source/core/docnode/observablethread.cxx index dbc72df..479eb2c 100644 --- a/sw/source/core/docnode/observablethread.cxx +++ b/sw/source/core/docnode/observablethread.cxx @@ -34,7 +34,7 @@ ObservableThread::~ObservableThread() { } -void ObservableThread::SetListener( std::weak_ptr< IFinishedThreadListener > pThreadListener, +void ObservableThread::SetListener( std::weak_ptr< IFinishedThreadListener > const & pThreadListener, const oslInterlockedCount nThreadID ) { mpThreadListener = pThreadListener; diff --git a/sw/source/core/docnode/retrievedinputstreamdata.cxx b/sw/source/core/docnode/retrievedinputstreamdata.cxx index f1ddb87..9a46dc9 100644 --- a/sw/source/core/docnode/retrievedinputstreamdata.cxx +++ b/sw/source/core/docnode/retrievedinputstreamdata.cxx @@ -39,7 +39,7 @@ SwRetrievedInputStreamDataManager& SwRetrievedInputStreamDataManager::GetManager } SwRetrievedInputStreamDataManager::tDataKey SwRetrievedInputStreamDataManager::ReserveData( - std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > pThreadConsumer ) + std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > const & pThreadConsumer ) { osl::MutexGuard aGuard(maMutex); diff --git a/sw/source/core/inc/observablethread.hxx b/sw/source/core/inc/observablethread.hxx index 408b256..7a1f461 100644 --- a/sw/source/core/inc/observablethread.hxx +++ b/sw/source/core/inc/observablethread.hxx @@ -43,7 +43,7 @@ class ObservableThread : public osl::Thread, virtual ~ObservableThread(); - void SetListener( std::weak_ptr< IFinishedThreadListener > pThreadListener, + void SetListener( std::weak_ptr< IFinishedThreadListener > const & pThreadListener, const oslInterlockedCount nThreadID ); static inline void * operator new(std::size_t size) diff --git a/sw/source/core/inc/retrievedinputstreamdata.hxx b/sw/source/core/inc/retrievedinputstreamdata.hxx index 1604264..a8f2a02 100644 --- a/sw/source/core/inc/retrievedinputstreamdata.hxx +++ b/sw/source/core/inc/retrievedinputstreamdata.hxx @@ -65,7 +65,7 @@ class SwRetrievedInputStreamDataManager static SwRetrievedInputStreamDataManager& GetManager(); - tDataKey ReserveData( std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > pThreadConsumer ); + tDataKey ReserveData( std::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > const & pThreadConsumer ); void PushData( const tDataKey nDataKey, css::uno::Reference<css::io::XInputStream> const & xInputStream, diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx index 6e3f80e..375de4f 100644 --- a/sw/source/core/inc/wrong.hxx +++ b/sw/source/core/inc/wrong.hxx @@ -187,7 +187,7 @@ class SwWrongList { if( rPos > nStart ) rPos = rPos > nEnd ? rPos - nEnd + nStart : nStart; } void Invalidate_( sal_Int32 nBegin, sal_Int32 nEnd ); - void Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos); + void Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator const & endPos); void Remove( sal_uInt16 nIdx, sal_uInt16 nLen ); SwWrongList& operator= (const SwWrongList &) = delete; diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx index 45a1800..34b12ad 100644 --- a/sw/source/core/text/wrong.cxx +++ b/sw/source/core/text/wrong.cxx @@ -540,7 +540,7 @@ void SwWrongList::InsertSubList( sal_Int32 nNewPos, sal_Int32 nNewLen, sal_uInt1 } // New functions: Necessary because SwWrongList has been changed to use std::vector -void SwWrongList::Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator endPos) +void SwWrongList::Insert(sal_uInt16 nWhere, std::vector<SwWrongArea>::iterator startPos, std::vector<SwWrongArea>::iterator const & endPos) { std::vector<SwWrongArea>::iterator i = maList.begin(); if ( nWhere >= maList.size() ) diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 327d1cf..cc1be4c 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -1443,19 +1443,19 @@ CellInfoMultiSet::const_iterator WW8TableCellGridRow::end() const return m_pCellInfos->end(); } -void WW8TableCellGridRow::setTableBoxVector(TableBoxVectorPtr pTableBoxVector) +void WW8TableCellGridRow::setTableBoxVector(TableBoxVectorPtr const & pTableBoxVector) { if (pTableBoxVector->size() > MAXTABLECELLS) pTableBoxVector->resize(MAXTABLECELLS); m_pTableBoxVector = pTableBoxVector; } -void WW8TableCellGridRow::setWidths(WidthsPtr pWidths) +void WW8TableCellGridRow::setWidths(WidthsPtr const & pWidths) { m_pWidths = pWidths; } -void WW8TableCellGridRow::setRowSpans(RowSpansPtr pRowSpans) +void WW8TableCellGridRow::setRowSpans(RowSpansPtr const & pRowSpans) { m_pRowSpans = pRowSpans; } diff --git a/sw/source/filter/ww8/WW8TableInfo.hxx b/sw/source/filter/ww8/WW8TableInfo.hxx index 10378cc..77e27e8 100644 --- a/sw/source/filter/ww8/WW8TableInfo.hxx +++ b/sw/source/filter/ww8/WW8TableInfo.hxx @@ -246,9 +246,9 @@ public: CellInfoMultiSet::const_iterator begin() const; CellInfoMultiSet::const_iterator end() const; - void setTableBoxVector(TableBoxVectorPtr pTableBoxVector); - void setWidths(WidthsPtr pGridCols); - void setRowSpans(RowSpansPtr pRowSpans); + void setTableBoxVector(TableBoxVectorPtr const & pTableBoxVector); + void setWidths(WidthsPtr const & pGridCols); + void setRowSpans(RowSpansPtr const & pRowSpans); const TableBoxVectorPtr& getTableBoxVector() const { return m_pTableBoxVector;} const WidthsPtr& getWidths() const { return m_pWidths;} diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index d09988f..046ca8d 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -623,8 +623,8 @@ protected: virtual bool AnalyzeURL( const OUString& rUrl, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ); - ww8::GridColsPtr GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); - ww8::WidthsPtr GetColumnWidths( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + ww8::GridColsPtr GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ); + ww8::WidthsPtr GetColumnWidths( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ); public: AttributeOutputBase() {} diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 84b6c74..e77e164 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -712,7 +712,7 @@ void DocxAttributeOutput::EndSdtBlock() #define MAX_CELL_IN_WORD 62 -void DocxAttributeOutput::SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t pInner, sal_Int32 nCell, sal_uInt32 nRow) +void DocxAttributeOutput::SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow) { sal_Int32 nOpenCell = lastOpenCell.back(); if (nOpenCell != -1 && nOpenCell != nCell && nOpenCell < MAX_CELL_IN_WORD) @@ -733,7 +733,7 @@ void DocxAttributeOutput::SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_ } } -void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph ) +void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, bool bForceEmptyParagraph ) { if ( pInner.get() ) { @@ -1921,7 +1921,7 @@ boost::optional<sal_Int32> lclGetElementIdForName(const OUString& rName) return boost::optional<sal_Int32>(); } -void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<css::beans::PropertyValue>& rElements, sax_fastparser::FSHelperPtr pSerializer) +void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<css::beans::PropertyValue>& rElements, sax_fastparser::FSHelperPtr const & pSerializer) { css::uno::Sequence<css::beans::PropertyValue> aAttributes; FastAttributeList* pAttributes = FastSerializerHelper::createAttrList(); @@ -2122,7 +2122,7 @@ void DocxAttributeOutput::FootnoteEndnoteRefTag() 1, meaning that it skips one character after the text. This is to make the switch in DocxAttributeOutput::RunText() nicer ;-) */ -static bool impl_WriteRunText( FSHelperPtr pSerializer, sal_Int32 nTextToken, +static bool impl_WriteRunText( FSHelperPtr const & pSerializer, sal_Int32 nTextToken, const sal_Unicode* &rBegin, const sal_Unicode* pEnd, bool bMove = true ) { const sal_Unicode *pBegin = rBegin; @@ -2604,7 +2604,7 @@ void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle ) m_pSerializer->singleElementNS( XML_w, XML_pStyle, FSNS( XML_w, XML_val ), aStyleId.getStr(), FSEND ); } -static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist, +static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist, bool bWriteShadow = false, const table::BorderLine2* rStyleProps = nullptr ) { // Compute val attribute value @@ -2777,7 +2777,7 @@ static bool boxHasLineLargerThan31(const SvxBoxItem& rBox) ); } -static void impl_borders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, const OutputBorderOptions& rOptions, PageMargins* pageMargins, +static void impl_borders( FSHelperPtr const & pSerializer, const SvxBoxItem& rBox, const OutputBorderOptions& rOptions, PageMargins* pageMargins, std::map<SvxBoxItemLine, css::table::BorderLine2> &rTableStyleConf ) { static const SvxBoxItemLine aBorders[] = @@ -2901,7 +2901,7 @@ static void impl_borders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, const } } -static void impl_cellMargins( FSHelperPtr pSerializer, const SvxBoxItem& rBox, sal_Int32 tag, bool bUseStartEnd = false, const SvxBoxItem* pDefaultMargins = nullptr) +static void impl_cellMargins( FSHelperPtr const & pSerializer, const SvxBoxItem& rBox, sal_Int32 tag, bool bUseStartEnd = false, const SvxBoxItem* pDefaultMargins = nullptr) { static const SvxBoxItemLine aBorders[] = { @@ -2951,7 +2951,7 @@ static void impl_cellMargins( FSHelperPtr pSerializer, const SvxBoxItem& rBox, s } } -void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) +void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) { m_pSerializer->startElementNS( XML_w, XML_tcPr, FSEND ); @@ -3032,7 +3032,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point m_pSerializer->endElementNS( XML_w, XML_tcPr ); } -void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ) { const SwTable* pTable = pTableTextNodeInfoInner->getTable(); if (m_xTableWrt && pTable == m_xTableWrt->GetTable()) @@ -3054,7 +3054,7 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t m_xTableWrt.reset(new SwWriteTable(pTable, pTable->GetTabLines(), nPageSize, nTableSz, false)); } -void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ) { // In case any paragraph SDT's are open, close them here. EndParaSdtBlock(); @@ -3092,7 +3092,7 @@ void DocxAttributeOutput::EndTable() m_aTableStyleConf.clear(); } -void DocxAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +void DocxAttributeOutput::StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ) { m_pSerializer->startElementNS( XML_w, XML_tr, FSEND ); @@ -3134,7 +3134,7 @@ void DocxAttributeOutput::EndTableRow( ) lastClosedCell.back() = -1; } -void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) +void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ) { lastOpenCell.back() = nCell; @@ -3148,7 +3148,7 @@ void DocxAttributeOutput::StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t m_tableReference->m_bTableCellOpen = true; } -void DocxAttributeOutput::EndTableCell(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/, sal_uInt32 nCell, sal_uInt32 /*nRow*/) +void DocxAttributeOutput::EndTableCell(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ const &, sal_uInt32 nCell, sal_uInt32 /*nRow*/) { lastClosedCell.back() = nCell; lastOpenCell.back() = -1; @@ -3479,7 +3479,7 @@ void DocxAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Point } } -void DocxAttributeOutput::TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +void DocxAttributeOutput::TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwFrameFormat * pFrameFormat = pTabBox->GetFrameFormat(); @@ -5363,7 +5363,7 @@ void DocxAttributeOutput::EndStyleProperties( bool bParProp ) namespace { -void lcl_OutlineLevel(sax_fastparser::FSHelperPtr pSerializer, sal_uInt16 nLevel) +void lcl_OutlineLevel(sax_fastparser::FSHelperPtr const & pSerializer, sal_uInt16 nLevel) { if (nLevel >= WW8ListManager::nMaxLevel) nLevel = WW8ListManager::nMaxLevel - 1; @@ -6927,7 +6927,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) } -void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, +void DocxAttributeOutput::WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr const & fs, int tag, const SwEndNoteInfo& info, int listtag ) { fs->startElementNS( XML_w, tag, FSEND ); @@ -7081,7 +7081,7 @@ void DocxAttributeOutput::ParaWidows( const SvxWidowsItem& rWidows ) m_pSerializer->singleElementNS( XML_w, XML_widowControl, FSNS( XML_w, XML_val ), "false", FSEND ); } -static void impl_WriteTabElement( FSHelperPtr pSerializer, +static void impl_WriteTabElement( FSHelperPtr const & pSerializer, const SvxTabStop& rTab, long /* nCurrentLeft */ ) { FastAttributeList *pTabElementAttrList = FastSerializerHelper::createAttrList(); @@ -8508,7 +8508,7 @@ DocxExport& DocxAttributeOutput::GetExport() return m_rExport; } -void DocxAttributeOutput::SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer ) +void DocxAttributeOutput::SetSerializer( ::sax_fastparser::FSHelperPtr const & pSerializer ) { m_pSerializer = pSerializer; m_pTableStyleExport->SetSerializer(pSerializer); diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 6c17e76..392f331 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -230,7 +230,7 @@ public: virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override; virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override; virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override; - void TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + void TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ); virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override; virtual void TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override; virtual void TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override; @@ -419,19 +419,19 @@ private: /// checks whether the current component is a diagram static bool IsDiagram (const SdrObject* sdrObject); - void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); - void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); - void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); - void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ); - void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ); - void EndTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ); + void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ); + void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ); + void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ); + void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ); + void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ); + void EndTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow ); void EndTableRow( ); void EndTable(); - void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t pInner, sal_Int32 nCell, sal_uInt32 nRow); + void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow); void PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize); static bool TextBoxIsFramePr(const SwFrameFormat& rFrameFormat); /// End cell, row, and even the entire table if necessary. - void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false ); + void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, bool bForceEmptyParagraph = false ); void WriteFFData( const FieldInfos& rInfos ); void WritePendingPlaceholder(); @@ -950,7 +950,7 @@ public: const DocxExport& GetExport() const { return const_cast< DocxAttributeOutput* >( this )->GetExport(); } /// For e.g. the output of the styles, we need to switch the serializer to another one. - void SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer ); + void SetSerializer( ::sax_fastparser::FSHelperPtr const & pSerializer ); /// Occasionally need to use this serializer from the outside const ::sax_fastparser::FSHelperPtr& GetSerializer( ) { return m_pSerializer; } @@ -965,7 +965,7 @@ public: void FootnotesEndnotes( bool bFootnotes ); /// writes the footnotePr/endnotePr (depending on tag) section - static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info, int listtag ); + static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr const & fs, int tag, const SwEndNoteInfo& info, int listtag ); bool HasPostitFields() const; void WritePostitFields(); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 408cb62..89deee4 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -351,7 +351,7 @@ void DocxExport::DoFormText(const SwInputField* /*pField*/) OSL_TRACE( "TODO DocxExport::ForFormText()" ); } -OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr m_pSerializer ) +OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr const & m_pSerializer ) { OUString aFileName = "charts/chart" + OUString::number(nCount) + ".xml"; OUString sId = m_pFilter->addRelation( m_pSerializer->getOutputStream(), @@ -1428,7 +1428,7 @@ void DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTy } } -void DocxExport::SetFS( ::sax_fastparser::FSHelperPtr pFS ) +void DocxExport::SetFS( ::sax_fastparser::FSHelperPtr const & pFS ) { mpFS = pFS; } diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 047b497..5ae1b39 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -169,7 +169,7 @@ public: virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) override; /// Returns the relationd id - OString OutputChart( css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr m_pSerializer ); + OString OutputChart( css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr const & m_pSerializer ); OString WriteOLEObject(SwOLEObj& rObject, OUString & io_rProgID); /// Writes the shape using drawingML syntax. @@ -270,7 +270,7 @@ public: const ::sax_fastparser::FSHelperPtr& GetFS() { return mpFS; } - void SetFS(::sax_fastparser::FSHelperPtr mpFS); + void SetFS(::sax_fastparser::FSHelperPtr const & mpFS); private: DocxExport( const DocxExport& ) = delete; diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index e7753fd..5f098b2 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2379,12 +2379,12 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t } } -ww8::GridColsPtr AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +ww8::GridColsPtr AttributeOutputBase::GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ) { return pTableTextNodeInfoInner->getGridColsOfRow(*this); } -ww8::WidthsPtr AttributeOutputBase::GetColumnWidths( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) +ww8::WidthsPtr AttributeOutputBase::GetColumnWidths( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ) { // Get the column widths based on ALL the rows, not just the current row return pTableTextNodeInfoInner->getGridColsOfRow(*this, true); @@ -2494,7 +2494,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe } void WW8AttributeOutput::TableCellBorders( - ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) + ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ) { const SwTableBox * pTabBox = pTableTextNodeInfoInner->getTableBox(); const SwTableLine * pTabLine = pTabBox->GetUpper(); diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 6ddbad9..c677217 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -1028,7 +1028,7 @@ public: void StartCommentOutput( const OUString& rName ); void EndCommentOutput( const OUString& rName ); void OutGrf(const ww8::Frame &rFrame); - bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> xOleStg, + bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const & xOleStg, tools::SvRef<SotStorage> xObjStg, OUString &rStorageName, SwOLENode *pOLENd); virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nAktPos, sal_Int32 nLen ) override; diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index e8b9aa0..e43e099 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -90,7 +90,7 @@ void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ ) } bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, - tools::SvRef<SotStorage> xOleStg, tools::SvRef<SotStorage> xObjStg, OUString &rStorageName, + tools::SvRef<SotStorage> const & xOleStg, tools::SvRef<SotStorage> xObjStg, OUString &rStorageName, SwOLENode *pOLENd) { bool bGraphicNeeded = false; diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx index 68216d2..9404b6f 100644 --- a/sw/source/filter/ww8/ww8attributeoutput.hxx +++ b/sw/source/filter/ww8/ww8attributeoutput.hxx @@ -482,7 +482,7 @@ protected: void OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal ); void TableCellBorders( - ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); + ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner ); }; diff --git a/sw/source/uibase/inc/langhelper.hxx b/sw/source/uibase/inc/langhelper.hxx index 27812ad..dd572c7 100644 --- a/sw/source/uibase/inc/langhelper.hxx +++ b/sw/source/uibase/inc/langhelper.hxx @@ -48,10 +48,10 @@ namespace SwLangHelper extern OUString GetTextForLanguageGuessing(EditEngine* rEditEngine, const ESelection& rDocSelection); extern OUString GetTextForLanguageGuessing(SwWrtShell &rSh); - extern LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId ); + extern LanguageType GetLanguage( SfxItemSet const & aSet, sal_uInt16 nLangWhichId ); extern LanguageType GetLanguage( SwWrtShell &rSh, sal_uInt16 nLangWhichId ); - extern LanguageType GetCurrentLanguage( SfxItemSet aSet, SvtScriptType nScriptType ); + extern LanguageType GetCurrentLanguage( SfxItemSet const & aSet, SvtScriptType nScriptType ); extern LanguageType GetCurrentLanguage( SwWrtShell &rSh ); } diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 2a328ab..a8a7f8f 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -411,7 +411,7 @@ namespace SwLangHelper return GetLanguage(aSet,nLangWhichId); } - LanguageType GetLanguage( SfxItemSet aSet, sal_uInt16 nLangWhichId ) + LanguageType GetLanguage( SfxItemSet const & aSet, sal_uInt16 nLangWhichId ) { LanguageType nLang = LANGUAGE_SYSTEM; @@ -490,7 +490,7 @@ namespace SwLangHelper /// 'In use' means the language(s) matching the script type(s) of the /// selected text. Or in other words, the language a spell checker would use. /// If there is more than one language LANGUAGE_DONTKNOW will be returned. - LanguageType GetCurrentLanguage( SfxItemSet aSet, SvtScriptType nScriptType ) + LanguageType GetCurrentLanguage( SfxItemSet const & aSet, SvtScriptType nScriptType ) { //set language attribute to use according to the script type sal_uInt16 nLangWhichId = 0; diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx index 32a0f60..7b63c82 100644 --- a/sw/source/uibase/sidebar/ThemePanel.cxx +++ b/sw/source/uibase/sidebar/ThemePanel.cxx @@ -115,7 +115,7 @@ public: : maStyles() {} - void add(StyleRedefinition aRedefinition) + void add(StyleRedefinition const & aRedefinition) { maStyles.push_back(aRedefinition); } diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx index 8759705..bf63074 100644 --- a/sw/source/uibase/uitest/uiobject.cxx +++ b/sw/source/uibase/uitest/uiobject.cxx @@ -20,7 +20,7 @@ SwEditWinUIObject::SwEditWinUIObject(VclPtr<SwEditWin> xEditWin): namespace { -SwWrtShell& getWrtShell(VclPtr<SwEditWin> xEditWin) +SwWrtShell& getWrtShell(VclPtr<SwEditWin> const & xEditWin) { return xEditWin->GetView().GetWrtShell(); } commit 58806ee799072776e04d49d95dcba525575f9ce7 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Jul 19 10:49:48 2016 +0200 clang-tidy performance-unnecessary-value-param in sc Change-Id: I1941c050a385e3a1020c5d2495471f5805c4c180 diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index b9d1394..cb1a0d8 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -153,7 +153,7 @@ public: * false _only when_ adding a range of cell * values, for performance reasons. */ - SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uLong nFmtIndex = 0, bool bSetCacheRange = true); + SC_DLLPUBLIC void setCell(SCCOL nCol, SCROW nRow, TokenRef const & pToken, sal_uLong nFmtIndex = 0, bool bSetCacheRange = true); SC_DLLPUBLIC TokenRef getCell(SCCOL nCol, SCROW nRow, sal_uInt32* pnFmtIndex = nullptr) const; bool hasRow( SCROW nRow ) const; /** Set/clear referenced status flag only if current status is not @@ -237,7 +237,7 @@ public: void setRangeName(sal_uInt16 nFileId, const OUString& rName); void setCellData(sal_uInt16 nFileId, const OUString& rTabName, - SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uLong nFmtIndex); + SCCOL nCol, SCROW nRow, TokenRef const & pToken, sal_uLong nFmtIndex); struct SingleRangeData { diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx index f50ad00..31f005b 100644 --- a/sc/inc/tablink.hxx +++ b/sc/inc/tablink.hxx @@ -95,7 +95,7 @@ public: /** Create SfxMedium for stream read with SfxFilter and filter options set at the medium's SfxItemSet. */ - static SfxMedium* CreateMedium( const OUString& rFileName, std::shared_ptr<const SfxFilter> pFilter, const OUString& rOptions ); + static SfxMedium* CreateMedium( const OUString& rFileName, std::shared_ptr<const SfxFilter> const & pFilter, const OUString& rOptions ); static OUString GetOptions( SfxMedium& rMedium ); diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx index a8a6d7f..f383c68 100644 --- a/sc/qa/unit/filters-test.cxx +++ b/sc/qa/unit/filters-test.cxx @@ -82,7 +82,7 @@ public: void testEnhancedProtectionXLSX(); void testSortWithSharedFormulasODS(); void testSortWithSheetExternalReferencesODS(); - void testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef xDocShRef, SCROW nRow1, SCROW nRow2, + void testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef const & xDocShRef, SCROW nRow1, SCROW nRow2, bool bCheckRelativeInSheet ); CPPUNIT_TEST_SUITE(ScFiltersTest); @@ -700,7 +700,7 @@ void ScFiltersTest::testSortWithSheetExternalReferencesODS() xDocSh->DoClose(); } -void ScFiltersTest::testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef xDocSh, SCROW nRow1, SCROW nRow2, +void ScFiltersTest::testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef const & xDocSh, SCROW nRow1, SCROW nRow2, bool bCheckRelativeInSheet ) { ScDocument& rDoc = xDocSh->GetDocument(); diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx index ac61dc2..e3493a1 100644 --- a/sc/qa/unit/helper/qahelper.cxx +++ b/sc/qa/unit/helper/qahelper.cxx @@ -747,7 +747,7 @@ std::string to_std_string(const OUString& rStr) } -void checkFormula(ScDocument& rDoc, const ScAddress& rPos, const char* expected, const char* msg, CppUnit::SourceLine sourceLine) +void checkFormula(ScDocument& rDoc, const ScAddress& rPos, const char* expected, const char* msg, CppUnit::SourceLine const & sourceLine) { ScTokenArray* pCode = getTokens(rDoc, rPos); if (!pCode) diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index 9929c6c..dc4afd1 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -249,7 +249,7 @@ public: CPPUNIT_ASSERT_EQUAL( static_cast<type>(expected), static_cast<type>(result) ); SCQAHELPER_DLLPUBLIC void checkFormula(ScDocument& rDoc, const ScAddress& rPos, - const char* expected, const char* msg, CppUnit::SourceLine sourceLine); + const char* expected, const char* msg, CppUnit::SourceLine const & sourceLine); #define ASSERT_FORMULA_EQUAL(doc, pos, expected, msg) \ checkFormula(doc, pos, expected, msg, CPPUNIT_SOURCELINE()) diff --git a/sc/qa/unit/helper/xpath.cxx b/sc/qa/unit/helper/xpath.cxx index 2117b74..2d047b6 100644 --- a/sc/qa/unit/helper/xpath.cxx +++ b/sc/qa/unit/helper/xpath.cxx @@ -25,7 +25,7 @@ xmlDocPtr XPathHelper::parseExport(ScDocShell& rShell, uno::Reference<lang::XMul return parseExport(pTempFile, xSFactory, rFile); } -xmlDocPtr XPathHelper::parseExport(std::shared_ptr<utl::TempFile> pTempFile, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile) +xmlDocPtr XPathHelper::parseExport(std::shared_ptr<utl::TempFile> const & pTempFile, uno::Reference<lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile) { // Read the XML stream we're interested in. uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(xSFactory), pTempFile->GetURL()); diff --git a/sc/qa/unit/helper/xpath.hxx b/sc/qa/unit/helper/xpath.hxx index 91a81e1..86d1d27 100644 --- a/sc/qa/unit/helper/xpath.hxx +++ b/sc/qa/unit/helper/xpath.hxx @@ -53,7 +53,7 @@ namespace XPathHelper * Should be used when the same exported file is used for testing different files in * the same zip file. */ - SCQAHELPER_DLLPUBLIC xmlDocPtr parseExport(std::shared_ptr<utl::TempFile> pTempFile, uno::Reference< lang::XMultiServiceFactory> const & xSFactory, + SCQAHELPER_DLLPUBLIC xmlDocPtr parseExport(std::shared_ptr<utl::TempFile> const & pTempFile, uno::Reference< lang::XMultiServiceFactory> const & xSFactory, const OUString& rFile); } diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx index 14b2929..25f42b8 100644 --- a/sc/qa/unit/ucalc_formula.cxx +++ b/sc/qa/unit/ucalc_formula.cxx @@ -7054,7 +7054,7 @@ public: {} void operator() ( SCCOL nColumn, const OUString& rFormula, - std::function<double(SCROW )> lExpected ) const + std::function<double(SCROW )> const & lExpected ) const { ScDocument aClipDoc(SCDOCMODE_CLIP); ScMarkData aMark; diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index d6eee66..c286010 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -126,7 +126,7 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclChRectangle& rRect ) return rStrm << rRect.mnX << rRect.mnY << rRect.mnWidth << rRect.mnHeight; } -inline void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef xRec ) +inline void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef const & xRec ) { if( xRec ) xRec->Save( rStrm ); @@ -134,7 +134,7 @@ inline void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef xRec ) /** Saves the passed record (group) together with a leading value record. */ template< typename Type > -void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef xRec, sal_uInt16 nRecId, Type nValue ) +void lclSaveRecord( XclExpStream& rStrm, XclExpRecordRef const & xRec, sal_uInt16 nRecId, Type nValue ) { if( xRec ) { @@ -3391,7 +3391,7 @@ void XclExpChChart::RemoveLastSeries() maSeries.RemoveRecord( maSeries.GetSize() - 1 ); } -void XclExpChChart::SetDataLabel( XclExpChTextRef xText ) +void XclExpChChart::SetDataLabel( XclExpChTextRef const & xText ) { if( xText ) maLabels.AppendRecord( xText ); diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index 47334e47..b9bb3ad 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -136,7 +136,7 @@ const char *ToVertAlign( SdrTextVertAdjust eAdjust ) } } -void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr rComments, Rectangle &aRect ) +void lcl_WriteAnchorVertex( sax_fastparser::FSHelperPtr const & rComments, Rectangle &aRect ) { rComments->startElement( FSNS( XML_xdr, XML_col ), FSEND ); rComments->writeEscaped( OUString::number( aRect.Left() ) ); diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index 4b91c2a..54ae551 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -314,7 +314,7 @@ public: sal_uInt16 GetTabCount() const; /** Inserts a new sheet name into the SUPBOOK and returns the SUPBOOK internal sheet index. */ - sal_uInt16 InsertTabName( const OUString& rTabName, ScExternalRefCache::TableTypeRef xCacheTable ); + sal_uInt16 InsertTabName( const OUString& rTabName, ScExternalRefCache::TableTypeRef const & xCacheTable ); /** Finds or inserts an EXTERNNAME record for add-ins. @return The 1-based EXTERNNAME record index; or 0, if the record list is full. */ sal_uInt16 InsertAddIn( const OUString& rName ); @@ -468,7 +468,7 @@ private: /** Appends a new SUPBOOK to the list. @return The list index of the SUPBOOK record. */ - sal_uInt16 Append( XclExpSupbookRef xSupbook ); + sal_uInt16 Append( XclExpSupbookRef const & xSupbook ); private: XclExpSupbookList maSupbookList; /// List of all SUPBOOK records. @@ -582,7 +582,7 @@ private: sal_uInt16 GetExtSheetCount() const; /** Appends an internal EXTERNSHEET record and returns the one-based index. */ - sal_uInt16 AppendInternal( XclExpExtSheetRef xExtSheet ); + sal_uInt16 AppendInternal( XclExpExtSheetRef const & xExtSheet ); /** Creates all EXTERNSHEET records for internal sheets on first call. */ void CreateInternal(); @@ -1614,7 +1614,7 @@ sal_uInt16 XclExpSupbook::GetTabCount() const return ulimit_cast<sal_uInt16>(maXctList.GetSize()); } -sal_uInt16 XclExpSupbook::InsertTabName( const OUString& rTabName, ScExternalRefCache::TableTypeRef xCacheTable ) +sal_uInt16 XclExpSupbook::InsertTabName( const OUString& rTabName, ScExternalRefCache::TableTypeRef const & xCacheTable ) { OSL_ENSURE( meType == EXC_SBTYPE_EXTERN, "XclExpSupbook::InsertTabName - don't insert sheet names here" ); sal_uInt16 nSBTab = ulimit_cast< sal_uInt16 >( maXctList.GetSize() ); @@ -2160,7 +2160,7 @@ bool XclExpSupbookBuffer::GetSupbookDde( XclExpSupbookRef& rxSupbook, return false; } -sal_uInt16 XclExpSupbookBuffer::Append( XclExpSupbookRef xSupbook ) +sal_uInt16 XclExpSupbookBuffer::Append( XclExpSupbookRef const & xSupbook ) { maSupbookList.AppendRecord( xSupbook ); return ulimit_cast< sal_uInt16 >( maSupbookList.GetSize() - 1 ); @@ -2282,7 +2282,7 @@ sal_uInt16 XclExpLinkManagerImpl5::GetExtSheetCount() const return static_cast< sal_uInt16 >( maExtSheetList.GetSize() ); } -sal_uInt16 XclExpLinkManagerImpl5::AppendInternal( XclExpExtSheetRef xExtSheet ) +sal_uInt16 XclExpLinkManagerImpl5::AppendInternal( XclExpExtSheetRef const & xExtSheet ) { if( GetExtSheetCount() < 0x7FFF ) { diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 99117a8..933227a 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -341,7 +341,7 @@ void XclExpStream::WriteCharBuffer( const ScfUInt8Vec& rBuffer ) Write( &rBuffer[ 0 ], rBuffer.size() ); } -void XclExpStream::SetEncrypter( XclExpEncrypterRef xEncrypter ) +void XclExpStream::SetEncrypter( XclExpEncrypterRef const & xEncrypter ) { mxEncrypter = xEncrypter; } @@ -942,7 +942,7 @@ sax_fastparser::FSHelperPtr& XclExpXmlStream::GetCurrentStream() return maStreams.top(); } -void XclExpXmlStream::PushStream( sax_fastparser::FSHelperPtr aStream ) +void XclExpXmlStream::PushStream( sax_fastparser::FSHelperPtr const & aStream ) { maStreams.push( aStream ); } diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 9ad0988..a301abd 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2847,7 +2847,7 @@ void XclExpXFBuffer::InsertUserStyles() InsertStyleXF( *pStyleSheet ); } -sal_uInt32 XclExpXFBuffer::AppendBuiltInXF( XclExpXFRef xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel ) +sal_uInt32 XclExpXFBuffer::AppendBuiltInXF( XclExpXFRef const & xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel ) { sal_uInt32 nXFId = static_cast< sal_uInt32 >( maXFList.GetSize() ); maXFList.AppendRecord( xXF ); @@ -2858,7 +2858,7 @@ sal_uInt32 XclExpXFBuffer::AppendBuiltInXF( XclExpXFRef xXF, sal_uInt8 nStyleId, return nXFId; } -sal_uInt32 XclExpXFBuffer::AppendBuiltInXFWithStyle( XclExpXFRef xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel ) +sal_uInt32 XclExpXFBuffer::AppendBuiltInXFWithStyle( XclExpXFRef const & xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel ) { sal_uInt32 nXFId = AppendBuiltInXF( xXF, nStyleId, nLevel ); maStyleList.AppendNewRecord( new XclExpStyle( nXFId, nStyleId, nLevel ) ); diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index f7cba24..b88021f 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -717,7 +717,7 @@ bool XclExpLabelCell::IsMultiLineText() const } void XclExpLabelCell::Init( const XclExpRoot& rRoot, - const ScPatternAttr* pPattern, XclExpStringRef xText ) + const ScPatternAttr* pPattern, XclExpStringRef const & xText ) { OSL_ENSURE( xText && xText->Len(), "XclExpLabelCell::XclExpLabelCell - empty string passed" ); mxText = xText; @@ -1842,7 +1842,7 @@ XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt32 nXclRow, rProgress.Progress(); } -void XclExpRow::AppendCell( XclExpCellRef xCell, bool bIsMergedBase ) +void XclExpRow::AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase ) { OSL_ENSURE( !mbAlwaysEmpty, "XclExpRow::AppendCell - row is marked to be always empty" ); // try to merge with last existing cell @@ -2098,7 +2098,7 @@ XclExpRowBuffer::XclExpRowBuffer( const XclExpRoot& rRoot ) : { } -void XclExpRowBuffer::AppendCell( XclExpCellRef xCell, bool bIsMergedBase ) +void XclExpRowBuffer::AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase ) { OSL_ENSURE( xCell, "XclExpRowBuffer::AppendCell - missing cell" ); GetOrCreateRow( xCell->GetXclRow(), false ).AppendCell( xCell, bIsMergedBase ); @@ -2116,7 +2116,7 @@ class RowFinalizeTask : public comphelper::ThreadTask const ScfUInt16Vec& mrColXFIndexes; std::vector< XclExpRow * > maRows; public: - RowFinalizeTask( const std::shared_ptr<comphelper::ThreadTaskTag> pTag, + RowFinalizeTask( const std::shared_ptr<comphelper::ThreadTaskTag> & pTag, const ScfUInt16Vec& rColXFIndexes, bool bProgress ) : comphelper::ThreadTask( pTag ), diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index d463b4f..f160e2b 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -1678,7 +1678,7 @@ void XclImpChSerErrorBar::ReadChSerErrorBar( XclImpStream& rStrm ) maData.mnValueCount = rStrm.ReaduInt16(); } -void XclImpChSerErrorBar::SetSeriesData( XclImpChSourceLinkRef xValueLink, XclImpChDataFormatRef xDataFmt ) +void XclImpChSerErrorBar::SetSeriesData( XclImpChSourceLinkRef const & xValueLink, XclImpChDataFormatRef const & xDataFmt ) { mxValueLink = xValueLink; mxDataFmt = xDataFmt; @@ -2699,7 +2699,7 @@ void XclImpChTypeGroup::Finalize() mxGroupFmt->UpdateGroupFormat( maTypeInfo ); } -void XclImpChTypeGroup::AddSeries( XclImpChSeriesRef xSeries ) +void XclImpChTypeGroup::AddSeries( XclImpChSeriesRef const & xSeries ) { if( xSeries ) maSeries.push_back( xSeries ); @@ -3723,7 +3723,7 @@ Reference< XCoordinateSystem > XclImpChAxesSet::CreateCoordSystem( Reference< XD } void XclImpChAxesSet::ConvertAxis( - XclImpChAxisRef xChAxis, XclImpChTextRef xChAxisTitle, + XclImpChAxisRef const & xChAxis, XclImpChTextRef const & xChAxisTitle, Reference< XCoordinateSystem > const & xCoordSystem, const XclImpChAxis* pCrossingAxis ) const { if( xChAxis ) diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index aa32a82..52a5ab5 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -943,7 +943,7 @@ void XclImpDrawObjBase::ImplReadObj8( XclImpStream& rStrm ) } } -void XclImpDrawObjVector::InsertGrouped( XclImpDrawObjRef xDrawObj ) +void XclImpDrawObjVector::InsertGrouped( XclImpDrawObjRef const & xDrawObj ) { if( !mObjs.empty() ) if( XclImpGroupObj* pGroupObj = dynamic_cast< XclImpGroupObj* >( mObjs.back().get() ) ) @@ -972,7 +972,7 @@ XclImpGroupObj::XclImpGroupObj( const XclImpRoot& rRoot ) : { } -bool XclImpGroupObj::TryInsert( XclImpDrawObjRef xDrawObj ) +bool XclImpGroupObj::TryInsert( XclImpDrawObjRef const & xDrawObj ) { if( xDrawObj->GetObjId() == mnFirstUngrouped ) return false; diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index 51802a9..a2be5da 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -475,7 +475,7 @@ void XclImpStream::RewindRecord() mbValid = mbValidRec = false; } -void XclImpStream::SetDecrypter( XclImpDecrypterRef xDecrypter ) +void XclImpStream::SetDecrypter( XclImpDecrypterRef const & xDecrypter ) { mxDecrypter = xDecrypter; EnableDecryption(); diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index 80a9a63..55998aa 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -238,7 +238,7 @@ bool XclRoot::HasVbaStorage() const return xRootStrg.Is() && xRootStrg->IsContained( EXC_STORAGE_VBA_PROJECT ); } -tools::SvRef<SotStorage> XclRoot::OpenStorage( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ) const +tools::SvRef<SotStorage> XclRoot::OpenStorage( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrgName ) const { return mrData.mbExport ? ScfTools::OpenStorageWrite( xStrg, rStrgName ) : @@ -250,7 +250,7 @@ tools::SvRef<SotStorage> XclRoot::OpenStorage( const OUString& rStrgName ) const return OpenStorage( GetRootStorage(), rStrgName ); } -tools::SvRef<SotStorageStream> XclRoot::OpenStream( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) const +tools::SvRef<SotStorageStream> XclRoot::OpenStream( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrmName ) const { return mrData.mbExport ? ScfTools::OpenStorageStreamWrite( xStrg, rStrmName ) : diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index 4a2aafd..d17e48a 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -165,7 +165,7 @@ OUString ScfTools::ConvertToScDefinedName(const OUString& rName ) // *** streams and storages *** ----------------------------------------------- -tools::SvRef<SotStorage> ScfTools::OpenStorageRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ) +tools::SvRef<SotStorage> ScfTools::OpenStorageRead( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrgName ) { tools::SvRef<SotStorage> xSubStrg; if( xStrg.Is() && xStrg->IsContained( rStrgName ) ) @@ -173,7 +173,7 @@ tools::SvRef<SotStorage> ScfTools::OpenStorageRead( tools::SvRef<SotStorage> xSt return xSubStrg; } -tools::SvRef<SotStorage> ScfTools::OpenStorageWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ) +tools::SvRef<SotStorage> ScfTools::OpenStorageWrite( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrgName ) { tools::SvRef<SotStorage> xSubStrg; if( xStrg.Is() ) @@ -181,7 +181,7 @@ tools::SvRef<SotStorage> ScfTools::OpenStorageWrite( tools::SvRef<SotStorage> xS return xSubStrg; } -tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) +tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamRead( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrmName ) { tools::SvRef<SotStorageStream> xStrm; if( xStrg.Is() && xStrg->IsContained( rStrmName ) && xStrg->IsStream( rStrmName ) ) @@ -189,7 +189,7 @@ tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamRead( tools::SvRef<Sot return xStrm; } -tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) +tools::SvRef<SotStorageStream> ScfTools::OpenStorageStreamWrite( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrmName ) { OSL_ENSURE( !xStrg || !xStrg->IsContained( rStrmName ), "ScfTools::OpenStorageStreamWrite - stream exists already" ); tools::SvRef<SotStorageStream> xStrm; diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx index ccb498c..3ff9ad3 100644 --- a/sc/source/filter/inc/condformatbuffer.hxx +++ b/sc/source/filter/inc/condformatbuffer.hxx @@ -215,7 +215,7 @@ public: void setReadyForFinalize() { mbReadyForFinalize = true; } private: CondFormatRuleRef createRule(); - void insertRule( CondFormatRuleRef xRule ); + void insertRule( CondFormatRuleRef const & xRule ); private: typedef RefMap< sal_Int32, CondFormatRule > CondFormatRuleMap; diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index 85ed6b1..5a7d872 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -156,14 +156,14 @@ public: // *** streams and storages *** ----------------------------------------------- /** Tries to open an existing storage with the specified name in the passed storage (read-only). */ - static tools::SvRef<SotStorage> OpenStorageRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ); + static tools::SvRef<SotStorage> OpenStorageRead( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrgName ); /** Creates and opens a storage with the specified name in the passed storage (read/write). */ - static tools::SvRef<SotStorage> OpenStorageWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ); + static tools::SvRef<SotStorage> OpenStorageWrite( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrgName ); /** Tries to open an existing stream with the specified name in the passed storage (read-only). */ - static tools::SvRef<SotStorageStream> OpenStorageStreamRead( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ); + static tools::SvRef<SotStorageStream> OpenStorageStreamRead( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrmName ); /** Creates and opens a stream with the specified name in the passed storage (read/write). */ - static tools::SvRef<SotStorageStream> OpenStorageStreamWrite( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ); + static tools::SvRef<SotStorageStream> OpenStorageStreamWrite( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrmName ); // *** item handling *** ------------------------------------------------------ diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx index 83f6d12..020ddd9 100644 --- a/sc/source/filter/inc/stylesbuffer.hxx +++ b/sc/source/filter/inc/stylesbuffer.hxx @@ -779,7 +779,7 @@ public: private: /** Inserts the passed cell style object into the internal maps. */ - void insertCellStyle( CellStyleRef xCellStyle ); + void insertCellStyle( CellStyleRef const & xCellStyle ); /** Creates the style sheet described by the passed cell style object. */ static OUString createCellStyle( const CellStyleRef& rxCellStyle ); static ::ScStyleSheet* getCellStyleSheet( const CellStyleRef& rxCellStyle ); diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index 8baa583..94b98e7c 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -1134,7 +1134,7 @@ public: /** Removes the last created data series object from the series list. */ void RemoveLastSeries(); /** Stores a CHTEXT group that describes a data point label. */ - void SetDataLabel( XclExpChTextRef xText ); + void SetDataLabel( XclExpChTextRef const & xText ); /** Sets the plot area position and size to manual mode. */ void SetManualPlotArea(); diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 0d14f36..fa845f3 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -139,7 +139,7 @@ public: /** Returns the absolute position of the system stream. */ inline sal_uInt64 GetSvStreamPos() const { return mrStrm.Tell(); } - void SetEncrypter( XclExpEncrypterRef xEncrypter ); + void SetEncrypter( XclExpEncrypterRef const & xEncrypter ); bool HasValidEncrypter() const; @@ -298,7 +298,7 @@ public: inline const XclExpRoot& GetRoot() const { return *mpRoot; } sax_fastparser::FSHelperPtr& GetCurrentStream(); - void PushStream( sax_fastparser::FSHelperPtr aStream ); + void PushStream( sax_fastparser::FSHelperPtr const & aStream ); void PopStream(); sax_fastparser::FSHelperPtr GetStreamForPath( const OUString& rPath ); diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 632577d..f934f40 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -664,11 +664,11 @@ private: /** Inserts a built-in XF record without a STYLE record and returns the XF ID. @param bCreateStyleRec true = Creates the related STYLE record. */ - sal_uInt32 AppendBuiltInXF( XclExpXFRef xXF, + sal_uInt32 AppendBuiltInXF( XclExpXFRef const & xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL ); /** Inserts a built-in XF and STYLE record and returns the XF ID. @param bCreateStyleRec true = Creates the related STYLE record. */ - sal_uInt32 AppendBuiltInXFWithStyle( XclExpXFRef xXF, + sal_uInt32 AppendBuiltInXFWithStyle( XclExpXFRef const & xXF, sal_uInt8 nStyleId, sal_uInt8 nLevel = EXC_STYLE_NOLEVEL ); /** Inserts all default XF and STYLE records. */ diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx index 71c1ed9..e0f236a 100644 --- a/sc/source/filter/inc/xetable.hxx +++ b/sc/source/filter/inc/xetable.hxx @@ -425,7 +425,7 @@ public: private: /** Initializes the record contents. Called from constructors. */ void Init( const XclExpRoot& rRoot, - const ScPatternAttr* pPattern, XclExpStringRef xText ); + const ScPatternAttr* pPattern, XclExpStringRef const & xText ); virtual void WriteContents( XclExpStream& rStrm ) override; @@ -848,7 +848,7 @@ public: inline bool IsEnabled() const { return mbEnabled; } /** Appends the passed cell object to this row. */ - void AppendCell( XclExpCellRef xCell, bool bIsMergedBase ); + void AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase ); /** Converts all XF identifiers into the Excel XF indexes. */ void Finalize( const ScfUInt16Vec& rColXFIndexes, @@ -915,7 +915,7 @@ public: explicit XclExpRowBuffer( const XclExpRoot& rRoot ); /** Appends the passed cell object to the row that the cell specifies. */ - void AppendCell( XclExpCellRef xCell, bool bIsMergedBase ); + void AppendCell( XclExpCellRef const & xCell, bool bIsMergedBase ); /** Forces insertion of all ROW records before the passed row. */ void CreateRows( SCROW nFirstFreeScRow ); diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index 9d3d9a0..f5a838d 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -724,8 +724,8 @@ public: void ReadChSerErrorBar( XclImpStream& rStrm ); /** Sets link and formatting information for the error bars. */ void SetSeriesData( - XclImpChSourceLinkRef xValueLink, - XclImpChDataFormatRef xDataFmt ); + XclImpChSourceLinkRef const & xValueLink, + XclImpChDataFormatRef const & xDataFmt ); /** Returns the type of this error bar (X/Y, plus/minus). */ inline sal_uInt8 GetBarType() const { return maData.mnBarType; } @@ -967,7 +967,7 @@ public: void Finalize(); /** Inserts a series attached to this chart type group.*/ - void AddSeries( XclImpChSeriesRef xSeries ); + void AddSeries( XclImpChSeriesRef const & xSeries ); /** Marks the passed format index as used. PopUnusedFormatIndex() will not return this index. */ void SetUsedFormatIndex( sal_uInt16 nFormatIdx ); /** Returns the next unused format index and marks it as used. */ @@ -1242,7 +1242,7 @@ private: css::uno::Reference< css::chart2::XCoordinateSystem > CreateCoordSystem( css::uno::Reference< css::chart2::XDiagram > const & xDiagram ) const; /** Creates and inserts an axis into the container and registers the coordinate system. */ - void ConvertAxis( XclImpChAxisRef xChAxis, XclImpChTextRef xChAxisTitle, + void ConvertAxis( XclImpChAxisRef const & xChAxis, XclImpChTextRef const & xChAxisTitle, css::uno::Reference< css::chart2::XCoordinateSystem > const & xCoordSystem, const XclImpChAxis* pCrossingAxis ) const; /** Creates and returns an API axis object. */ diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index 7cee401..afa7478 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -222,7 +222,7 @@ public: void push_back(const XclImpDrawObjRef& rObj) { mObjs.push_back(rObj); } /** Tries to insert the passed object into the last group or appends it. */ - void InsertGrouped( XclImpDrawObjRef xDrawObj ); + void InsertGrouped( XclImpDrawObjRef const & xDrawObj ); /** Returns the needed size on the progress bar for all contained objects. */ sal_Size GetProgressSize() const; @@ -242,7 +242,7 @@ public: explicit XclImpGroupObj( const XclImpRoot& rRoot ); /** Tries to insert the drawing object into this or a nested group. */ - bool TryInsert( XclImpDrawObjRef xDrawObj ); + bool TryInsert( XclImpDrawObjRef const & xDrawObj ); protected: /** Reads the contents of the a BIFF3 OBJ record from the passed stream. */ diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx index 4fa50b0..179dbbd 100644 --- a/sc/source/filter/inc/xistream.hxx +++ b/sc/source/filter/inc/xistream.hxx @@ -279,7 +279,7 @@ public: void RewindRecord(); /** Enables decryption of record contents for the rest of the stream. */ - void SetDecrypter( XclImpDecrypterRef xDecrypter ); + void SetDecrypter( XclImpDecrypterRef const & xDecrypter ); /** Sets decrypter from another stream. */ void CopyDecrypterFrom( const XclImpStream& rStrm ); /** Returns true, if a valid decrypter is set at the stream. */ diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx index 5082923..3e8f1ce 100644 --- a/sc/source/filter/inc/xlroot.hxx +++ b/sc/source/filter/inc/xlroot.hxx @@ -190,11 +190,11 @@ public: bool HasVbaStorage() const; /** Tries to open a storage as child of the specified storage for reading or writing. */ - tools::SvRef<SotStorage> OpenStorage( tools::SvRef<SotStorage> xStrg, const OUString& rStrgName ) const; + tools::SvRef<SotStorage> OpenStorage( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrgName ) const; /** Tries to open a storage as child of the root storage for reading or writing. */ tools::SvRef<SotStorage> OpenStorage( const OUString& rStrgName ) const; /** Tries to open a new stream in the specified storage for reading or writing. */ - tools::SvRef<SotStorageStream> OpenStream( tools::SvRef<SotStorage> xStrg, const OUString& rStrmName ) const; + tools::SvRef<SotStorageStream> OpenStream( tools::SvRef<SotStorage> const & xStrg, const OUString& rStrmName ) const; /** Tries to open a new stream in the root storage for reading or writing. */ tools::SvRef<SotStorageStream> OpenStream( const OUString& rStrmName ) const; diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 1c1eadd..1ff1d7a 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -1080,7 +1080,7 @@ CondFormatRuleRef CondFormat::createRule() return std::make_shared<CondFormatRule>( *this, mpFormat ); } -void CondFormat::insertRule( CondFormatRuleRef xRule ) +void CondFormat::insertRule( CondFormatRuleRef const & xRule ) { if( xRule.get() && (xRule->getPriority() > 0) ) { diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index e11df21..2e03ef88 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -2663,7 +2663,7 @@ OUString CellStyleBuffer::createCellStyle( sal_Int32 nXfId ) const // private -------------------------------------------------------------------- -void CellStyleBuffer::insertCellStyle( CellStyleRef xCellStyle ) +void CellStyleBuffer::insertCellStyle( CellStyleRef const & xCellStyle ) { const CellStyleModel& rModel = xCellStyle->getModel(); if( rModel.mnXfId >= 0 ) diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 88f6948..23fd215 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -225,7 +225,7 @@ class WorkerThread : public comphelper::ThreadTask rtl::Reference<FragmentHandler> mxHandler; public: - WorkerThread( const std::shared_ptr<comphelper::ThreadTaskTag> pTag, + WorkerThread( const std::shared_ptr<comphelper::ThreadTaskTag> & pTag, WorkbookFragment& rWorkbookHandler, const rtl::Reference<FragmentHandler>& xHandler, sal_Int32 &rSheetsLeft ) : diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 6cb41f5..5a11935 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3042,7 +3042,7 @@ void flushParagraph( ScXMLExport& rExport, const OUString& rParaText, rtl::Reference<XMLPropertySetMapper> const & xMapper, rtl::Reference<SvXMLAutoStylePoolP> const & xStylePool, const ScXMLEditAttributeMap& rAttrMap, - std::vector<editeng::Section>::const_iterator it, std::vector<editeng::Section>::const_iterator itEnd ) + std::vector<editeng::Section>::const_iterator it, std::vector<editeng::Section>::const_iterator const & itEnd ) { OUString aElemName = rExport.GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_TEXT, GetXMLToken(XML_P)); diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx index 0ca3a93..69f819c 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx @@ -25,7 +25,7 @@ #include "StatisticsInputOutputDialog.hxx" -ScRangeList ScStatisticsInputOutputDialog::MakeColumnRangeList(SCTAB aTab, ScAddress aStart, ScAddress aEnd) +ScRangeList ScStatisticsInputOutputDialog::MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd) { ScRangeList aRangeList; for (SCCOL inCol = aStart.Col(); inCol <= aEnd.Col(); inCol++) @@ -39,7 +39,7 @@ ScRangeList ScStatisticsInputOutputDialog::MakeColumnRangeList(SCTAB aTab, ScAdd return aRangeList; } -ScRangeList ScStatisticsInputOutputDialog::MakeRowRangeList(SCTAB aTab, ScAddress aStart, ScAddress aEnd) +ScRangeList ScStatisticsInputOutputDialog::MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd) { ScRangeList aRangeList; for (SCROW inRow = aStart.Row(); inRow <= aEnd.Row(); inRow++) diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index 8622dcf..91a8864 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -53,7 +53,7 @@ void FormulaTemplate::autoReplaceRange(const OUString& aVariable, const ScRange& mRangeReplacementMap[aVariable] = rRange; } -void FormulaTemplate::autoReplaceAddress(const OUString& aVariable, ScAddress aAddress) +void FormulaTemplate::autoReplaceAddress(const OUString& aVariable, ScAddress const & aAddress) { mAddressReplacementMap[aVariable] = aAddress; diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index c94bfba..c907425 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -107,7 +107,7 @@ sal_Unicode lcl_getSheetSeparator(ScDocument* pDoc) } ScTypedCaseStrSet::const_iterator findText( - const ScTypedCaseStrSet& rDataSet, ScTypedCaseStrSet::const_iterator itPos, + const ScTypedCaseStrSet& rDataSet, ScTypedCaseStrSet::const_iterator const & itPos, const OUString& rStart, OUString& rResult, bool bBack) { if (bBack) // Backwards @@ -182,7 +182,7 @@ OUString getExactMatch(const ScTypedCaseStrSet& rDataSet, const OUString& rStrin } ScTypedCaseStrSet::const_iterator findTextAll( - const ScTypedCaseStrSet& rDataSet, ScTypedCaseStrSet::const_iterator itPos, + const ScTypedCaseStrSet& rDataSet, ScTypedCaseStrSet::const_iterator const & itPos, const OUString& rStart, ::std::vector< OUString > &rResultVec, bool bBack) { rResultVec.clear(); // clear contents diff --git a/sc/source/ui/dbgui/csvsplits.cxx b/sc/source/ui/dbgui/csvsplits.cxx index aa53a88..ccf87b2 100644 --- a/sc/source/ui/dbgui/csvsplits.cxx +++ b/sc/source/ui/dbgui/csvsplits.cxx @@ -94,7 +94,7 @@ sal_Int32 ScCsvSplits::GetPos( sal_uInt32 nIndex ) const return (nIndex < Count()) ? maVec[ nIndex ] : CSV_POS_INVALID; } -sal_uInt32 ScCsvSplits::GetIterIndex( const_iterator aIter ) const +sal_uInt32 ScCsvSplits::GetIterIndex( const_iterator const & aIter ) const { return (aIter == maVec.end()) ? CSV_VEC_NOTFOUND : (aIter - maVec.begin()); } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index d97d547..0126f9c 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -278,7 +278,7 @@ bool ScExternalRefCache::Table::isReferenced() const return meReferenced != UNREFERENCED; } -void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef pToken, sal_uLong nFmtIndex, bool bSetCacheRange) +void ScExternalRefCache::Table::setCell(SCCOL nCol, SCROW nRow, TokenRef const & pToken, sal_uLong nFmtIndex, bool bSetCacheRange) { using ::std::pair; RowsDataType::iterator itrRow = maRows.find(nRow); @@ -787,7 +787,7 @@ void ScExternalRefCache::setRangeName(sal_uInt16 nFileId, const OUString& rName) } void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const OUString& rTabName, SCCOL nCol, SCROW nRow, - TokenRef pToken, sal_uLong nFmtIndex) + TokenRef const & pToken, sal_uLong nFmtIndex) { if (!isDocInitialized(nFileId)) return; diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 2e062f5..fab2af5 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -489,7 +489,7 @@ void ScDocumentLoader::RemoveAppPrefix( OUString& rFilterName ) rFilterName = rFilterName.copy( aAppPrefix.getLength()); } -SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, std::shared_ptr<const SfxFilter> pFilter, +SfxMedium* ScDocumentLoader::CreateMedium( const OUString& rFileName, std::shared_ptr<const SfxFilter> const & pFilter, const OUString& rOptions ) { // Always create SfxItemSet so ScDocShell can set options. diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx index 874358a..5fedfdd 100644 --- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx +++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx @@ -65,8 +65,8 @@ protected: ScAddress mOutputAddress; GroupedBy mGroupedBy; - static ScRangeList MakeColumnRangeList(SCTAB aTab, ScAddress aStart, ScAddress aEnd); - static ScRangeList MakeRowRangeList(SCTAB aTab, ScAddress aStart, ScAddress aEnd); + static ScRangeList MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd); + static ScRangeList MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd); private: // Widgets diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx index 8d0bbfe..0ba02ab 100644 --- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx +++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx @@ -42,7 +42,7 @@ public: const OUString& getTemplate(); void autoReplaceRange(const OUString& aVariable, const ScRange& rRange); - void autoReplaceAddress(const OUString& aVariable, ScAddress aAddress); + void autoReplaceAddress(const OUString& aVariable, ScAddress const & aAddress); void autoReplaceUses3D(bool bUse3D = true) { mbUse3D = bUse3D; } void applyRange(const OUString& aVariable, const ScRange& aRange, bool b3D = true); diff --git a/sc/source/ui/inc/csvsplits.hxx b/sc/source/ui/inc/csvsplits.hxx index 7ab80e3..93aa22b 100644 --- a/sc/source/ui/inc/csvsplits.hxx +++ b/sc/source/ui/inc/csvsplits.hxx @@ -77,7 +77,7 @@ public: private: /** Returns the vector index of an iterator. */ - sal_uInt32 GetIterIndex( const_iterator aIter ) const; + sal_uInt32 GetIterIndex( const_iterator const & aIter ) const; }; #endif diff --git a/sc/source/ui/sidebar/CellBorderUpdater.cxx b/sc/source/ui/sidebar/CellBorderUpdater.cxx index 12a8777..64912d6 100644 --- a/sc/source/ui/sidebar/CellBorderUpdater.cxx +++ b/sc/source/ui/sidebar/CellBorderUpdater.cxx @@ -36,7 +36,7 @@ CellBorderUpdater::~CellBorderUpdater() { } -void CellBorderUpdater::UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight, Image aImg, bool bVer, bool bHor) +void CellBorderUpdater::UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight, Image const & aImg, bool bVer, bool bHor) { BitmapEx aBmpEx( aImg.GetBitmapEx() ); Bitmap aBmp( aBmpEx.GetBitmap() ); diff --git a/sc/source/ui/sidebar/CellBorderUpdater.hxx b/sc/source/ui/sidebar/CellBorderUpdater.hxx index e144537..7f48af9 100644 --- a/sc/source/ui/sidebar/CellBorderUpdater.hxx +++ b/sc/source/ui/sidebar/CellBorderUpdater.hxx @@ -33,7 +33,7 @@ public: CellBorderUpdater(sal_uInt16 nTbxBtnId, ToolBox& rTbx); ~CellBorderUpdater(); - void UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight, Image aImg, bool bVer, bool bHor); + void UpdateCellBorder(bool bTop, bool bBot, bool bLeft, bool bRight, Image const & aImg, bool bVer, bool bHor); }; } } // end of namespace svx::sidebar diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx index 298acf0..8e2044b 100644 --- a/sc/source/ui/uitest/uiobject.cxx +++ b/sc/source/ui/uitest/uiobject.cxx @@ -174,19 +174,19 @@ void ScGridWinUIObject::execute(const OUString& rAction, namespace { -ScDrawLayer* get_draw_layer(VclPtr<ScGridWindow> xGridWindow) +ScDrawLayer* get_draw_layer(VclPtr<ScGridWindow> const & xGridWindow) { return xGridWindow->getViewData()->GetDocument()->GetDrawLayer(); } -SdrPage* get_draw_page(VclPtr<ScGridWindow> xGridWindow, SCTAB nTab) +SdrPage* get_draw_page(VclPtr<ScGridWindow> const & xGridWindow, SCTAB nTab) { ScDrawLayer* pDrawLayer = get_draw_layer(xGridWindow); return pDrawLayer->GetPage(nTab); } -std::set<OUString> collect_charts(VclPtr<ScGridWindow> xGridWindow) +std::set<OUString> collect_charts(VclPtr<ScGridWindow> const & xGridWindow) { SCTAB nTab = xGridWindow->getViewData()->GetTabNo(); SdrPage* pPage = get_draw_page(xGridWindow, nTab); diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index 0b9d1a8..2b1a7d1 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -252,7 +252,7 @@ ScVbaInterior::GetAttributeContainer() return uno::Reference < container::XNameContainer > ( m_xProps->getPropertyValue("UserDefinedAttributes"), uno::UNO_QUERY_THROW ); } sal_Int32 -ScVbaInterior::GetAttributeData( uno::Any aValue ) +ScVbaInterior::GetAttributeData( uno::Any const & aValue ) { xml::AttributeData aDataValue; if( aValue >>= aDataValue ) diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx index 02bbeaf..683e002 100644 --- a/sc/source/ui/vba/vbainterior.hxx +++ b/sc/source/ui/vba/vbainterior.hxx @@ -44,7 +44,7 @@ class ScVbaInterior : public ScVbaInterior_BASE css::uno::Reference< css::container::XIndexAccess > getPalette(); css::uno::Reference< css::container::XNameContainer > GetAttributeContainer(); static css::uno::Any SetAttributeData( sal_Int32 nValue ); - static sal_Int32 GetAttributeData( css::uno::Any aValue ); + static sal_Int32 GetAttributeData( css::uno::Any const & aValue ); Color GetBackColor(); protected: static Color GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern ); commit a293ff34143f90c6836591fc1f4aa419342c5e1b Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Jul 19 10:49:40 2016 +0200 clang-tidy performance-unnecessary-value-param in sal Change-Id: I2931871fc80f52b79d070961a3709117d0a8fd3a diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index af5f947..f0ccc9b 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -46,7 +46,7 @@ using ::rtl::OString; /** print last error of pipe system. */ -inline void printPipeError( ::osl::Pipe aPipe ) +inline void printPipeError( ::osl::Pipe const & aPipe ) { oslPipeError nError = aPipe.getError( ); printf("#printPipeError# " ); commit 955c99d6eb699dae2804ab430262a9dff89c920b Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Jul 19 10:49:32 2016 +0200 clang-tidy performance-unnecessary-value-param in desktop Change-Id: I1b1bf615c5afcb6e14929fde456c6b734be65414 diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 3304600..f5faecf 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -957,7 +957,7 @@ namespace { } boost::optional<boost::property_tree::ptree> - getContextMenuItem(boost::property_tree::ptree& aMenu, std::string unoSelector) + getContextMenuItem(boost::property_tree::ptree& aMenu, std::string const & unoSelector) { boost::optional<boost::property_tree::ptree> aMenuItem; for (const auto& aItemPair: aMenu) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits