diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-21 08:54:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-21 10:37:43 +0200 |
commit | 5b3337e50e4480fe385a23a58ddbd6709de714be (patch) | |
tree | 17ae3f20b45b5dba26eb23d9e771886fb8dab725 | |
parent | 7c9d99a5cb2702e478f719bfa8167952293c2793 (diff) |
clang-tidy modernize-pass-by-value in embeddedobj
Change-Id: I5ed8591a3c3ae58d5ddf921814b8d7a373f9c76e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136202
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | embeddedobj/source/commonembedding/miscobj.cxx | 9 | ||||
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 5 | ||||
-rw-r--r-- | embeddedobj/source/inc/commonembobj.hxx | 4 | ||||
-rw-r--r-- | embeddedobj/source/inc/docholder.hxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/inc/oleembobj.hxx | 6 | ||||
-rw-r--r-- | embeddedobj/source/msole/olemisc.cxx | 13 |
6 files changed, 21 insertions, 18 deletions
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 0b15376c2535..70aefa9c348b 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -35,6 +35,7 @@ #include <cppuhelper/queryinterface.hxx> #include <comphelper/mimeconfighelper.hxx> +#include <utility> #include <vcl/weld.hxx> #include <unotools/resmgr.hxx> #include <vcl/stdtext.hxx> @@ -54,7 +55,7 @@ using namespace ::com::sun::star; -OCommonEmbeddedObject::OCommonEmbeddedObject( const uno::Reference< uno::XComponentContext >& rxContext, +OCommonEmbeddedObject::OCommonEmbeddedObject( uno::Reference< uno::XComponentContext > xContext, const uno::Sequence< beans::NamedValue >& aObjProps ) : m_bReadOnly( false ) , m_bDisposed( false ) @@ -62,7 +63,7 @@ OCommonEmbeddedObject::OCommonEmbeddedObject( const uno::Reference< uno::XCompon , m_nObjectState( -1 ) , m_nTargetState( -1 ) , m_nUpdateMode ( embed::EmbedUpdateModes::ALWAYS_UPDATE ) -, m_xContext( rxContext ) +, m_xContext(std::move( xContext )) , m_nMiscStatus( 0 ) , m_bEmbeddedScriptSupport( true ) , m_bDocumentRecoverySupport( true ) @@ -82,7 +83,7 @@ OCommonEmbeddedObject::OCommonEmbeddedObject( const uno::Reference< uno::XCompon OCommonEmbeddedObject::OCommonEmbeddedObject( - const uno::Reference< uno::XComponentContext >& rxContext, + uno::Reference< uno::XComponentContext > xContext, const uno::Sequence< beans::NamedValue >& aObjProps, const uno::Sequence< beans::PropertyValue >& aMediaDescr, const uno::Sequence< beans::PropertyValue >& aObjectDescr ) @@ -92,7 +93,7 @@ OCommonEmbeddedObject::OCommonEmbeddedObject( , m_nObjectState( embed::EmbedStates::LOADED ) , m_nTargetState( -1 ) , m_nUpdateMode ( embed::EmbedUpdateModes::ALWAYS_UPDATE ) -, m_xContext( rxContext ) +, m_xContext(std::move( xContext )) , m_nMiscStatus( 0 ) , m_bEmbeddedScriptSupport( true ) , m_bDocumentRecoverySupport( true ) diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index ee1a8dfa6ad1..fe48ec5b2d45 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -57,6 +57,7 @@ #include <com/sun/star/embed/EmbedMisc.hpp> #include <com/sun/star/embed/EmbedStates.hpp> #include <osl/diagnose.h> +#include <utility> #include <vcl/svapp.hxx> #include <unotools/resmgr.hxx> #include <sfx2/strings.hrc> @@ -148,10 +149,10 @@ static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >& } -DocumentHolder::DocumentHolder( const uno::Reference< uno::XComponentContext >& xContext, +DocumentHolder::DocumentHolder( uno::Reference< uno::XComponentContext > xContext, OCommonEmbeddedObject* pEmbObj ) : m_pEmbedObj( pEmbObj ), - m_xContext( xContext ), + m_xContext(std::move( xContext )), m_bReadOnly( false ), m_bWaitForClose( false ), m_bAllowClosing( false ), diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx index 4f641737b468..8f0a685c22c3 100644 --- a/embeddedobj/source/inc/commonembobj.hxx +++ b/embeddedobj/source/inc/commonembobj.hxx @@ -253,12 +253,12 @@ private: public: OCommonEmbeddedObject( - const css::uno::Reference< css::uno::XComponentContext >& rxContext, + css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Sequence< css::beans::NamedValue >& aObjectProps ); // no persistence for linked objects, so the descriptors are provided in constructor OCommonEmbeddedObject( - const css::uno::Reference< css::uno::XComponentContext >& rxContext, + css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Sequence< css::beans::NamedValue >& aObjectProps, const css::uno::Sequence< css::beans::PropertyValue >& aMediaDescr, const css::uno::Sequence< css::beans::PropertyValue >& aObjectDescr ); diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index 303fb4c97d10..703cab75754a 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.hxx @@ -112,7 +112,7 @@ public: const css::uno::Reference< css::frame::XDispatchProvider >& xOwnDisp ); - DocumentHolder( const css::uno::Reference< css::uno::XComponentContext >& xContext, + DocumentHolder( css::uno::Reference< css::uno::XComponentContext > xContext, OCommonEmbeddedObject* pEmbObj ); virtual ~DocumentHolder() override; diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index e456f2fc31a4..a59a33551f06 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.hxx @@ -292,13 +292,13 @@ protected: public: // in case a new object must be created the class ID must be specified - OleEmbeddedObject( const css::uno::Reference< css::uno::XComponentContext >& xContext, + OleEmbeddedObject( css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Sequence< sal_Int8 >& aClassID, - const OUString& aClassName ); + OUString aClassName ); // in case object will be loaded from a persistent entry or from a file the class ID will be detected on loading // factory can do it for OOo objects, but for OLE objects OS dependent code is required - OleEmbeddedObject( const css::uno::Reference< css::uno::XComponentContext >& xContext, + OleEmbeddedObject( css::uno::Reference< css::uno::XComponentContext > xContext, bool bLink ); #ifdef _WIN32 // this constructor let object be initialized from clipboard diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index e1007fbb13cc..6d371d428fd6 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -34,6 +34,7 @@ #include <osl/diagnose.h> #include <oleembobj.hxx> +#include <utility> #include "olepersist.hxx" #include "ownview.hxx" @@ -43,17 +44,17 @@ using namespace ::com::sun::star; -OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< uno::XComponentContext >& xContext, +OleEmbeddedObject::OleEmbeddedObject( uno::Reference< uno::XComponentContext > xContext, const uno::Sequence< sal_Int8 >& aClassID, - const OUString& aClassName ) + OUString aClassName ) : m_bReadOnly( false ) , m_bDisposed( false ) , m_nObjectState( -1 ) , m_nTargetState( -1 ) , m_nUpdateMode ( embed::EmbedUpdateModes::ALWAYS_UPDATE ) -, m_xContext( xContext ) +, m_xContext(std::move( xContext )) , m_aClassID( aClassID ) -, m_aClassName( aClassName ) +, m_aClassName(std::move( aClassName )) , m_bWaitSaveCompleted( false ) , m_bNewVisReplInStream( true ) , m_bStoreLoaded( false ) @@ -76,13 +77,13 @@ OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< uno::XComponentConte // In case of loading from persistent entry the classID of the object // will be retrieved from the entry, during construction it is unknown -OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< uno::XComponentContext >& xContext, bool bLink ) +OleEmbeddedObject::OleEmbeddedObject( uno::Reference< uno::XComponentContext > xContext, bool bLink ) : m_bReadOnly( false ) , m_bDisposed( false ) , m_nObjectState( -1 ) , m_nTargetState( -1 ) , m_nUpdateMode( embed::EmbedUpdateModes::ALWAYS_UPDATE ) -, m_xContext( xContext ) +, m_xContext(std::move( xContext )) , m_bWaitSaveCompleted( false ) , m_bNewVisReplInStream( true ) , m_bStoreLoaded( false ) |