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>
This commit is contained in:
Noel Grandin 2022-06-21 08:54:11 +02:00
parent 7c9d99a5cb
commit 5b3337e50e
6 changed files with 21 additions and 18 deletions

View file

@ -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 )

View file

@ -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 ),

View file

@ -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 );

View file

@ -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;

View file

@ -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

View file

@ -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 )