diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-02 10:44:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-02 12:12:15 +0200 |
commit | c60ad041e8f48759062d652ca20216c424768fa4 (patch) | |
tree | 73f2839e672f91b4262d79fe88bc0b8af1c44ff4 /framework/source/uiconfiguration | |
parent | 826b0fc9aacbe58c998aec8ebba3401c0a68a015 (diff) |
clang-tidy modernize-pass-by-value in framework
Change-Id: I024653154c51389bb27f3e94b422ff7fc1c9b46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135296
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/uiconfiguration')
5 files changed, 23 insertions, 19 deletions
diff --git a/framework/source/uiconfiguration/globalsettings.cxx b/framework/source/uiconfiguration/globalsettings.cxx index b0b6f859c02c..0883cc8af197 100644 --- a/framework/source/uiconfiguration/globalsettings.cxx +++ b/framework/source/uiconfiguration/globalsettings.cxx @@ -29,6 +29,7 @@ #include <comphelper/propertysequence.hxx> #include <cppuhelper/implbase.hxx> #include <mutex> +#include <utility> // Defines @@ -48,7 +49,7 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper< css::lang::XEventListener> { public: - explicit GlobalSettings_Access( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); + explicit GlobalSettings_Access( css::uno::Reference< css::uno::XComponentContext > xContext ); // XComponent virtual void SAL_CALL dispose() override; @@ -78,14 +79,14 @@ class GlobalSettings_Access : public ::cppu::WeakImplHelper< } -GlobalSettings_Access::GlobalSettings_Access( const css::uno::Reference< css::uno::XComponentContext >& rxContext ) : +GlobalSettings_Access::GlobalSettings_Access( css::uno::Reference< css::uno::XComponentContext > xContext ) : m_bDisposed( false ), m_bConfigRead( false ), m_aNodeRefStates( "States" ), m_aPropStatesEnabled( "StatesEnabled" ), m_aPropLocked( "Locked" ), m_aPropDocked( "Docked" ), - m_xContext( rxContext ) + m_xContext(std::move( xContext )) { } @@ -226,8 +227,8 @@ static GlobalSettings_Access* GetGlobalSettings( const css::uno::Reference< css: return pStaticSettings.get(); } -GlobalSettings::GlobalSettings( const css::uno::Reference< css::uno::XComponentContext >& rxContext ) : - m_xContext( rxContext ) +GlobalSettings::GlobalSettings( css::uno::Reference< css::uno::XComponentContext > xContext ) : + m_xContext(std::move( xContext )) { } diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx index c60e7d3c1dd2..5211e79b96dc 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.cxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx @@ -18,6 +18,7 @@ */ #include "imagemanagerimpl.hxx" +#include <utility> #include <xml/imagesconfiguration.hxx> #include <uiconfiguration/imagetype.hxx> #include <uiconfiguration/graphicnameaccess.hxx> @@ -100,10 +101,10 @@ static GlobalImageList* getGlobalImageList( const uno::Reference< uno::XComponen return pGlobalImageList; } -CmdImageList::CmdImageList( const uno::Reference< uno::XComponentContext >& rxContext, const OUString& aModuleIdentifier ) : +CmdImageList::CmdImageList( uno::Reference< uno::XComponentContext > rxContext, OUString aModuleIdentifier ) : m_bInitialized(false), - m_aModuleIdentifier( aModuleIdentifier ), - m_xContext( rxContext ) + m_aModuleIdentifier(std::move( aModuleIdentifier )), + m_xContext(std::move( rxContext )) { } @@ -473,8 +474,8 @@ CmdImageList* ImageManagerImpl::implts_getDefaultImageList() return m_pDefaultImageList.get(); } -ImageManagerImpl::ImageManagerImpl( const uno::Reference< uno::XComponentContext >& rxContext,::cppu::OWeakObject* pOwner,bool _bUseGlobal ) : - m_xContext( rxContext ) +ImageManagerImpl::ImageManagerImpl( uno::Reference< uno::XComponentContext > xContext, ::cppu::OWeakObject* pOwner, bool _bUseGlobal ) : + m_xContext(std::move( xContext )) , m_pOwner(pOwner) , m_aResourceString( "private:resource/images/moduleimages" ) , m_bUseGlobal(_bUseGlobal) diff --git a/framework/source/uiconfiguration/imagemanagerimpl.hxx b/framework/source/uiconfiguration/imagemanagerimpl.hxx index 88f4a8349398..f36c9fff74c7 100644 --- a/framework/source/uiconfiguration/imagemanagerimpl.hxx +++ b/framework/source/uiconfiguration/imagemanagerimpl.hxx @@ -44,7 +44,7 @@ namespace framework class CmdImageList { public: - CmdImageList(const css::uno::Reference< css::uno::XComponentContext >& rxContext, const OUString& aModuleIdentifier); + CmdImageList(css::uno::Reference< css::uno::XComponentContext > xContext, OUString aModuleIdentifier); virtual ~CmdImageList(); virtual Image getImageFromCommandURL(vcl::ImageType nImageType, const OUString& rCommandURL); @@ -76,7 +76,7 @@ namespace framework class ImageManagerImpl { public: - ImageManagerImpl(const css::uno::Reference< css::uno::XComponentContext >& rxContext + ImageManagerImpl(css::uno::Reference< css::uno::XComponentContext > xContext ,::cppu::OWeakObject *pOwner ,bool _bUseGlobal); ~ImageManagerImpl(); diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 8e1e4dbb2660..93058358d04a 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -52,6 +52,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <sal/log.hxx> #include <comphelper/interfacecontainer4.hxx> @@ -155,8 +156,8 @@ private: struct UIElementInfo { - UIElementInfo( const OUString& rResourceURL, const OUString& rUIName ) : - aResourceURL( rResourceURL), aUIName( rUIName ) {} + UIElementInfo( OUString _aResourceURL, OUString _aUIName ) : + aResourceURL(std::move( _aResourceURL)), aUIName(std::move( _aUIName )) {} OUString aResourceURL; OUString aUIName; }; diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 3e7cbd74b44f..42f6269bf3ce 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -51,6 +51,7 @@ #include <comphelper/interfacecontainer4.hxx> #include <comphelper/sequence.hxx> #include <comphelper/servicehelper.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <sal/log.hxx> #include <o3tl/string_view.hxx> @@ -90,7 +91,7 @@ public: return {"com.sun.star.ui.UIConfigurationManager"}; } - explicit UIConfigurationManager( const css::uno::Reference< css::uno::XComponentContext > & rxContext ); + explicit UIConfigurationManager( css::uno::Reference< css::uno::XComponentContext > xContext ); // XComponent virtual void SAL_CALL dispose() override; @@ -136,8 +137,8 @@ private: struct UIElementInfo { - UIElementInfo( const OUString& rResourceURL, const OUString& rUIName ) : - aResourceURL( rResourceURL), aUIName( rUIName ) {} + UIElementInfo( OUString _aResourceURL, OUString _aUIName ) : + aResourceURL(std::move( _aResourceURL)), aUIName(std::move( _aUIName )) {} OUString aResourceURL; OUString aUIName; }; @@ -670,12 +671,12 @@ void UIConfigurationManager::impl_Initialize() } } -UIConfigurationManager::UIConfigurationManager( const css::uno::Reference< css::uno::XComponentContext > & rxContext ) : +UIConfigurationManager::UIConfigurationManager( css::uno::Reference< css::uno::XComponentContext > xContext ) : m_bReadOnly( true ) , m_bModified( false ) , m_bDisposed( false ) , m_aPropUIName( "UIName" ) - , m_xContext( rxContext ) + , m_xContext(std::move( xContext )) { // Make sure we have a default initialized entry for every layer and user interface element type! // The following code depends on this! |