From 17a2c9e8e2361de27013a25e51f3a3ca729f1b31 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 5 Jun 2017 08:34:22 +0200 Subject: clang-tidy performance-unnecessary-value-param Change-Id: I6ed8c54c7c45931d91709cc818f2483c70197192 Reviewed-on: https://gerrit.libreoffice.org/38400 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../source/controls/OConnectionPointHelper.cxx | 2 +- UnoControls/source/inc/OConnectionPointHelper.hxx | 2 +- avmedia/inc/mediacontrol.hxx | 2 +- avmedia/source/framework/MediaControlBase.cxx | 8 +++---- avmedia/source/framework/mediacontrol.cxx | 2 +- basic/source/classes/sbunoobj.cxx | 4 ++-- .../chartapiwrapper/WrappedStatisticProperties.cxx | 25 +++++++++++----------- chart2/source/controller/inc/uiobject.hxx | 4 ++-- chart2/source/controller/uitest/uiobject.cxx | 4 ++-- chart2/source/view/inc/3DChartObjects.hxx | 2 +- chart2/source/view/main/3DChartObjects.cxx | 2 +- comphelper/source/container/namecontainer.cxx | 4 ++-- cui/source/dialogs/scriptdlg.cxx | 2 +- cui/source/inc/scriptdlg.hxx | 2 +- editeng/source/editeng/eertfpar.cxx | 3 ++- formula/source/core/api/FormulaCompiler.cxx | 4 ++-- include/avmedia/MediaControlBase.hxx | 8 +++---- include/oox/core/relationshandler.hxx | 2 +- include/oox/drawingml/connectorshapecontext.hxx | 2 +- include/oox/drawingml/graphicshapecontext.hxx | 8 +++---- include/oox/ppt/pptgraphicshapecontext.hxx | 2 +- include/oox/ppt/pptshapecontext.hxx | 2 +- include/oox/ppt/pptshapegroupcontext.hxx | 4 ++-- include/oox/ppt/slidefragmenthandler.hxx | 2 +- include/svtools/svlbitm.hxx | 4 ++-- include/svx/cube3d.hxx | 2 +- include/vcl/uitest/uiobject.hxx | 24 ++++++++++----------- oox/inc/drawingml/table/tablecontext.hxx | 2 +- oox/inc/drawingml/textbody.hxx | 2 +- oox/source/core/relationshandler.cxx | 2 +- oox/source/drawingml/connectorshapecontext.cxx | 2 +- oox/source/drawingml/graphicshapecontext.cxx | 8 +++---- oox/source/drawingml/table/tablecontext.cxx | 2 +- oox/source/drawingml/textbody.cxx | 2 +- oox/source/export/chartexport.cxx | 3 ++- oox/source/export/shapes.cxx | 3 ++- oox/source/ppt/layoutfragmenthandler.cxx | 3 ++- oox/source/ppt/pptgraphicshapecontext.cxx | 2 +- oox/source/ppt/pptimport.cxx | 2 +- oox/source/ppt/pptshapecontext.cxx | 2 +- oox/source/ppt/pptshapegroupcontext.cxx | 4 ++-- oox/source/ppt/slidefragmenthandler.cxx | 2 +- sc/inc/textuno.hxx | 2 +- sc/qa/unit/subsequent_filters-test.cxx | 2 +- sc/source/filter/excel/xecontent.cxx | 4 ++-- sc/source/filter/excel/xeroot.cxx | 2 +- sc/source/filter/excel/xetable.cxx | 4 ++-- sc/source/filter/excel/xiroot.cxx | 2 +- sc/source/filter/inc/xecontent.hxx | 4 ++-- sc/source/filter/inc/xeroot.hxx | 2 +- sc/source/filter/inc/xetable.hxx | 4 ++-- sc/source/filter/inc/xiroot.hxx | 2 +- sc/source/filter/xcl97/xcl97rec.cxx | 4 ++-- sc/source/ui/Accessibility/AccessibleText.cxx | 12 +++++------ .../TableFillingAndNavigationTools.cxx | 6 +++--- sc/source/ui/condformat/condformatdlgitem.cxx | 4 +++- .../ui/inc/TableFillingAndNavigationTools.hxx | 6 +++--- sc/source/ui/inc/cellsh.hxx | 2 +- sc/source/ui/inc/notemark.hxx | 2 +- sc/source/ui/inc/optsolver.hxx | 2 +- sc/source/ui/inc/solvrdlg.hxx | 2 +- sc/source/ui/inc/uiobject.hxx | 2 +- sc/source/ui/inc/undoblk.hxx | 4 ++-- sc/source/ui/miscdlgs/optsolver.cxx | 2 +- sc/source/ui/miscdlgs/solvrdlg.cxx | 2 +- sc/source/ui/uitest/uiobject.cxx | 2 +- sc/source/ui/undo/undoblk.cxx | 4 ++-- sc/source/ui/unoobj/textuno.cxx | 2 +- sc/source/ui/view/cellsh.cxx | 2 +- sc/source/ui/view/notemark.cxx | 2 +- sd/inc/CustomAnimationPreset.hxx | 2 +- sd/source/core/CustomAnimationPreset.cxx | 2 +- sd/source/filter/eppt/pptx-epptooxml.cxx | 3 ++- .../ui/framework/factories/ViewShellWrapper.cxx | 2 +- sd/source/ui/inc/framework/ViewShellWrapper.hxx | 2 +- sd/source/ui/inc/uiobject.hxx | 2 +- sd/source/ui/slidesorter/view/SlsLayeredDevice.cxx | 2 +- sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx | 2 +- sd/source/ui/uitest/uiobject.cxx | 10 ++++----- sfx2/inc/uitest/sfx_uiobject.hxx | 2 +- sfx2/source/doc/docfile.cxx | 5 +++-- sfx2/source/notebookbar/DropdownBox.cxx | 2 +- sfx2/source/uitest/sfx_uiobject.cxx | 2 +- sfx2/source/view/viewfrm.cxx | 2 +- starmath/source/uiobject.cxx | 4 ++-- starmath/source/uiobject.hxx | 4 ++-- svtools/inc/uitest/uiobject.hxx | 6 +++--- svtools/source/contnr/svlbitm.cxx | 2 +- svtools/source/uitest/uiobject.cxx | 8 +++---- svx/inc/uiobject.hxx | 2 +- svx/source/engine3d/cube3d.cxx | 2 +- svx/source/uitest/uiobject.cxx | 2 +- sw/inc/unochart.hxx | 2 +- sw/inc/unoredline.hxx | 2 +- sw/source/core/access/accmap.cxx | 4 ++-- sw/source/core/unocore/unochart.cxx | 2 +- sw/source/core/unocore/unoredline.cxx | 2 +- sw/source/filter/ww8/docxattributeoutput.cxx | 2 +- sw/source/filter/ww8/docxattributeoutput.hxx | 2 +- sw/source/filter/ww8/wrtw8esh.cxx | 2 +- sw/source/filter/xml/xmlexpit.cxx | 3 ++- sw/source/filter/xml/xmlimpit.cxx | 3 ++- sw/source/filter/xml/xmliteme.cxx | 3 ++- sw/source/filter/xml/xmlitemi.cxx | 4 ++-- sw/source/uibase/inc/uiobject.hxx | 2 +- sw/source/uibase/uitest/uiobject.cxx | 2 +- vcl/source/edit/textdat2.hxx | 4 ++-- vcl/source/edit/textdata.cxx | 4 ++-- vcl/source/uitest/uiobject.cxx | 24 ++++++++++----------- vcl/source/uitest/uno/uiobject_uno.cxx | 3 ++- xmloff/inc/animationimport.hxx | 2 +- xmloff/source/draw/animationimport.cxx | 2 +- xmloff/source/draw/shapeimport.cxx | 3 ++- xmlsecurity/source/gpg/CertificateImpl.cxx | 2 +- xmlsecurity/source/gpg/CertificateImpl.hxx | 2 +- 115 files changed, 214 insertions(+), 200 deletions(-) diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx index fff245e8341c..e54acbdf46fb 100644 --- a/UnoControls/source/controls/OConnectionPointHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointHelper.cxx @@ -38,7 +38,7 @@ namespace unocontrols{ OConnectionPointHelper::OConnectionPointHelper( Mutex& aMutex , OConnectionPointContainerHelper* pContainerImplementation , - Type aType + Type const & aType ) : m_aSharedMutex ( aMutex ) , m_oContainerWeakReference ( pContainerImplementation ) , m_pContainerImplementation ( pContainerImplementation ) diff --git a/UnoControls/source/inc/OConnectionPointHelper.hxx b/UnoControls/source/inc/OConnectionPointHelper.hxx index 2e86fc29f302..77a788651b77 100644 --- a/UnoControls/source/inc/OConnectionPointHelper.hxx +++ b/UnoControls/source/inc/OConnectionPointHelper.hxx @@ -42,7 +42,7 @@ public: OConnectionPointHelper( ::osl::Mutex& aMutex , OConnectionPointContainerHelper* pContainerImplementation , - css::uno::Type aType ); + css::uno::Type const & aType ); virtual ~OConnectionPointHelper() override; diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index a6c247b7c687..99ad5ef91a01 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -51,7 +51,7 @@ public: const Size& getMinSizePixel() const; void setState( const MediaItem& rItem ); - void UpdateURLField(MediaItem maItem); + void UpdateURLField( MediaItem const & maItem ); protected: diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx index 2aa829dc735f..390f08ff6dbc 100644 --- a/avmedia/source/framework/MediaControlBase.cxx +++ b/avmedia/source/framework/MediaControlBase.cxx @@ -39,7 +39,7 @@ MediaControlBase::MediaControlBase() { } -void MediaControlBase::UpdateTimeField( MediaItem aMediaItem, double fTime ) +void MediaControlBase::UpdateTimeField( MediaItem const & aMediaItem, double fTime ) { if( !aMediaItem.getURL().isEmpty()) { @@ -57,7 +57,7 @@ void MediaControlBase::UpdateTimeField( MediaItem aMediaItem, double fTime ) } } -void MediaControlBase::UpdateVolumeSlider( MediaItem aMediaItem ) +void MediaControlBase::UpdateVolumeSlider( MediaItem const & aMediaItem ) { if( aMediaItem.getURL().isEmpty() ) mpVolumeSlider->Disable(); @@ -70,7 +70,7 @@ void MediaControlBase::UpdateVolumeSlider( MediaItem aMediaItem ) } } -void MediaControlBase::UpdateTimeSlider( MediaItem aMediaItem ) +void MediaControlBase::UpdateTimeSlider( MediaItem const & aMediaItem ) { if( aMediaItem.getURL().isEmpty() ) mpTimeSlider->Disable(); @@ -211,7 +211,7 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem) } } -void MediaControlBase::SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem aItem, sal_uInt16 nId) +void MediaControlBase::SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, sal_uInt16 nId) { switch( nId ) { diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 44d9ce7ce030..bde107a71e24 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -168,7 +168,7 @@ const Size& MediaControl::getMinSizePixel() const return maMinSize; } -void MediaControl::UpdateURLField(MediaItem tempItem) +void MediaControl::UpdateURLField(MediaItem const & tempItem) { const OUString aURL( AvmResId(AVMEDIA_MEDIA_PATH) + ": " + tempItem.getURL() ) ; mpMediaPath->SetText(aURL); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index f0da35932f92..dc1ba44bd3e5 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4219,7 +4219,7 @@ class ModuleInvocationProxy : public WeakImplHelper< XInvocation, XComponent > ::comphelper::OInterfaceContainerHelper2 m_aListeners; public: - ModuleInvocationProxy( const OUString& aPrefix, SbxObjectRef xScopeObj ); + ModuleInvocationProxy( OUString const & aPrefix, SbxObjectRef const & xScopeObj ); // XInvocation virtual Reference< XIntrospectionAccess > SAL_CALL getIntrospection() override; @@ -4239,7 +4239,7 @@ public: virtual void SAL_CALL removeEventListener( const Reference< XEventListener >& aListener ) override; }; -ModuleInvocationProxy::ModuleInvocationProxy( const OUString& aPrefix, SbxObjectRef xScopeObj ) +ModuleInvocationProxy::ModuleInvocationProxy( OUString const & aPrefix, SbxObjectRef const & xScopeObj ) : m_aMutex() , m_aPrefix( aPrefix + "_" ) , m_xScopeObj( xScopeObj ) diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index 0f151a44a615..0f8bd60b38f6 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -34,6 +34,7 @@ #include #include #include +#include using namespace ::com::sun::star; using ::com::sun::star::uno::Any; @@ -216,7 +217,7 @@ WrappedConstantErrorLowProperty::WrappedConstantErrorLowProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "ConstantErrorLow" - , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -266,7 +267,7 @@ WrappedConstantErrorHighProperty::WrappedConstantErrorHighProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "ConstantErrorHigh" - , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -312,7 +313,7 @@ public: WrappedMeanValueProperty::WrappedMeanValueProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedStatisticProperty< bool >( "MeanValue", uno::Any( false ), spChart2ModelContact, ePropertyType ) + : WrappedStatisticProperty< bool >( "MeanValue", uno::Any( false ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -353,7 +354,7 @@ WrappedErrorCategoryProperty::WrappedErrorCategoryProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< css::chart::ChartErrorCategory >( "ErrorCategory" - , uno::Any( css::chart::ChartErrorCategory_NONE ), spChart2ModelContact, ePropertyType ) + , uno::Any( css::chart::ChartErrorCategory_NONE ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -450,7 +451,7 @@ WrappedPercentageErrorProperty::WrappedPercentageErrorProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "PercentageError" - , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -500,7 +501,7 @@ WrappedErrorMarginProperty::WrappedErrorMarginProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< double >( "ErrorMargin" - , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType ) + , uno::Any( 0.0 ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -547,7 +548,7 @@ WrappedErrorIndicatorProperty::WrappedErrorIndicatorProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< css::chart::ChartErrorIndicatorType >( "ErrorIndicator" - , uno::Any( css::chart::ChartErrorIndicatorType_NONE ), spChart2ModelContact, ePropertyType ) + , uno::Any( css::chart::ChartErrorIndicatorType_NONE ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -616,7 +617,7 @@ WrappedErrorBarStyleProperty::WrappedErrorBarStyleProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< sal_Int32 >( "ErrorBarStyle" - , uno::Any( css::chart::ErrorBarStyle::NONE ), spChart2ModelContact, ePropertyType ) + , uno::Any( css::chart::ErrorBarStyle::NONE ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -661,7 +662,7 @@ WrappedErrorBarRangePositiveProperty::WrappedErrorBarRangePositiveProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< OUString >( "ErrorBarRangePositive" - , uno::Any( OUString() ), spChart2ModelContact, ePropertyType ) + , uno::Any( OUString() ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -724,7 +725,7 @@ WrappedErrorBarRangeNegativeProperty::WrappedErrorBarRangeNegativeProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< OUString >( "ErrorBarRangeNegative" - , uno::Any( OUString() ), spChart2ModelContact, ePropertyType ) + , uno::Any( OUString() ), std::move(spChart2ModelContact), ePropertyType ) { } @@ -784,7 +785,7 @@ WrappedRegressionCurvesProperty::WrappedRegressionCurvesProperty( std::shared_ptr< Chart2ModelContact > spChart2ModelContact, tSeriesOrDiagramPropertyType ePropertyType ) : WrappedStatisticProperty< css::chart::ChartRegressionCurveType >( "RegressionCurves" - , lcl_getRegressionDefault(), spChart2ModelContact, ePropertyType ) + , lcl_getRegressionDefault(), std::move(spChart2ModelContact), ePropertyType ) { } @@ -852,7 +853,7 @@ WrappedStatisticPropertySetProperty::WrappedStatisticPropertySetProperty( : (ePropertySetType == PROPERTY_SET_TYPE_ERROR_BAR) ? OUString("DataErrorProperties") : OUString("DataMeanValueProperties") - , uno::Any(), spChart2ModelContact, ePropertyType ) + , uno::Any(), std::move(spChart2ModelContact), ePropertyType ) , m_eType( ePropertySetType ) { } diff --git a/chart2/source/controller/inc/uiobject.hxx b/chart2/source/controller/inc/uiobject.hxx index 580db5ea71ba..31d1561b08f3 100644 --- a/chart2/source/controller/inc/uiobject.hxx +++ b/chart2/source/controller/inc/uiobject.hxx @@ -19,7 +19,7 @@ class ChartUIObject : public UIObject { public: - ChartUIObject(VclPtr xChartWindow, + ChartUIObject(const VclPtr& xChartWindow, const OUString& rCID); StringMap get_state() override; @@ -48,7 +48,7 @@ class ChartWindowUIObject : public WindowUIObject public: - ChartWindowUIObject(VclPtr xChartWindow); + ChartWindowUIObject(const VclPtr& xChartWindow); virtual StringMap get_state() override; diff --git a/chart2/source/controller/uitest/uiobject.cxx b/chart2/source/controller/uitest/uiobject.cxx index 9bc0f05d7ce2..fa04a13d747f 100644 --- a/chart2/source/controller/uitest/uiobject.cxx +++ b/chart2/source/controller/uitest/uiobject.cxx @@ -20,7 +20,7 @@ #include #include -ChartUIObject::ChartUIObject(VclPtr xChartWindow, +ChartUIObject::ChartUIObject(const VclPtr& xChartWindow, const OUString& rCID): maCID(rCID), mxChartWindow(xChartWindow) @@ -92,7 +92,7 @@ OUString ChartUIObject::get_type() const return OUString("ChartUIObject for type: "); } -ChartWindowUIObject::ChartWindowUIObject(VclPtr xChartWindow): +ChartWindowUIObject::ChartWindowUIObject(const VclPtr& xChartWindow): WindowUIObject(xChartWindow), mxChartWindow(xChartWindow) { diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx index a8e30d1c1b1c..052fd1dd2783 100644 --- a/chart2/source/view/inc/3DChartObjects.hxx +++ b/chart2/source/view/inc/3DChartObjects.hxx @@ -105,7 +105,7 @@ class ScreenText : public Renderable3DObject { public: ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, - const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId, bool bIs3dText = false); + const OUString& rStr, const glm::vec4& rColor, sal_uInt32 nId, bool bIs3dText = false); virtual void render() override; void setPosition(const glm::vec2& rTopLeft, const glm::vec2& rBottomRight, diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx index ebedc36800dd..37f327bb9b9b 100644 --- a/chart2/source/view/main/3DChartObjects.cxx +++ b/chart2/source/view/main/3DChartObjects.cxx @@ -127,7 +127,7 @@ void Text::setPosition(const glm::vec3& rTopLeft, const glm::vec3& rTopRight, co } ScreenText::ScreenText(OpenGL3DRenderer* pRenderer, TextCache& rTextCache, - const OUString& rStr, glm::vec4 rColor, sal_uInt32 nId, bool bIs3dText): + const OUString& rStr, const glm::vec4& rColor, sal_uInt32 nId, bool bIs3dText): Renderable3DObject(pRenderer, nId), maText(rTextCache.getText(rStr,bIs3dText)), maColor(rColor) diff --git a/comphelper/source/container/namecontainer.cxx b/comphelper/source/container/namecontainer.cxx index 0b51ba050e75..23b87df8b94c 100644 --- a/comphelper/source/container/namecontainer.cxx +++ b/comphelper/source/container/namecontainer.cxx @@ -34,7 +34,7 @@ namespace comphelper class NameContainer : public ::cppu::WeakImplHelper< css::container::XNameContainer > { public: - explicit NameContainer( css::uno::Type aType ); + explicit NameContainer( const css::uno::Type& aType ); // XNameContainer virtual void SAL_CALL insertByName( const OUString& aName, const css::uno::Any& aElement ) override; @@ -66,7 +66,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; -NameContainer::NameContainer( css::uno::Type aType ) +NameContainer::NameContainer( const css::uno::Type& aType ) : maType( aType ) { } diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index a880d40ec975..7be590b167de 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -1405,7 +1405,7 @@ OUString GetErrorMessage( const css::uno::Any& aException ) } -SvxScriptErrorDialog::SvxScriptErrorDialog( css::uno::Any aException ) +SvxScriptErrorDialog::SvxScriptErrorDialog( css::uno::Any const & aException ) : m_sMessage() { SolarMutexGuard aGuard; diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx index d07e44cf765e..15189d447568 100644 --- a/cui/source/inc/scriptdlg.hxx +++ b/cui/source/inc/scriptdlg.hxx @@ -188,7 +188,7 @@ private: public: - SvxScriptErrorDialog( css::uno::Any aException ); + SvxScriptErrorDialog( css::uno::Any const & aException ); virtual ~SvxScriptErrorDialog() override; diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 6f93d8bf6280..43c093839e40 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include #include @@ -68,7 +69,7 @@ RtfImportInfo::~RtfImportInfo() EditRTFParser::EditRTFParser( SvStream& rIn, EditSelection aSel, SfxItemPool& rAttrPool, EditEngine* pEditEngine) : SvxRTFParser(rAttrPool, rIn, nullptr), - aCurSel(aSel), + aCurSel(std::move(aSel)), mpEditEngine(pEditEngine), aRTFMapMode(MapUnit::MapTwip), nDefFont(0), diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index ead0e05414b1..7da75874ea04 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -145,7 +145,7 @@ class OpCodeList { public: - OpCodeList( sal_uInt16, FormulaCompiler::NonConstOpCodeMapPtr, + OpCodeList( sal_uInt16, const FormulaCompiler::NonConstOpCodeMapPtr&, FormulaCompiler::SeparatorType = FormulaCompiler::SeparatorType::SEMICOLON_BASE ); private: @@ -157,7 +157,7 @@ private: ResStringArray maStringList; }; -OpCodeList::OpCodeList( sal_uInt16 nRID, FormulaCompiler::NonConstOpCodeMapPtr xMap, +OpCodeList::OpCodeList( sal_uInt16 nRID, const FormulaCompiler::NonConstOpCodeMapPtr& xMap, FormulaCompiler::SeparatorType eSepType ) : meSepType(eSepType) , maStringList(ResId(nRID, *ResourceManager::getResManager())) diff --git a/include/avmedia/MediaControlBase.hxx b/include/avmedia/MediaControlBase.hxx index bc73f64cf66a..29e1ab7b4fc4 100644 --- a/include/avmedia/MediaControlBase.hxx +++ b/include/avmedia/MediaControlBase.hxx @@ -72,10 +72,10 @@ protected: static Image GetImage(sal_Int32 nImageId); virtual void InitializeWidgets(); virtual void UpdateToolBoxes( MediaItem aMediaItem ); - void UpdateVolumeSlider( MediaItem aMediaItem ); - void UpdateTimeSlider( MediaItem aMediaItem ); - void UpdateTimeField( MediaItem aMediaItem, double fTime ); - void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem aItem, sal_uInt16 nId); + void UpdateVolumeSlider( MediaItem const & aMediaItem ); + void UpdateTimeSlider( MediaItem const & aMediaItem ); + void UpdateTimeField( MediaItem const & aMediaItem, double fTime ); + void SelectPlayToolBoxItem( MediaItem& aExecItem, MediaItem const & aItem, sal_uInt16 nId); }; } diff --git a/include/oox/core/relationshandler.hxx b/include/oox/core/relationshandler.hxx index 314e95a29b39..1aa84ad1aa48 100644 --- a/include/oox/core/relationshandler.hxx +++ b/include/oox/core/relationshandler.hxx @@ -44,7 +44,7 @@ class RelationsFragment : public FragmentHandler public: explicit RelationsFragment( XmlFilterBase& rFilter, - RelationsRef xRelations ); + const RelationsRef& xRelations ); virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( diff --git a/include/oox/drawingml/connectorshapecontext.hxx b/include/oox/drawingml/connectorshapecontext.hxx index 71b5e50ff6bf..57982230bc34 100644 --- a/include/oox/drawingml/connectorshapecontext.hxx +++ b/include/oox/drawingml/connectorshapecontext.hxx @@ -34,7 +34,7 @@ namespace oox { namespace drawingml { class OOX_DLLPUBLIC ConnectorShapeContext : public ShapeContext { public: - ConnectorShapeContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pGroupShapePtr ); + ConnectorShapeContext( ::oox::core::ContextHandler2Helper& rParent, const ShapePtr& pMasterShapePtr, const ShapePtr& pGroupShapePtr ); virtual ~ConnectorShapeContext() override; virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; }; diff --git a/include/oox/drawingml/graphicshapecontext.hxx b/include/oox/drawingml/graphicshapecontext.hxx index 22218fdee265..403fdea79018 100644 --- a/include/oox/drawingml/graphicshapecontext.hxx +++ b/include/oox/drawingml/graphicshapecontext.hxx @@ -36,7 +36,7 @@ namespace oox { namespace drawingml { class OOX_DLLPUBLIC GraphicShapeContext : public ShapeContext { public: - GraphicShapeContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ); + GraphicShapeContext( ::oox::core::ContextHandler2Helper& rParent, const ShapePtr& pMasterShapePtr, const ShapePtr& pShapePtr ); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; }; @@ -45,7 +45,7 @@ public: class OOX_DLLPUBLIC GraphicalObjectFrameContext : public ShapeContext { public: - GraphicalObjectFrameContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ); + GraphicalObjectFrameContext( ::oox::core::ContextHandler2Helper& rParent, const ShapePtr& pMasterShapePtr, const ShapePtr& pShapePtr, bool bEmbedShapesInChart ); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; virtual void onEndElement() override; @@ -59,7 +59,7 @@ private: class OleObjectGraphicDataContext : public ShapeContext { public: - OleObjectGraphicDataContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pShapePtr ); + OleObjectGraphicDataContext( ::oox::core::ContextHandler2Helper& rParent, const ShapePtr& pShapePtr ); virtual ~OleObjectGraphicDataContext() override; virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; @@ -72,7 +72,7 @@ class DiagramGraphicDataContext : public ShapeContext { public: - DiagramGraphicDataContext( ::oox::core::ContextHandler2Helper& rParent, ShapePtr pShapePtr ); + DiagramGraphicDataContext( ::oox::core::ContextHandler2Helper& rParent, const ShapePtr& pShapePtr ); virtual ~DiagramGraphicDataContext() override; virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; diff --git a/include/oox/ppt/pptgraphicshapecontext.hxx b/include/oox/ppt/pptgraphicshapecontext.hxx index 44b0438f6bc9..ba01f726c552 100644 --- a/include/oox/ppt/pptgraphicshapecontext.hxx +++ b/include/oox/ppt/pptgraphicshapecontext.hxx @@ -36,7 +36,7 @@ class PPTGraphicShapeContext : public ::oox::drawingml::GraphicShapeContext SlidePersistPtr mpSlidePersistPtr; public: - PPTGraphicShapeContext( ::oox::core::ContextHandler2Helper& rParent, const SlidePersistPtr& rSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ); + PPTGraphicShapeContext( ::oox::core::ContextHandler2Helper& rParent, const SlidePersistPtr& rSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr ); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; }; diff --git a/include/oox/ppt/pptshapecontext.hxx b/include/oox/ppt/pptshapecontext.hxx index f3a643f9f175..c58296ff0ccd 100644 --- a/include/oox/ppt/pptshapecontext.hxx +++ b/include/oox/ppt/pptshapecontext.hxx @@ -36,7 +36,7 @@ class PPTShapeContext : public ::oox::drawingml::ShapeContext SlidePersistPtr mpSlidePersistPtr; public: - PPTShapeContext( ::oox::core::ContextHandler2Helper& rParent, const SlidePersistPtr& rSlidePersistPtr, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr ); + PPTShapeContext( ::oox::core::ContextHandler2Helper& rParent, const SlidePersistPtr& rSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr ); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; }; diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx index 91d78e904b0c..011cdff62a86 100644 --- a/include/oox/ppt/pptshapegroupcontext.hxx +++ b/include/oox/ppt/pptshapegroupcontext.hxx @@ -47,8 +47,8 @@ public: ::oox::core::ContextHandler2Helper& rParent, const oox::ppt::SlidePersistPtr& rSlidePersistPtr, const oox::ppt::ShapeLocation eShapeLocation, - oox::drawingml::ShapePtr pMasterShapePtr, - oox::drawingml::ShapePtr pGroupShapePtr ); + const oox::drawingml::ShapePtr& pMasterShapePtr, + const oox::drawingml::ShapePtr& pGroupShapePtr ); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; diff --git a/include/oox/ppt/slidefragmenthandler.hxx b/include/oox/ppt/slidefragmenthandler.hxx index b6b4a3d57721..545a55bd1a56 100644 --- a/include/oox/ppt/slidefragmenthandler.hxx +++ b/include/oox/ppt/slidefragmenthandler.hxx @@ -37,7 +37,7 @@ namespace oox { namespace ppt { class SlideFragmentHandler : public ::oox::core::FragmentHandler2 { public: - SlideFragmentHandler( ::oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, SlidePersistPtr pPersistPtr, const ShapeLocation eShapeLocation ); + SlideFragmentHandler( ::oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, const SlidePersistPtr& pPersistPtr, const ShapeLocation eShapeLocation ); virtual ~SlideFragmentHandler() override; virtual void finalizeImport() override; diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx index c9db0cbf5a46..16106511a0b5 100644 --- a/include/svtools/svlbitm.hxx +++ b/include/svtools/svlbitm.hxx @@ -229,8 +229,8 @@ class SVT_DLLPUBLIC SvLBoxContextBmp : public SvLBoxItem { std::unique_ptr m_pImpl; public: - SvLBoxContextBmp(Image aBmp1, - Image aBmp2, + SvLBoxContextBmp(const Image& aBmp1, + const Image& aBmp2, bool bExpanded); SvLBoxContextBmp(); virtual ~SvLBoxContextBmp() override; diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx index e065eef242c5..2cb6569b8e53 100644 --- a/include/svx/cube3d.hxx +++ b/include/svx/cube3d.hxx @@ -77,7 +77,7 @@ protected: virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() override; public: - E3dCubeObj(E3dDefaultAttributes& rDefault, basegfx::B3DPoint aPos, const basegfx::B3DVector& r3DSize); + E3dCubeObj(E3dDefaultAttributes& rDefault, const basegfx::B3DPoint& aPos, const basegfx::B3DVector& r3DSize); E3dCubeObj(); virtual sal_uInt16 GetObjIdentifier() const override; diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx index 2edec77ae109..de413107903e 100644 --- a/include/vcl/uitest/uiobject.hxx +++ b/include/vcl/uitest/uiobject.hxx @@ -105,7 +105,7 @@ class UITEST_DLLPUBLIC WindowUIObject : public UIObject public: - WindowUIObject(VclPtr xWindow); + WindowUIObject(const VclPtr& xWindow); virtual StringMap get_state() override; @@ -138,7 +138,7 @@ class UITEST_DLLPUBLIC ButtonUIObject : public WindowUIObject VclPtr