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/jobs | |
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/jobs')
-rw-r--r-- | framework/source/jobs/helponstartup.cxx | 5 | ||||
-rw-r--r-- | framework/source/jobs/job.cxx | 9 | ||||
-rw-r--r-- | framework/source/jobs/jobdata.cxx | 5 | ||||
-rw-r--r-- | framework/source/jobs/jobdispatch.cxx | 7 | ||||
-rw-r--r-- | framework/source/jobs/shelljob.cxx | 5 |
5 files changed, 18 insertions, 13 deletions
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx index de7f787223c0..2795a3f45057 100644 --- a/framework/source/jobs/helponstartup.cxx +++ b/framework/source/jobs/helponstartup.cxx @@ -27,6 +27,7 @@ // include others #include <comphelper/sequenceashashmap.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/help.hxx> @@ -56,8 +57,8 @@ css::uno::Sequence< OUString > SAL_CALL HelpOnStartup::getSupportedServiceNames( return { SERVICENAME_JOB }; } -HelpOnStartup::HelpOnStartup(const css::uno::Reference< css::uno::XComponentContext >& xContext) - : m_xContext (xContext) +HelpOnStartup::HelpOnStartup(css::uno::Reference< css::uno::XComponentContext > xContext) + : m_xContext (std::move(xContext)) { // create some needed uno services and cache it m_xModuleManager = css::frame::ModuleManager::create( m_xContext ); diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index d2d9403e4ab2..726c037cf37e 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -32,6 +32,7 @@ #include <comphelper/sequence.hxx> #include <sal/log.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/svapp.hxx> namespace framework{ @@ -50,10 +51,10 @@ namespace framework{ (May be null!) */ Job::Job( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext , - /*IN*/ const css::uno::Reference< css::frame::XFrame >& xFrame ) + /*IN*/ css::uno::Reference< css::frame::XFrame > xFrame ) : m_aJobCfg (xContext ) , m_xContext (xContext ) - , m_xFrame (xFrame ) + , m_xFrame (std::move(xFrame )) , m_bListenOnDesktop (false ) , m_bListenOnFrame (false ) , m_bListenOnModel (false ) @@ -77,10 +78,10 @@ Job::Job( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xCont (May be null!) */ Job::Job( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext , - /*IN*/ const css::uno::Reference< css::frame::XModel >& xModel ) + /*IN*/ css::uno::Reference< css::frame::XModel > xModel ) : m_aJobCfg (xContext ) , m_xContext (xContext ) - , m_xModel (xModel ) + , m_xModel (std::move(xModel )) , m_bListenOnDesktop (false ) , m_bListenOnFrame (false ) , m_bListenOnModel (false ) diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index aad2bfcd4118..863bc8c4b4ca 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -32,6 +32,7 @@ #include <tools/wldcrd.hxx> #include <unotools/configpaths.hxx> +#include <utility> #include <vcl/svapp.hxx> namespace framework{ @@ -45,8 +46,8 @@ namespace framework{ @param rxContext reference to the uno service manager */ -JobData::JobData( const css::uno::Reference< css::uno::XComponentContext >& rxContext ) - : m_xContext (rxContext ) +JobData::JobData( css::uno::Reference< css::uno::XComponentContext > xContext ) + : m_xContext (std::move(xContext )) { // share code for member initialization with defaults! impl_reset(); diff --git a/framework/source/jobs/jobdispatch.cxx b/framework/source/jobs/jobdispatch.cxx index e32f65123375..d1e227b9a55a 100644 --- a/framework/source/jobs/jobdispatch.cxx +++ b/framework/source/jobs/jobdispatch.cxx @@ -36,6 +36,7 @@ #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/implbase.hxx> #include <rtl/ref.hxx> +#include <utility> #include <vcl/svapp.hxx> using namespace framework; @@ -73,7 +74,7 @@ private: public: - explicit JobDispatch(const css::uno::Reference< css::uno::XComponentContext >& xContext); + explicit JobDispatch(css::uno::Reference< css::uno::XComponentContext > xContext); virtual ~JobDispatch() override; void impl_dispatchEvent ( const OUString& sEvent , @@ -132,8 +133,8 @@ public: @param xContext reference to the uno service manager */ -JobDispatch::JobDispatch( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xContext ) - : m_xContext (xContext ) +JobDispatch::JobDispatch( /*IN*/ css::uno::Reference< css::uno::XComponentContext > xContext ) + : m_xContext (std::move(xContext )) { } diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx index 8b8036cf6ea2..0c895db33f71 100644 --- a/framework/source/jobs/shelljob.cxx +++ b/framework/source/jobs/shelljob.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/util/PathSubstitution.hpp> #include <com/sun/star/util/XStringSubstitution.hpp> #include <cppuhelper/supportsservice.hxx> +#include <utility> namespace framework{ @@ -55,8 +56,8 @@ css::uno::Sequence< OUString > SAL_CALL ShellJob::getSupportedServiceNames() } -ShellJob::ShellJob(const css::uno::Reference< css::uno::XComponentContext >& xContext) - : m_xContext (xContext) +ShellJob::ShellJob(css::uno::Reference< css::uno::XComponentContext > xContext) + : m_xContext (std::move(xContext)) { } |