summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-28 10:48:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-28 12:43:04 +0200
commit86ec14169cd0811a1ce8ee1e32cd7cad43cb0653 (patch)
tree7685f6bb7644bfbf9c8a7199a0d3ed505d5fbf17
parentclang-tidy modernize-pass-by-value in test (diff)
downloadcore-86ec14169cd0811a1ce8ee1e32cd7cad43cb0653.tar.gz
core-86ec14169cd0811a1ce8ee1e32cd7cad43cb0653.zip
clang-tidy modernize-pass-by-value in vbahelper
Change-Id: I7f2a7dd3e8f0a791496f5e021bd802dba89d7643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/vbahelper/vbacollectionimpl.hxx13
-rw-r--r--include/vbahelper/vbadialogbase.hxx3
-rw-r--r--include/vbahelper/vbadialogsbase.hxx3
-rw-r--r--include/vbahelper/vbadocumentbase.hxx2
-rw-r--r--include/vbahelper/vbahelper.hxx2
-rw-r--r--include/vbahelper/vbahelperinterface.hxx3
-rw-r--r--include/vbahelper/vbashape.hxx2
-rw-r--r--include/vbahelper/vbashaperange.hxx2
-rw-r--r--include/vbahelper/vbashapes.hxx2
-rw-r--r--include/vbahelper/vbatextframe.hxx2
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx7
-rw-r--r--vbahelper/source/msforms/vbacontrol.hxx2
-rw-r--r--vbahelper/source/msforms/vbacontrols.cxx21
-rw-r--r--vbahelper/source/msforms/vbacontrols.hxx2
-rw-r--r--vbahelper/source/msforms/vbaframe.cxx5
-rw-r--r--vbahelper/source/msforms/vbaframe.hxx2
-rw-r--r--vbahelper/source/msforms/vbalistcontrolhelper.cxx5
-rw-r--r--vbahelper/source/msforms/vbalistcontrolhelper.hxx3
-rw-r--r--vbahelper/source/vbahelper/vbacommandbar.cxx13
-rw-r--r--vbahelper/source/vbahelper/vbacommandbar.hxx4
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.cxx3
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrol.hxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrols.cxx3
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarcontrols.hxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx3
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.hxx2
-rw-r--r--vbahelper/source/vbahelper/vbacommandbars.cxx3
-rw-r--r--vbahelper/source/vbahelper/vbadocumentbase.cxx3
-rw-r--r--vbahelper/source/vbahelper/vbadocumentsbase.cxx7
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx5
-rw-r--r--vbahelper/source/vbahelper/vbapictureformat.cxx6
-rw-r--r--vbahelper/source/vbahelper/vbapictureformat.hxx2
-rw-r--r--vbahelper/source/vbahelper/vbashape.cxx5
-rw-r--r--vbahelper/source/vbahelper/vbashaperange.cxx5
-rw-r--r--vbahelper/source/vbahelper/vbashapes.cxx5
-rw-r--r--vbahelper/source/vbahelper/vbatextframe.cxx3
36 files changed, 90 insertions, 67 deletions
diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx
index 7b3af3e55511..90bfb51d59a5 100644
--- a/include/vbahelper/vbacollectionimpl.hxx
+++ b/include/vbahelper/vbacollectionimpl.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_VBAHELPER_VBACOLLECTIONIMPL_HXX
#include <exception>
+#include <utility>
#include <vector>
#include <com/sun/star/container/NoSuchElementException.hpp>
@@ -71,8 +72,8 @@ class VBAHELPER_DLLPUBLIC SimpleIndexAccessToEnumeration final : public Enumerat
public:
/// @throws css::uno::RuntimeException
explicit SimpleIndexAccessToEnumeration(
- const css::uno::Reference< css::container::XIndexAccess >& rxIndexAccess ) :
- mxIndexAccess( rxIndexAccess ), mnIndex( 0 ) {}
+ css::uno::Reference< css::container::XIndexAccess > xIndexAccess ) :
+ mxIndexAccess(std::move( xIndexAccess )), mnIndex( 0 ) {}
virtual sal_Bool SAL_CALL hasMoreElements() override
{
@@ -135,7 +136,7 @@ protected:
css::uno::Reference< css::container::XEnumeration > m_xEnumeration;
public:
/// @throws css::uno::RuntimeException
- EnumerationHelperImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XEnumeration >& xEnumeration ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) { }
+ EnumerationHelperImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::container::XEnumeration > xEnumeration ) : m_xParent( xParent ), m_xContext(std::move( xContext )), m_xEnumeration(std::move( xEnumeration )) { }
virtual sal_Bool SAL_CALL hasMoreElements( ) override { return m_xEnumeration->hasMoreElements(); }
};
@@ -157,7 +158,7 @@ private:
XNamedVec mXNamedVec;
typename XNamedVec::iterator mIt;
public:
- XNamedEnumerationHelper( const XNamedVec& sMap ) : mXNamedVec( sMap ), mIt( mXNamedVec.begin() ) {}
+ XNamedEnumerationHelper( XNamedVec sMap ) : mXNamedVec(std::move( sMap )), mIt( mXNamedVec.begin() ) {}
virtual sal_Bool SAL_CALL hasMoreElements( ) override
{
@@ -175,7 +176,7 @@ private:
XNamedVec mXNamedVec;
typename XNamedVec::iterator cachePos;
public:
- XNamedObjectCollectionHelper( const XNamedVec& sMap ) : mXNamedVec( sMap ), cachePos(mXNamedVec.begin()) {}
+ XNamedObjectCollectionHelper( XNamedVec sMap ) : mXNamedVec(std::move( sMap )), cachePos(mXNamedVec.begin()) {}
// XElementAccess
virtual css::uno::Type SAL_CALL getElementType( ) override { return cppu::UnoType< OneIfc >::get(); }
virtual sal_Bool SAL_CALL hasElements( ) override { return ( mXNamedVec.size() > 0 ); }
@@ -283,7 +284,7 @@ protected:
}
public:
- ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, bool bIgnoreCase = false ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ), mbIgnoreCase( bIgnoreCase ) { m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
+ ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::container::XIndexAccess > xIndexAccess, bool bIgnoreCase = false ) : BaseColBase( xParent, xContext ), m_xIndexAccess(std::move( xIndexAccess )), mbIgnoreCase( bIgnoreCase ) { m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); }
//XCollection
virtual ::sal_Int32 SAL_CALL getCount() override
diff --git a/include/vbahelper/vbadialogbase.hxx b/include/vbahelper/vbadialogbase.hxx
index 3125e5da2d59..751429cd4531 100644
--- a/include/vbahelper/vbadialogbase.hxx
+++ b/include/vbahelper/vbadialogbase.hxx
@@ -27,6 +27,7 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <vbahelper/vbadllapi.h>
+#include <utility>
#include <vbahelper/vbahelper.hxx>
#include <vbahelper/vbahelperinterface.hxx>
@@ -48,7 +49,7 @@ protected:
sal_Int32 mnIndex;
css::uno::Reference< css::frame::XModel > m_xModel;
public:
- VbaDialogBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nIndex ):VbaDialogBase_BASE( xParent, xContext ), mnIndex( nIndex ), m_xModel( xModel ) {}
+ VbaDialogBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::frame::XModel > xModel, sal_Int32 nIndex ):VbaDialogBase_BASE( xParent, xContext ), mnIndex( nIndex ), m_xModel(std::move( xModel )) {}
// Methods
virtual void SAL_CALL Show() override;
diff --git a/include/vbahelper/vbadialogsbase.hxx b/include/vbahelper/vbadialogsbase.hxx
index 9b04b40cf906..6f44d825bec9 100644
--- a/include/vbahelper/vbadialogsbase.hxx
+++ b/include/vbahelper/vbadialogsbase.hxx
@@ -27,6 +27,7 @@
#include <ooo/vba/XDialogsBase.hpp>
#include <sal/types.h>
#include <vbahelper/vbadllapi.h>
+#include <utility>
#include <vbahelper/vbahelper.hxx>
#include <vbahelper/vbahelperinterface.hxx>
@@ -47,7 +48,7 @@ class VBAHELPER_DLLPUBLIC VbaDialogsBase : public VbaDialogsBase_BASE
protected:
css::uno::Reference< css::frame::XModel > m_xModel;
public:
- VbaDialogsBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, const css::uno::Reference< css::frame::XModel >& xModel ): VbaDialogsBase_BASE( xParent, xContext ), m_xModel( xModel ) {}
+ VbaDialogsBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::frame::XModel > xModel ): VbaDialogsBase_BASE( xParent, xContext ), m_xModel(std::move( xModel )) {}
// XCollection
virtual ::sal_Int32 SAL_CALL getCount() override;
diff --git a/include/vbahelper/vbadocumentbase.hxx b/include/vbahelper/vbadocumentbase.hxx
index 60a0bbed9158..c26ae30d8188 100644
--- a/include/vbahelper/vbadocumentbase.hxx
+++ b/include/vbahelper/vbadocumentbase.hxx
@@ -54,7 +54,7 @@ protected:
const css::uno::Reference< css::frame::XModel >& getModel() const { return mxModel; }
public:
VbaDocumentBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
- css::uno::Reference< css::frame::XModel > const & xModel );
+ css::uno::Reference< css::frame::XModel > xModel );
VbaDocumentBase( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext );
// Attributes
diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx
index fd4549cf99a8..07c5fce6ec6b 100644
--- a/include/vbahelper/vbahelper.hxx
+++ b/include/vbahelper/vbahelper.hxx
@@ -178,7 +178,7 @@ class VBAHELPER_DLLPUBLIC ShapeHelper
public:
/// @throws css::script::BasicErrorException
/// @throws css::uno::RuntimeException
- ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape);
+ ShapeHelper( css::uno::Reference< css::drawing::XShape > _xShape);
double getHeight() const;
void setHeight(double _fheight);
diff --git a/include/vbahelper/vbahelperinterface.hxx b/include/vbahelper/vbahelperinterface.hxx
index c7fb615b1f5a..315fcd4f900b 100644
--- a/include/vbahelper/vbahelperinterface.hxx
+++ b/include/vbahelper/vbahelperinterface.hxx
@@ -30,6 +30,7 @@
#include <ooo/vba/XHelperInterface.hpp>
#include <rtl/ustring.hxx>
#include <sal/types.h>
+#include <utility>
#include <vbahelper/vbahelper.hxx>
// use this class when you have an object like
@@ -66,7 +67,7 @@ protected:
css::uno::WeakReference< ov::XHelperInterface > mxParent;
css::uno::Reference< css::uno::XComponentContext > mxContext;
public:
- InheritedHelperInterfaceImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) : mxParent( xParent ), mxContext( xContext ) {}
+ InheritedHelperInterfaceImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, css::uno::Reference< css::uno::XComponentContext > xContext ) : mxParent( xParent ), mxContext(std::move( xContext )) {}
virtual OUString getServiceImplName() = 0;
virtual css::uno::Sequence<OUString> getServiceNames() = 0;
diff --git a/include/vbahelper/vbashape.hxx b/include/vbahelper/vbashape.hxx
index d6a79968bbfb..11ac68780193 100644
--- a/include/vbahelper/vbashape.hxx
+++ b/include/vbahelper/vbashape.hxx
@@ -76,7 +76,7 @@ protected:
public:
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
- ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nType );
+ ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > xShape, css::uno::Reference< css::drawing::XShapes > xShapes, css::uno::Reference< css::frame::XModel > xModel, sal_Int32 nType );
virtual ~ScVbaShape() override;
/// @throws css::uno::RuntimeException
diff --git a/include/vbahelper/vbashaperange.hxx b/include/vbahelper/vbashaperange.hxx
index 54a052cac0dd..dfcca6c82549 100644
--- a/include/vbahelper/vbashaperange.hxx
+++ b/include/vbahelper/vbashaperange.hxx
@@ -62,7 +62,7 @@ private:
/// @throws css::uno::RuntimeException
css::uno::Reference< css::drawing::XShapes > const & getShapes() ;
public:
- ScVbaShapeRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape, const css::uno::Reference< css::frame::XModel >& xModel );
+ ScVbaShapeRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, css::uno::Reference< css::drawing::XDrawPage> xDrawShape, css::uno::Reference< css::frame::XModel > xModel );
// Methods
virtual void SAL_CALL Select( ) override;
diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx
index 16d40566a686..7131d8118031 100644
--- a/include/vbahelper/vbashapes.hxx
+++ b/include/vbahelper/vbashapes.hxx
@@ -77,7 +77,7 @@ private:
//css::awt::Point calculateTopLeftMargin( css::uno::Reference< ov::XHelperInterface > xDocument );
public:
- ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel );
+ ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, css::uno::Reference< css::frame::XModel > xModel );
/// @throws css::uno::RuntimeException
static void setDefaultShapeProperties( const css::uno::Reference< css::drawing::XShape >& xShape );
static void setShape_NameProperty( const css::uno::Reference< css::drawing::XShape >& xShape, const OUString& sName );
diff --git a/include/vbahelper/vbatextframe.hxx b/include/vbahelper/vbatextframe.hxx
index a93c511a8a39..3c8651bc4704 100644
--- a/include/vbahelper/vbatextframe.hxx
+++ b/include/vbahelper/vbatextframe.hxx
@@ -56,7 +56,7 @@ protected:
sal_Int32 getMargin( const OUString& sMarginType );
void setMargin( const OUString& sMarginType, float fMargin );
public:
- VbaTextFrame( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext , css::uno::Reference< css::drawing::XShape > const & xShape);
+ VbaTextFrame( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext , css::uno::Reference< css::drawing::XShape > xShape);
// Attributes
virtual sal_Bool SAL_CALL getAutoSize() override;
virtual void SAL_CALL setAutoSize( sal_Bool _autosize ) override;
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 5cbea01a4dd3..8dd5363d59d7 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -60,6 +60,7 @@
#include <svx/svdobj.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <utility>
using namespace com::sun::star;
using namespace ooo::vba;
@@ -125,8 +126,8 @@ ScVbaControlListener::disposing( const lang::EventObject& )
//ScVbaControl
-ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< ::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
- : ControlImpl_BASE( xParent, xContext ), m_xControl( xControl ), m_xModel( xModel )
+ScVbaControl::ScVbaControl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< ::uno::XInterface > xControl, css::uno::Reference< css::frame::XModel > xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper )
+ : ControlImpl_BASE( xParent, xContext ), m_xControl(std::move( xControl )), m_xModel(std::move( xModel ))
{
//add listener
m_xEventListener.set( new ScVbaControlListener( this ) );
@@ -755,7 +756,7 @@ class ControlProviderImpl : public cppu::WeakImplHelper< XControlProvider, css::
{
uno::Reference< uno::XComponentContext > m_xCtx;
public:
- explicit ControlProviderImpl( const uno::Reference< uno::XComponentContext >& xCtx ) : m_xCtx( xCtx ) {}
+ explicit ControlProviderImpl( uno::Reference< uno::XComponentContext > xCtx ) : m_xCtx(std::move( xCtx )) {}
virtual uno::Reference< msforms::XControl > SAL_CALL createControl( const uno::Reference< drawing::XControlShape >& xControl, const uno::Reference< frame::XModel >& xDocOwner ) override;
// XServiceInfo
diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx
index e96cd5fa9730..033db5351733 100644
--- a/vbahelper/source/msforms/vbacontrol.hxx
+++ b/vbahelper/source/msforms/vbacontrol.hxx
@@ -55,7 +55,7 @@ protected:
void fireClickEvent();
public:
ScVbaControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const css::uno::Reference< css::uno::XInterface >& xControl, const css::uno::Reference< css::frame::XModel >& xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pHelper );
+ css::uno::Reference< css::uno::XInterface > xControl, css::uno::Reference< css::frame::XModel > xModel, std::unique_ptr<ov::AbstractGeometryAttributes> pHelper );
virtual ~ScVbaControl() override;
// This class will own the helper, so make sure it is allocated from
// the heap
diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx
index a1dc6b6eea8e..0af1df0963ae 100644
--- a/vbahelper/source/msforms/vbacontrols.cxx
+++ b/vbahelper/source/msforms/vbacontrols.cxx
@@ -34,6 +34,7 @@
#include <cppuhelper/implbase.hxx>
#include <o3tl/safeint.hxx>
#include <unordered_map>
+#include <utility>
using namespace com::sun::star;
using namespace ooo::vba;
@@ -156,15 +157,15 @@ class ControlsEnumWrapper : public EnumerationHelper_BASE
public:
ControlsEnumWrapper(
- const uno::Reference< uno::XComponentContext >& xContext,
- const uno::Reference< container::XIndexAccess >& xIndexAccess,
- const uno::Reference< awt::XControl >& xDlg,
- const uno::Reference< frame::XModel >& xModel,
+ uno::Reference< uno::XComponentContext > xContext,
+ uno::Reference< container::XIndexAccess > xIndexAccess,
+ uno::Reference< awt::XControl > xDlg,
+ uno::Reference< frame::XModel > xModel,
double fOffsetX, double fOffsetY ) :
- m_xContext( xContext),
- m_xIndexAccess( xIndexAccess ),
- m_xDlg( xDlg ),
- m_xModel( xModel ),
+ m_xContext(std::move( xContext)),
+ m_xIndexAccess(std::move( xIndexAccess )),
+ m_xDlg(std::move( xDlg )),
+ m_xModel(std::move( xModel )),
mfOffsetX( fOffsetX ),
mfOffsetY( fOffsetY ),
nIndex( 0 ) {}
@@ -203,11 +204,11 @@ ScVbaControls::ScVbaControls(
const uno::Reference< XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
const css::uno::Reference< awt::XControl >& xDialog,
- const uno::Reference< frame::XModel >& xModel,
+ uno::Reference< frame::XModel > xModel,
double fOffsetX, double fOffsetY ) :
ControlsImpl_BASE( xParent, xContext, lcl_controlsWrapper( xDialog ) ),
mxDialog( xDialog ),
- mxModel( xModel ),
+ mxModel(std::move( xModel )),
mfOffsetX( fOffsetX ),
mfOffsetY( fOffsetY )
{
diff --git a/vbahelper/source/msforms/vbacontrols.hxx b/vbahelper/source/msforms/vbacontrols.hxx
index 1e9d95042633..42f953e90737 100644
--- a/vbahelper/source/msforms/vbacontrols.hxx
+++ b/vbahelper/source/msforms/vbacontrols.hxx
@@ -34,7 +34,7 @@ public:
const css::uno::Reference< ov::XHelperInterface >& xParent,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::awt::XControl >& xDialog,
- const css::uno::Reference< css::frame::XModel >& xModel,
+ css::uno::Reference< css::frame::XModel > xModel,
double fOffsetX, double fOffsetY );
// XControls
virtual void SAL_CALL Move( double cx, double cy ) override;
diff --git a/vbahelper/source/msforms/vbaframe.cxx b/vbahelper/source/msforms/vbaframe.cxx
index 88ca093d301a..12a005bb3bd0 100644
--- a/vbahelper/source/msforms/vbaframe.cxx
+++ b/vbahelper/source/msforms/vbaframe.cxx
@@ -22,6 +22,7 @@
#include "vbacontrols.hxx"
#include <ooo/vba/msforms/fmBorderStyle.hpp>
#include <ooo/vba/msforms/fmSpecialEffect.hpp>
+#include <utility>
using namespace com::sun::star;
using namespace ooo::vba;
@@ -32,9 +33,9 @@ ScVbaFrame::ScVbaFrame(
const uno::Reference< uno::XInterface >& xControl,
const uno::Reference< frame::XModel >& xModel,
std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper,
- const css::uno::Reference< css::awt::XControl >& xDialog ) :
+ css::uno::Reference< css::awt::XControl > xDialog ) :
FrameImpl_BASE( xParent, xContext, xControl, xModel, std::move(pGeomHelper) ),
- mxDialog( xDialog )
+ mxDialog(std::move( xDialog ))
{
}
diff --git a/vbahelper/source/msforms/vbaframe.hxx b/vbahelper/source/msforms/vbaframe.hxx
index 354858a277ec..bb87dd07e132 100644
--- a/vbahelper/source/msforms/vbaframe.hxx
+++ b/vbahelper/source/msforms/vbaframe.hxx
@@ -37,7 +37,7 @@ public:
const css::uno::Reference< css::uno::XInterface >& xControl,
const css::uno::Reference< css::frame::XModel >& xModel,
std::unique_ptr<ov::AbstractGeometryAttributes> pGeomHelper,
- const css::uno::Reference< css::awt::XControl >& xDialog );
+ css::uno::Reference< css::awt::XControl > xDialog );
// XFrame attributes
virtual OUString SAL_CALL getCaption() override;
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
index 71f5e2c42015..c5dc325c8258 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx
@@ -18,6 +18,7 @@
*/
#include "vbalistcontrolhelper.hxx"
+#include <utility>
#include <vector>
#include <vbahelper/vbapropvalue.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -36,7 +37,7 @@ private:
uno::Any m_pvarColumn;
public:
- ListPropListener( const uno::Reference< beans::XPropertySet >& xProps, const uno::Any& pvargIndex, const uno::Any& pvarColumn );
+ ListPropListener( uno::Reference< beans::XPropertySet > xProps, uno::Any pvargIndex, uno::Any varColumn );
virtual ~ListPropListener() { };
virtual void setValueEvent( const css::uno::Any& value ) override;
virtual css::uno::Any getValueEvent() override;
@@ -44,7 +45,7 @@ public:
}
-ListPropListener::ListPropListener( const uno::Reference< beans::XPropertySet >& xProps, const uno::Any& pvargIndex, const uno::Any& pvarColumn ) : m_xProps( xProps ), m_pvargIndex( pvargIndex ), m_pvarColumn( pvarColumn )
+ListPropListener::ListPropListener( uno::Reference< beans::XPropertySet > xProps, uno::Any vargIndex, uno::Any varColumn ) : m_xProps(std::move( xProps )), m_pvargIndex(std::move( vargIndex )), m_pvarColumn(std::move( varColumn ))
{
}
diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.hxx b/vbahelper/source/msforms/vbalistcontrolhelper.hxx
index e80ba3e857cb..34572bc0776c 100644
--- a/vbahelper/source/msforms/vbalistcontrolhelper.hxx
+++ b/vbahelper/source/msforms/vbalistcontrolhelper.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBALISTCONTROLHELPER_HXX
#define INCLUDED_VBAHELPER_SOURCE_MSFORMS_VBALISTCONTROLHELPER_HXX
+#include <utility>
#include <vbahelper/vbahelper.hxx>
class ListControlHelper final
@@ -27,7 +28,7 @@ class ListControlHelper final
css::uno::Reference< css::beans::XPropertySet > m_xProps;
public:
- explicit ListControlHelper( const css::uno::Reference< css::beans::XPropertySet >& rxControl ) : m_xProps( rxControl ){}
+ explicit ListControlHelper( css::uno::Reference< css::beans::XPropertySet > xControl ) : m_xProps(std::move( xControl )){}
/// @throws css::uno::RuntimeException
void AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex );
/// @throws css::uno::RuntimeException
diff --git a/vbahelper/source/vbahelper/vbacommandbar.cxx b/vbahelper/source/vbahelper/vbacommandbar.cxx
index ba8f9fe21b27..9df3dd9b0f2b 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.cxx
@@ -23,16 +23,17 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <ooo/vba/office/MsoBarType.hpp>
#include <sal/log.hxx>
+#include <utility>
using namespace com::sun::star;
using namespace ooo::vba;
ScVbaCommandBar::ScVbaCommandBar( const uno::Reference< ov::XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
- VbaCommandBarHelperRef const & pHelper,
- const uno::Reference< container::XIndexAccess >& xBarSettings,
- const OUString& sResourceUrl, bool bIsMenu )
- : CommandBar_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_xBarSettings( xBarSettings ), m_sResourceUrl( sResourceUrl ), m_bIsMenu( bIsMenu )
+ VbaCommandBarHelperRef pHelper,
+ uno::Reference< container::XIndexAccess > xBarSettings,
+ OUString sResourceUrl, bool bIsMenu )
+ : CommandBar_BASE( xParent, xContext ), pCBarHelper(std::move( pHelper )), m_xBarSettings(std::move( xBarSettings )), m_sResourceUrl(std::move( sResourceUrl )), m_bIsMenu( bIsMenu )
{
}
@@ -193,9 +194,9 @@ ScVbaCommandBar::getServiceNames()
VbaDummyCommandBar::VbaDummyCommandBar(
const uno::Reference< ov::XHelperInterface >& xParent,
const uno::Reference< uno::XComponentContext >& xContext,
- const OUString& rName ) :
+ OUString sName ) :
CommandBar_BASE( xParent, xContext ),
- maName( rName )
+ maName(std::move( sName ))
{
}
diff --git a/vbahelper/source/vbahelper/vbacommandbar.hxx b/vbahelper/source/vbahelper/vbacommandbar.hxx
index 8aa9675adb26..9ee5784f41e0 100644
--- a/vbahelper/source/vbahelper/vbacommandbar.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbar.hxx
@@ -36,7 +36,7 @@ private:
public:
/// @throws css::uno::RuntimeException
- ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, VbaCommandBarHelperRef const & pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, bool bIsMenu );
+ ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, VbaCommandBarHelperRef pHelper, css::uno::Reference< css::container::XIndexAccess > xBarSettings, OUString sResourceUrl, bool bIsMenu );
// Attributes
virtual OUString SAL_CALL getName() override;
@@ -65,7 +65,7 @@ public:
VbaDummyCommandBar(
const css::uno::Reference< ov::XHelperInterface >& xParent,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
- const OUString& rName );
+ OUString aName );
// Attributes
virtual OUString SAL_CALL getName() override;
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
index 2ab2794e4071..35c2925e4127 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
@@ -18,6 +18,7 @@
*/
#include "vbacommandbarcontrol.hxx"
#include "vbacommandbarcontrols.hxx"
+#include <utility>
#include <vbahelper/vbahelper.hxx>
#include <filter/msfilter/msvbahelper.hxx>
#include <sal/log.hxx>
@@ -25,7 +26,7 @@
using namespace com::sun::star;
using namespace ooo::vba;
-ScVbaCommandBarControl::ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) : CommandBarControl_BASE( xParent, xContext ), pCBarHelper( pHelper ), m_sResourceUrl( sResourceUrl ), m_xCurrentSettings( xSettings ), m_xBarSettings( xBarSettings ), m_nPosition( 0 )
+ScVbaCommandBarControl::ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::container::XIndexAccess > xSettings, VbaCommandBarHelperRef pHelper, css::uno::Reference< css::container::XIndexAccess > xBarSettings, OUString sResourceUrl ) : CommandBarControl_BASE( xParent, xContext ), pCBarHelper(std::move( pHelper )), m_sResourceUrl(std::move( sResourceUrl )), m_xCurrentSettings(std::move( xSettings )), m_xBarSettings(std::move( xBarSettings )), m_nPosition( 0 )
{
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
index 348518b5ba2e..4504e1d457a8 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx
@@ -47,7 +47,7 @@ private:
public:
/// @throws css::uno::RuntimeException
- ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl );
+ ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::container::XIndexAccess > xSettings, VbaCommandBarHelperRef pHelper, css::uno::Reference< css::container::XIndexAccess > xBarSettings, OUString sResourceUrl );
// Attributes
virtual OUString SAL_CALL getCaption() override;
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
index 27f2d5088559..e88f811fbafd 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx
@@ -22,6 +22,7 @@
#include <comphelper/propertyvalue.hxx>
#include <rtl/ref.hxx>
+#include <utility>
using namespace com::sun::star;
using namespace ooo::vba;
@@ -52,7 +53,7 @@ public:
}
-ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess>& xIndexAccess, VbaCommandBarHelperRef const & pHelper, const uno::Reference< container::XIndexAccess>& xBarSettings, const OUString& sResourceUrl ) : CommandBarControls_BASE( xParent, xContext, xIndexAccess ), pCBarHelper( pHelper ), m_xBarSettings( xBarSettings ), m_sResourceUrl( sResourceUrl )
+ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess>& xIndexAccess, VbaCommandBarHelperRef pHelper, uno::Reference< container::XIndexAccess> xBarSettings, const OUString& sResourceUrl ) : CommandBarControls_BASE( xParent, xContext, xIndexAccess ), pCBarHelper(std::move( pHelper )), m_xBarSettings(std::move( xBarSettings )), m_sResourceUrl( sResourceUrl )
{
m_bIsMenu = sResourceUrl == ITEM_MENUBAR_URL;
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx
index 5e86b359fa23..28a40c81e279 100644
--- a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx
@@ -44,7 +44,7 @@ private:
public:
/// @throws css::uno::RuntimeException
- ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef const & pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl );
+ ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef pHelper, css::uno::Reference< css::container::XIndexAccess > xBarSettings, const OUString& sResourceUrl );
// XEnumerationAccess
virtual css::uno::Type SAL_CALL getElementType() override;
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index fdc2fee94b29..8191afde74bd 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
#include <comphelper/random.hxx>
+#include <utility>
#include <vbahelper/vbahelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
@@ -84,7 +85,7 @@ public:
MSO2OOCommandbarHelper* MSO2OOCommandbarHelper::pMSO2OOCommandbarHelper = nullptr;
-VbaCommandBarHelper::VbaCommandBarHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel ) : mxContext( xContext ), mxModel( xModel )
+VbaCommandBarHelper::VbaCommandBarHelper( css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::frame::XModel > xModel ) : mxContext(std::move( xContext )), mxModel(std::move( xModel ))
{
Init();
}
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
index 774ec4839f7b..4dad8f57714c 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx
@@ -62,7 +62,7 @@ private:
bool hasToolbar( const OUString& sResourceUrl, std::u16string_view sName );
public:
/// @throws css::uno::RuntimeException
- VbaCommandBarHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel );
+ VbaCommandBarHelper( css::uno::Reference< css::uno::XComponentContext > xContext, css::uno::Reference< css::frame::XModel > xModel );
const css::uno::Reference< css::frame::XModel >& getModel() const { return mxModel; }
diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx
index 0ee8eaccfb0e..4f841a8e222e 100644
--- a/vbahelper/source/vbahelper/vbacommandbars.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbars.cxx
@@ -20,6 +20,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <ooo/vba/office/MsoBarType.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
#include "vbacommandbars.hxx"
#include "vbacommandbar.hxx"
@@ -38,7 +39,7 @@ class CommandBarEnumeration : public ::cppu::WeakImplHelper< container::XEnumera
sal_Int32 m_nCurrentPosition;
public:
/// @throws uno::RuntimeException
- CommandBarEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const VbaCommandBarHelperRef& pHelper) : m_xParent( xParent ), m_xContext( xContext ), m_pCBarHelper( pHelper ) , m_nCurrentPosition( 0 )
+ CommandBarEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, VbaCommandBarHelperRef pHelper) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_pCBarHelper(std::move( pHelper )) , m_nCurrentPosition( 0 )
{
uno::Reference< container::XNameAccess > xNameAccess = m_pCBarHelper->getPersistentWindowState();
m_sNames = xNameAccess->getElementNames();
diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx
index d27804012bca..0a2cc5b8705b 100644
--- a/vbahelper/source/vbahelper/vbadocumentbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <utility>
#include <vbahelper/vbadocumentbase.hxx>
#include <com/sun/star/beans/PropertyVetoException.hpp>
@@ -42,7 +43,7 @@
using namespace ::com::sun::star;
using namespace ::ooo::vba;
-VbaDocumentBase::VbaDocumentBase( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< frame::XModel > const & xModel ) : VbaDocumentBase_BASE( xParent, xContext ), mxModel( xModel )
+VbaDocumentBase::VbaDocumentBase( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< frame::XModel > xModel ) : VbaDocumentBase_BASE( xParent, xContext ), mxModel(std::move( xModel ))
{
}
diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
index 607ad57fc582..6db5b5a4cac0 100644
--- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx
+++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <utility>
#include <vbahelper/vbadocumentsbase.hxx>
#include <unotools/mediadescriptor.hxx>
@@ -60,12 +61,12 @@ class DocumentsEnumImpl : public ::cppu::WeakImplHelper< container::XEnumeration
public:
/// @throws uno::RuntimeException
- DocumentsEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, Documents&& docs ) : m_xContext( xContext ), m_documents( std::move(docs) )
+ DocumentsEnumImpl( uno::Reference< uno::XComponentContext > xContext, Documents&& docs ) : m_xContext(std::move( xContext )), m_documents( std::move(docs) )
{
m_it = m_documents.begin();
}
/// @throws uno::RuntimeException
- explicit DocumentsEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) : m_xContext( xContext )
+ explicit DocumentsEnumImpl( uno::Reference< uno::XComponentContext > xContext ) : m_xContext(std::move( xContext ))
{
uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( m_xContext );
uno::Reference< container::XEnumeration > xComponents = xDesktop->getComponents()->createEnumeration();
@@ -115,7 +116,7 @@ class DocumentsAccessImpl : public DocumentsAccessImpl_BASE
NameIndexHash namesToIndices;
public:
/// @throws uno::RuntimeException
- DocumentsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext, VbaDocumentsBase::DOCUMENT_TYPE eDocType ) :m_xContext( xContext )
+ DocumentsAccessImpl( uno::Reference< uno::XComponentContext > xContext, VbaDocumentsBase::DOCUMENT_TYPE eDocType ) :m_xContext(std::move( xContext ))
{
uno::Reference< container::XEnumeration > xEnum = new DocumentsEnumImpl( m_xContext );
sal_Int32 nIndex=0;
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index b0f6b291e953..e2fa8e085a67 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -66,6 +66,7 @@
#include <sfx2/viewsh.hxx>
#include <sal/log.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
#include <vcl/syswin.hxx>
@@ -958,8 +959,8 @@ void ConcreteXShapeGeometryAttributes::setWidth( double nWidth)
}
-ShapeHelper::ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape)
- : xShape( _xShape )
+ShapeHelper::ShapeHelper( css::uno::Reference< css::drawing::XShape > _xShape)
+ : xShape(std::move( _xShape ))
{
if( !xShape.is() )
throw css::uno::RuntimeException( "No valid shape for helper" );
diff --git a/vbahelper/source/vbahelper/vbapictureformat.cxx b/vbahelper/source/vbahelper/vbapictureformat.cxx
index a5cdcaed2cf7..5b335b0447d0 100644
--- a/vbahelper/source/vbahelper/vbapictureformat.cxx
+++ b/vbahelper/source/vbahelper/vbapictureformat.cxx
@@ -16,6 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <utility>
+
#include "vbapictureformat.hxx"
using namespace ooo::vba;
@@ -23,8 +25,8 @@ using namespace com::sun::star;
ScVbaPictureFormat::ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
- uno::Reference< drawing::XShape > const & xShape )
- : ScVbaPictureFormat_BASE( xParent, xContext ), m_xShape( xShape )
+ uno::Reference< drawing::XShape > xShape )
+ : ScVbaPictureFormat_BASE( xParent, xContext ), m_xShape(std::move( xShape ))
{
m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
}
diff --git a/vbahelper/source/vbahelper/vbapictureformat.hxx b/vbahelper/source/vbahelper/vbapictureformat.hxx
index 8ee2dba53ec2..c85489394f4f 100644
--- a/vbahelper/source/vbahelper/vbapictureformat.hxx
+++ b/vbahelper/source/vbahelper/vbapictureformat.hxx
@@ -40,7 +40,7 @@ private:
public:
/// @throws css::lang::IllegalArgumentException
/// @throws css::uno::RuntimeException
- ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > const & xShape );
+ ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > xShape );
// Attributes
virtual double SAL_CALL getBrightness() override;
diff --git a/vbahelper/source/vbahelper/vbashape.cxx b/vbahelper/source/vbahelper/vbashape.cxx
index 1f13c70d58fc..faab903524c2 100644
--- a/vbahelper/source/vbahelper/vbashape.cxx
+++ b/vbahelper/source/vbahelper/vbashape.cxx
@@ -35,6 +35,7 @@
#include <basic/sberrors.hxx>
#include <comphelper/processfactory.hxx>
+#include <utility>
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
@@ -48,8 +49,8 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-ScVbaShape::ScVbaShape( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< drawing::XShape >& xShape, const uno::Reference< drawing::XShapes >& xShapes, const uno::Reference< frame::XModel >& xModel, sal_Int32 nType )
- : ScVbaShape_BASE( xParent, xContext ), m_xShape( xShape ), m_xShapes( xShapes ), m_nType( nType ), m_xModel( xModel )
+ScVbaShape::ScVbaShape( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > xShape, uno::Reference< drawing::XShapes > xShapes, uno::Reference< frame::XModel > xModel, sal_Int32 nType )
+ : ScVbaShape_BASE( xParent, xContext ), m_xShape(std::move( xShape )), m_xShapes(std::move( xShapes )), m_nType( nType ), m_xModel(std::move( xModel ))
{
m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
m_pShapeHelper.reset( new ShapeHelper( m_xShape ) );
diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx
index 71641eef75ac..4dd837259bf7 100644
--- a/vbahelper/source/vbahelper/vbashaperange.cxx
+++ b/vbahelper/source/vbahelper/vbashaperange.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <ooo/vba/office/MsoShapeType.hpp>
+#include <utility>
#include <vbahelper/vbashaperange.hxx>
#include <vbahelper/vbashape.hxx>
using namespace ::ooo::vba;
@@ -36,7 +37,7 @@ class VbShapeRangeEnumHelper : public EnumerationHelper_BASE
uno::Reference<container::XIndexAccess > m_xIndexAccess;
sal_Int32 nIndex;
public:
- VbShapeRangeEnumHelper( const uno::Reference< XCollection >& xParent, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
+ VbShapeRangeEnumHelper( uno::Reference< XCollection > xParent, uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xParent(std::move( xParent )), m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {}
virtual sal_Bool SAL_CALL hasMoreElements( ) override
{
return ( nIndex < m_xIndexAccess->getCount() );
@@ -53,7 +54,7 @@ public:
}
-ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, const uno::Reference< drawing::XDrawPage >& xDrawPage, const uno::Reference< frame::XModel >& xModel ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage( xDrawPage ), m_xModel( xModel )
+ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, uno::Reference< drawing::XDrawPage > xDrawPage, uno::Reference< frame::XModel > xModel ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage(std::move( xDrawPage )), m_xModel(std::move( xModel ))
{
}
diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx
index 951c913d2664..d75a9874e448 100644
--- a/vbahelper/source/vbahelper/vbashapes.cxx
+++ b/vbahelper/source/vbahelper/vbashapes.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
+#include <utility>
#include <vbahelper/vbahelper.hxx>
#include <vbahelper/vbashape.hxx>
#include <vbahelper/vbashapes.hxx>
@@ -55,7 +56,7 @@ class VbShapeEnumHelper : public EnumerationHelper_BASE
uno::Reference<container::XIndexAccess > m_xIndexAccess;
sal_Int32 nIndex;
public:
- VbShapeEnumHelper( const uno::Reference< msforms::XShapes >& xParent, const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xParent( xParent ), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {}
+ VbShapeEnumHelper( uno::Reference< msforms::XShapes > xParent, uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xParent(std::move( xParent )), m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {}
virtual sal_Bool SAL_CALL hasMoreElements( ) override
{
return ( nIndex < m_xIndexAccess->getCount() );
@@ -87,7 +88,7 @@ void ScVbaShapes::initBaseCollection()
m_xNameAccess.set( xShapes, uno::UNO_QUERY );
}
-ScVbaShapes::ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const uno::Reference< frame::XModel>& xModel ): ScVbaShapes_BASE( xParent, xContext, xShapes, true ), m_nNewShapeCount(0), m_xModel( xModel )
+ScVbaShapes::ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, uno::Reference< frame::XModel> xModel ): ScVbaShapes_BASE( xParent, xContext, xShapes, true ), m_nNewShapeCount(0), m_xModel(std::move( xModel ))
{
m_xShapes.set( xShapes, uno::UNO_QUERY_THROW );
m_xDrawPage.set( xShapes, uno::UNO_QUERY_THROW );
diff --git a/vbahelper/source/vbahelper/vbatextframe.cxx b/vbahelper/source/vbahelper/vbatextframe.cxx
index d9373cb4e3b6..718a96f4a108 100644
--- a/vbahelper/source/vbahelper/vbatextframe.cxx
+++ b/vbahelper/source/vbahelper/vbatextframe.cxx
@@ -20,12 +20,13 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/drawing/TextFitToSizeType.hpp>
#include <com/sun/star/drawing/XShape.hpp>
+#include <utility>
#include <vbahelper/vbatextframe.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-VbaTextFrame::VbaTextFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > const & xShape ) : VbaTextFrame_BASE( xParent, xContext ), m_xShape( xShape )
+VbaTextFrame::VbaTextFrame( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< drawing::XShape > xShape ) : VbaTextFrame_BASE( xParent, xContext ), m_xShape(std::move( xShape ))
{
m_xPropertySet.set( m_xShape, uno::UNO_QUERY_THROW );
}