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/uifactory | |
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/uifactory')
4 files changed, 13 insertions, 9 deletions
diff --git a/framework/source/uifactory/factoryconfiguration.cxx b/framework/source/uifactory/factoryconfiguration.cxx index a5fe31a7557b..047a6b6edb68 100644 --- a/framework/source/uifactory/factoryconfiguration.cxx +++ b/framework/source/uifactory/factoryconfiguration.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/container/XContainer.hpp> #include <comphelper/propertysequence.hxx> +#include <utility> // Defines @@ -53,12 +54,12 @@ static OUString getHashKeyFromStrings( // XInterface, XTypeProvider -ConfigurationAccess_ControllerFactory::ConfigurationAccess_ControllerFactory( const Reference< XComponentContext >& rxContext, const OUString& _sRoot ) : +ConfigurationAccess_ControllerFactory::ConfigurationAccess_ControllerFactory( const Reference< XComponentContext >& rxContext, OUString _sRoot ) : m_aPropCommand( "Command" ), m_aPropModule( "Module" ), m_aPropController( "Controller" ), m_aPropValue( "Value" ), - m_sRoot(_sRoot), + m_sRoot(std::move(_sRoot)), m_bConfigAccessInitialized( false ) { m_xConfigProvider = configuration::theDefaultProvider::get( rxContext ); diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx index 95c62a71afc5..febc33066852 100644 --- a/framework/source/uifactory/menubarfactory.cxx +++ b/framework/source/uifactory/menubarfactory.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <utility> #include <vcl/svapp.hxx> using namespace com::sun::star::uno; @@ -41,8 +42,8 @@ using namespace ::com::sun::star::ui; namespace framework { -MenuBarFactory::MenuBarFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext ) - : m_xContext( xContext ) +MenuBarFactory::MenuBarFactory( css::uno::Reference< css::uno::XComponentContext > xContext ) + : m_xContext(std::move( xContext )) { } diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx index f1cdea2e98ea..b8a8ea46ed9b 100644 --- a/framework/source/uifactory/uielementfactorymanager.cxx +++ b/framework/source/uifactory/uielementfactorymanager.cxx @@ -44,6 +44,7 @@ #include <comphelper/propertyvalue.hxx> #include <comphelper/compbase.hxx> #include <cppuhelper/supportsservice.hxx> +#include <utility> using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -63,12 +64,12 @@ static OUString getHashKeyFromStrings( std::u16string_view aType, std::u16string return OUString::Concat(aType) + "^" + aName + "^" + aModuleName; } -ConfigurationAccess_FactoryManager::ConfigurationAccess_FactoryManager( const Reference< XComponentContext >& rxContext, const OUString& _sRoot ) : +ConfigurationAccess_FactoryManager::ConfigurationAccess_FactoryManager( const Reference< XComponentContext >& rxContext, OUString _sRoot ) : m_aPropType( "Type" ), m_aPropName( "Name" ), m_aPropModule( "Module" ), m_aPropFactory( "FactoryImplementation" ), - m_sRoot(_sRoot), + m_sRoot(std::move(_sRoot)), m_bConfigAccessInitialized( false ) { m_xConfigProvider = theDefaultProvider::get( rxContext ); diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx index ed8b61527675..da52775ccfea 100644 --- a/framework/source/uifactory/windowcontentfactorymanager.cxx +++ b/framework/source/uifactory/windowcontentfactorymanager.cxx @@ -34,6 +34,7 @@ #include <comphelper/compbase.hxx> #include <cppuhelper/supportsservice.hxx> #include <rtl/ref.hxx> +#include <utility> #include <tools/diagnose_ex.h> using namespace ::com::sun::star; @@ -48,7 +49,7 @@ typedef comphelper::WeakComponentImplHelper< class WindowContentFactoryManager : public WindowContentFactoryManager_BASE { public: - explicit WindowContentFactoryManager( const css::uno::Reference< css::uno::XComponentContext>& rxContext ); + explicit WindowContentFactoryManager( css::uno::Reference< css::uno::XComponentContext> xContext ); virtual OUString SAL_CALL getImplementationName() override { @@ -77,8 +78,8 @@ private: rtl::Reference<ConfigurationAccess_FactoryManager> m_pConfigAccess; }; -WindowContentFactoryManager::WindowContentFactoryManager( const uno::Reference< uno::XComponentContext >& rxContext ) : - m_xContext( rxContext ), +WindowContentFactoryManager::WindowContentFactoryManager( uno::Reference< uno::XComponentContext > xContext ) : + m_xContext(std::move( xContext )), m_bConfigRead( false ), m_pConfigAccess( new ConfigurationAccess_FactoryManager( |