diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-05 11:21:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-07 13:32:30 +0200 |
commit | 5b112c8f8843613873181fce50990a8feef837ca (patch) | |
tree | 9ebd9d01d49a0c6a058de954dc167fd4ccb4ff5c /sc/source/ui/vba | |
parent | 799753cb80f4c81a6e87bf016924e0f2a29f03f0 (diff) |
clang-tidy modernize-pass-by-value in sc
Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/vba')
61 files changed, 163 insertions, 124 deletions
diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index c295158b7d0a..1976af701967 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -27,6 +27,7 @@ #include <ooo/vba/excel/XlAxisType.hpp> #include <ooo/vba/excel/XlAxisGroup.hpp> #include <ooo/vba/excel/XAxis.hpp> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -46,7 +47,7 @@ class EnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); @@ -93,7 +94,7 @@ class AxisIndexWrapper : public ::cppu::WeakImplHelper< container::XIndexAccess std::vector< AxesCoordinate > mCoordinates; uno::Reference< excel::XChart > mxChart; public: - AxisIndexWrapper( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XChart >& xChart ) : mxContext( xContext ), mxChart( xChart ) + AxisIndexWrapper( uno::Reference< uno::XComponentContext > xContext, uno::Reference< excel::XChart > xChart ) : mxContext(std::move( xContext )), mxChart(std::move( xChart )) { if ( !mxChart.is() ) return; diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index c34649fa57a5..c5eccd697dd1 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -21,6 +21,7 @@ #include <ooo/vba/excel/XlAxisCrosses.hpp> #include <ooo/vba/excel/XlAxisType.hpp> #include <ooo/vba/excel/XlScaleType.hpp> +#include <utility> #include "vbaaxistitle.hxx" #include "vbachart.hxx" using namespace ::com::sun::star; @@ -52,7 +53,7 @@ ScVbaAxis::isValueAxis() return true; } -ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( false ) +ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< beans::XPropertySet > _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet(std::move( _xPropertySet )), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( false ) { oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) ); moChartParent.set( xParent, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx index 6636fb617c29..cf5958895426 100644 --- a/sc/source/ui/vba/vbaaxis.hxx +++ b/sc/source/ui/vba/vbaaxis.hxx @@ -38,7 +38,7 @@ class ScVbaAxis : public ScVbaAxis_BASE std::unique_ptr<ov::ShapeHelper> oShapeHelper; public: - ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ); + ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ); // Methods virtual void SAL_CALL Delete( ) override; virtual css::uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL getAxisTitle( ) override; diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 22434f971b5f..7572935816e0 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/table/TableBorder.hpp> #include <com/sun/star/table/XCellRange.hpp> #include <com/sun/star/table/XColumnRowRange.hpp> +#include <utility> #include "vbapalette.hxx" @@ -324,7 +325,7 @@ private: return getCount(); // error condition } public: - RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, const ScVbaPalette& rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette ) + RangeBorders( uno::Reference< table::XCellRange > xRange, uno::Reference< uno::XComponentContext > xContext, const ScVbaPalette& rPalette ) : m_xRange(std::move( xRange )), m_xContext(std::move( xContext )), m_Palette( rPalette ) { } // XIndexAccess @@ -368,7 +369,7 @@ class RangeBorderEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit RangeBorderEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit RangeBorderEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx index 3fd00b207be0..087bfbd1aaa7 100644 --- a/sc/source/ui/vba/vbacharacters.cxx +++ b/sc/source/ui/vba/vbacharacters.cxx @@ -21,6 +21,7 @@ #include "vbafont.hxx" #include <com/sun/star/beans/XPropertySet.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -28,12 +29,12 @@ using namespace ::com::sun::star; ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, - const uno::Reference< text::XSimpleText>& xRange, + uno::Reference< text::XSimpleText> xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool Replace ) : ScVbaCharacters_BASE( xParent, xContext ), - m_xSimpleText(xRange), m_aPalette( dPalette), bReplace( Replace ) + m_xSimpleText(std::move(xRange)), m_aPalette( dPalette), bReplace( Replace ) { sal_Int16 nLength(-1); sal_Int16 nStart(1); diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx index 1d9c3c82fa21..3cb404325736 100644 --- a/sc/source/ui/vba/vbacharacters.hxx +++ b/sc/source/ui/vba/vbacharacters.hxx @@ -37,7 +37,7 @@ private: public: /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException - ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool bReplace = false ); + ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, css::uno::Reference< css::text::XSimpleText > xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool bReplace = false ); // Attributes virtual OUString SAL_CALL getCaption() override; diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index 5d9cd56a88c5..d6257591f333 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -40,6 +40,7 @@ #include "vbacharttitle.hxx" #include "vbaaxes.hxx" #include <document.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -66,7 +67,7 @@ constexpr OUStringLiteral DIM3D(u"Dim3D"); constexpr OUStringLiteral HASMAINTITLE(u"HasMainTitle"); constexpr OUStringLiteral HASLEGEND(u"HasLegend"); -ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart( _xTableChart ) +ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, css::uno::Reference< css::table::XTableChart > _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart(std::move( _xTableChart )) { mxChartDocument.set( _xChartComponent, uno::UNO_QUERY_THROW ) ; // #TODO is it possible that the XPropertySet interface is not set diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx index eedf13b9fa61..fa32513b7e54 100644 --- a/sc/source/ui/vba/vbachart.hxx +++ b/sc/source/ui/vba/vbachart.hxx @@ -67,7 +67,7 @@ friend class ScVbaAxis; sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers); void assignDiagramAttributes(); public: - ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ); + ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, css::uno::Reference< css::table::XTableChart > _xTableChart ); // Non-interface const css::uno::Reference< css::beans::XPropertySet >& xDiagramPropertySet() const { return mxDiagramPropertySet; } diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index 5246a9040eb6..5a45d29a52d7 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/script/BasicErrorException.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <basic/sberrors.hxx> +#include <utility> #include "vbachartobject.hxx" #include "vbachartobjects.hxx" @@ -31,7 +32,7 @@ using namespace ::ooo::vba; constexpr OUStringLiteral PERSIST_NAME(u"PersistName"); -ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier ) +ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, css::uno::Reference< css::table::XTableChart > _xTableChart, css::uno::Reference< css::drawing::XDrawPageSupplier > _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart(std::move( _xTableChart )), xDrawPageSupplier(std::move( _xDrawPageSupplier )) { xDrawPage = xDrawPageSupplier->getDrawPage(); xEmbeddedObjectSupplier.set( xTableChart, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbachartobject.hxx b/sc/source/ui/vba/vbachartobject.hxx index 85a014052c84..59cc5aea8f20 100644 --- a/sc/source/ui/vba/vbachartobject.hxx +++ b/sc/source/ui/vba/vbachartobject.hxx @@ -46,7 +46,7 @@ class ScVbaChartObject : public ChartObjectImpl_BASE /// @throws css::script::BasicErrorException css::uno::Reference< css::drawing::XShape > setShape(); public: - ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ); + ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, css::uno::Reference< css::table::XTableChart > _xTableChart, css::uno::Reference< css::drawing::XDrawPageSupplier > _xDrawPageSupplier ); virtual OUString SAL_CALL getName() override; virtual void SAL_CALL setName( const OUString& sName ) override; virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() override; diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 674c925110bb..b8e5dca1ab2b 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -29,6 +29,7 @@ #include <cellsuno.hxx> #include <string_view> +#include <utility> #include <vector> #include <basic/sberrors.hxx> #include <comphelper/sequence.hxx> @@ -45,7 +46,7 @@ class ChartObjectEnumerationImpl : public EnumerationHelperImpl public: /// @throws uno::RuntimeException - ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {} + ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< drawing::XDrawPageSupplier > _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier(std::move( _xDrawPageSupplier )) {} virtual uno::Any SAL_CALL nextElement( ) override { uno::Any ret; @@ -82,7 +83,7 @@ public: } -ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier( _xDrawPageSupplier ) +ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, uno::Reference< drawing::XDrawPageSupplier > _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier(std::move( _xDrawPageSupplier )) { } diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx index ce116e734bff..0efb4134ff86 100644 --- a/sc/source/ui/vba/vbachartobjects.hxx +++ b/sc/source/ui/vba/vbachartobjects.hxx @@ -37,7 +37,7 @@ class ScVbaChartObjects : public ChartObjects_BASE // method associated with populating the hashmap ( I'm not convinced this is necessary ) //css::uno::Reference< ov::excel::XChartObject > putByPersistName( const rtl:::OUString& _sPersistChartName ); public: - ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ); + ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, css::uno::Reference< css::drawing::XDrawPageSupplier > _xDrawPageSupplier ); /// @throws css::script::BasicErrorException css::uno::Sequence< OUString > getChartObjectNames() const; diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index c5577a7f82c0..c22eff9bf5fa 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/sheet/XCellRangeAddressable.hpp> #include <com/sun/star/sheet/XSheetCondition.hpp> #include <basic/sberrors.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -30,12 +31,11 @@ using namespace ::com::sun::star; const sal_Int32 ISFORMULA = 98765432; template <typename... Ifc> -ScVbaCondition<Ifc...>::ScVbaCondition( - const uno::Reference<XHelperInterface>& xParent, - const uno::Reference<uno::XComponentContext>& xContext, - const uno::Reference<sheet::XSheetCondition>& _xSheetCondition) +ScVbaCondition<Ifc...>::ScVbaCondition(const uno::Reference<XHelperInterface>& xParent, + const uno::Reference<uno::XComponentContext>& xContext, + uno::Reference<sheet::XSheetCondition> _xSheetCondition) : ScVbaCondition_BASE(xParent, xContext) - , mxSheetCondition(_xSheetCondition) + , mxSheetCondition(std::move(_xSheetCondition)) { mxAddressable.set(xParent, uno::UNO_QUERY_THROW); } diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx index 78faf0d5e60a..4a30036ba8e9 100644 --- a/sc/source/ui/vba/vbacondition.hxx +++ b/sc/source/ui/vba/vbacondition.hxx @@ -32,7 +32,7 @@ protected: css::uno::Reference< css::sheet::XCellRangeAddressable > mxAddressable; css::uno::Reference< css::sheet::XSheetCondition > mxSheetCondition; public: - ScVbaCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition ); + ScVbaCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::sheet::XSheetCondition > _xSheetCondition ); /// @throws css::script::BasicErrorException static css::sheet::ConditionOperator retrieveAPIOperator( const css::uno::Any& _aOperator); diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index a027279ae594..2de02da98d04 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -49,6 +49,7 @@ #include <cellsuno.hxx> #include <scitems.hxx> #include <attrib.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -59,13 +60,13 @@ constexpr OUStringLiteral LOCALE = u"Locale"; template< typename... Ifc > ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, - const uno::Reference< beans::XPropertySet >& _xPropertySet, - const uno::Reference< frame::XModel >& xModel, + uno::Reference< beans::XPropertySet > _xPropertySet, + uno::Reference< frame::XModel > xModel, bool bCheckAmbiguoity ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( "en", "US", OUString() ), - mxPropertySet( _xPropertySet ), - mxModel( xModel ), + mxPropertySet(std::move( _xPropertySet )), + mxModel(std::move( xModel )), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( false ) { diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx index f3c6750ce211..a85818ddd214 100644 --- a/sc/source/ui/vba/vbaformat.hxx +++ b/sc/source/ui/vba/vbaformat.hxx @@ -61,7 +61,7 @@ protected: virtual ScCellRangesBase* getCellRangesBase(); public: /// @throws css::script::BasicErrorException - ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& xModel, bool bCheckAmbiguoity ); + ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, css::uno::Reference< css::frame::XModel > xModel, bool bCheckAmbiguoity ); virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0; /// @throws css::uno::RuntimeException void SAL_CALL setAddIndent( const css::uno::Any& BAddIndent) { BAddIndent >>= mbAddIndent; } diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index d9804399cce1..8c2b80238a76 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -21,6 +21,7 @@ #include <unonames.hxx> #include <ooo/vba/excel/XlFormatConditionType.hpp> #include <basic/sberrors.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -38,12 +39,12 @@ lcl_getScVbaFormatConditionsPtr( const uno::Reference< excel::XFormatConditions ScVbaFormatCondition::ScVbaFormatCondition( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, - const uno::Reference< excel::XStyle >& _xStyle, - const uno::Reference< excel::XFormatConditions >& _xFormatConditions, - const uno::Reference< css::beans::XPropertySet >& _xPropertySet ) + uno::Reference< excel::XStyle > _xStyle, + uno::Reference< excel::XFormatConditions > _xFormatConditions, + uno::Reference< css::beans::XPropertySet > _xPropertySet ) : ScVbaFormatCondition_BASE( xParent, xContext, uno::Reference< sheet::XSheetCondition >( _xSheetConditionalEntry, css::uno::UNO_QUERY_THROW ) ), - moFormatConditions( _xFormatConditions ), mxStyle( _xStyle ), mxParentRangePropertySet( _xPropertySet ) + moFormatConditions(std::move( _xFormatConditions )), mxStyle(std::move( _xStyle )), mxParentRangePropertySet(std::move( _xPropertySet )) { mxSheetConditionalEntries = lcl_getScVbaFormatConditionsPtr( moFormatConditions )->getSheetConditionalEntries(); diff --git a/sc/source/ui/vba/vbaformatcondition.hxx b/sc/source/ui/vba/vbaformatcondition.hxx index 7d09a11b9597..dfa02dcb5863 100644 --- a/sc/source/ui/vba/vbaformatcondition.hxx +++ b/sc/source/ui/vba/vbaformatcondition.hxx @@ -41,9 +41,9 @@ public: ScVbaFormatCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, - const css::uno::Reference< ov::excel::XStyle >&, - const css::uno::Reference< ov::excel::XFormatConditions >& _xFormatConditions, - const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ); + css::uno::Reference< ov::excel::XStyle > , + css::uno::Reference< ov::excel::XFormatConditions > _xFormatConditions, + css::uno::Reference< css::beans::XPropertySet > _xPropertySet ); /// @throws css::script::BasicErrorException void notifyRange(); diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index bbf167b3c3a2..a840a6fb5f78 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -22,6 +22,7 @@ #include <basic/sberrors.hxx> #include <comphelper/sequence.hxx> #include <cppuhelper/exc_hlp.hxx> +#include <utility> #include <vector> #include <unonames.hxx> #include "vbaformatconditions.hxx" @@ -89,7 +90,7 @@ class EnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<excel::XRange >& xRange, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xCollection, const uno::Reference<beans::XPropertySet >& xProps ) : m_xIndexAccess( xIndexAccess ), m_xParentRange( xRange ), m_xContext( xContext ), m_xStyles( xStyles ), m_xParentCollection( xCollection ), m_xProps( xProps ), nIndex( 0 ) {} + EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference<excel::XRange > xRange, uno::Reference<uno::XComponentContext > xContext, uno::Reference<excel::XStyles > xStyles, uno::Reference< excel::XFormatConditions > xCollection, uno::Reference<beans::XPropertySet > xProps ) : m_xIndexAccess(std::move( xIndexAccess )), m_xParentRange(std::move( xRange )), m_xContext(std::move( xContext )), m_xStyles(std::move( xStyles )), m_xParentCollection(std::move( xCollection )), m_xProps(std::move( xProps )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index 2849ed672cc6..7b678d508c90 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -29,6 +29,7 @@ #include "vbainterior.hxx" #include "vbapalette.hxx" #include <document.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -61,7 +62,7 @@ static std::map< sal_Int32, sal_Int32 > aPatternMap { { xlPatternVertical, 6 } }; -ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, ScDocument* pScDoc ) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc ) +ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< beans::XPropertySet > xProps, ScDocument* pScDoc ) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(std::move(xProps)), m_pScDoc( pScDoc ) { // auto color m_aPattColor = Color(0); diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx index 1ea226e63bd3..eb645fcf505d 100644 --- a/sc/source/ui/vba/vbainterior.hxx +++ b/sc/source/ui/vba/vbainterior.hxx @@ -56,7 +56,7 @@ class ScVbaInterior final : public ScVbaInterior_BASE public: /// @throws css::lang::IllegalArgumentException ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = nullptr); + css::uno::Reference< css::beans::XPropertySet > xProps, ScDocument* pScDoc = nullptr); virtual css::uno::Any SAL_CALL getColor() override ; virtual void SAL_CALL setColor( const css::uno::Any& _color ) override ; diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx index 38b4feb116b7..d2bac36933f4 100644 --- a/sc/source/ui/vba/vbamenu.cxx +++ b/sc/source/ui/vba/vbamenu.cxx @@ -10,11 +10,12 @@ #include "vbamenu.hxx" #include "vbamenuitems.hxx" #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; -ScVbaMenu::ScVbaMenu( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBarControl >& rCommandBarControl ) : Menu_BASE( rParent, rContext ), m_xCommandBarControl( rCommandBarControl ) +ScVbaMenu::ScVbaMenu( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< XCommandBarControl > xCommandBarControl ) : Menu_BASE( rParent, rContext ), m_xCommandBarControl(std::move( xCommandBarControl )) { } diff --git a/sc/source/ui/vba/vbamenu.hxx b/sc/source/ui/vba/vbamenu.hxx index 284e2bc76839..2e4b89742859 100644 --- a/sc/source/ui/vba/vbamenu.hxx +++ b/sc/source/ui/vba/vbamenu.hxx @@ -21,7 +21,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenu( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBarControl >& rCommandBarControl ); + ScVbaMenu( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< ov::XCommandBarControl > xCommandBarControl ); virtual OUString SAL_CALL getCaption() override; virtual void SAL_CALL setCaption( const OUString& _caption ) override; diff --git a/sc/source/ui/vba/vbamenubar.cxx b/sc/source/ui/vba/vbamenubar.cxx index bd25c02a7147..50f69fdbf6b2 100644 --- a/sc/source/ui/vba/vbamenubar.cxx +++ b/sc/source/ui/vba/vbamenubar.cxx @@ -9,11 +9,12 @@ #include "vbamenubar.hxx" #include "vbamenus.hxx" #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; -ScVbaMenuBar::ScVbaMenuBar( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBar >& rCommandBar ) : MenuBar_BASE(rParent, rContext), m_xCommandBar(rCommandBar) +ScVbaMenuBar::ScVbaMenuBar( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< XCommandBar > xCommandBar ) : MenuBar_BASE(rParent, rContext), m_xCommandBar(std::move(xCommandBar)) { } diff --git a/sc/source/ui/vba/vbamenubar.hxx b/sc/source/ui/vba/vbamenubar.hxx index 75c1854c6015..d373f0252d8b 100644 --- a/sc/source/ui/vba/vbamenubar.hxx +++ b/sc/source/ui/vba/vbamenubar.hxx @@ -21,7 +21,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuBar( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBar >& rCommandBar ); + ScVbaMenuBar( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< ov::XCommandBar > xCommandBar ); virtual css::uno::Any SAL_CALL Menus( const css::uno::Any& aIndex ) override; diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index 6bcea2baa146..57f66644fcd6 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -11,6 +11,7 @@ #include <cppuhelper/implbase.hxx> #include <ooo/vba/excel/XlSheetType.hpp> #include <ooo/vba/XCommandBars.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -24,7 +25,7 @@ class MenuBarEnumeration : public ::cppu::WeakImplHelper< container::XEnumeratio uno::Reference< container::XEnumeration > m_xEnumeration; public: /// @throws uno::RuntimeException - MenuBarEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) + MenuBarEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XEnumeration > xEnumeration) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xEnumeration(std::move( xEnumeration )) { } virtual sal_Bool SAL_CALL hasMoreElements() override @@ -45,7 +46,7 @@ public: } -ScVbaMenuBars::ScVbaMenuBars( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBars >& xCommandBars ) : MenuBars_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBars( xCommandBars ) +ScVbaMenuBars::ScVbaMenuBars( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< XCommandBars > xCommandBars ) : MenuBars_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBars(std::move( xCommandBars )) { } diff --git a/sc/source/ui/vba/vbamenubars.hxx b/sc/source/ui/vba/vbamenubars.hxx index 1303a0ff358f..2b6e7e7db7a1 100644 --- a/sc/source/ui/vba/vbamenubars.hxx +++ b/sc/source/ui/vba/vbamenubars.hxx @@ -22,7 +22,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuBars( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBars >& xCommandBars ); + ScVbaMenuBars( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< ov::XCommandBars > xCommandBars ); virtual ~ScVbaMenuBars() override; // XEnumerationAccess diff --git a/sc/source/ui/vba/vbamenuitem.cxx b/sc/source/ui/vba/vbamenuitem.cxx index 2dba780baee4..522db66b097c 100644 --- a/sc/source/ui/vba/vbamenuitem.cxx +++ b/sc/source/ui/vba/vbamenuitem.cxx @@ -6,12 +6,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <utility> + #include "vbamenuitem.hxx" using namespace com::sun::star; using namespace ooo::vba; -ScVbaMenuItem::ScVbaMenuItem( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBarControl >& rCommandBarControl ) : MenuItem_BASE( rParent, rContext ), m_xCommandBarControl( rCommandBarControl ) +ScVbaMenuItem::ScVbaMenuItem( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< XCommandBarControl > xCommandBarControl ) : MenuItem_BASE( rParent, rContext ), m_xCommandBarControl(std::move( xCommandBarControl )) { } diff --git a/sc/source/ui/vba/vbamenuitem.hxx b/sc/source/ui/vba/vbamenuitem.hxx index bf8c35b2908b..0c8561421120 100644 --- a/sc/source/ui/vba/vbamenuitem.hxx +++ b/sc/source/ui/vba/vbamenuitem.hxx @@ -21,7 +21,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuItem( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBarControl >& rCommandBarControl ); + ScVbaMenuItem( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< ov::XCommandBarControl > xCommandBarControl ); virtual OUString SAL_CALL getCaption() override; virtual void SAL_CALL setCaption( const OUString& _caption ) override; diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx index 646fd82cb7d4..10d6fc33e046 100644 --- a/sc/source/ui/vba/vbamenuitems.cxx +++ b/sc/source/ui/vba/vbamenuitems.cxx @@ -12,6 +12,7 @@ #include <cppuhelper/implbase.hxx> #include <ooo/vba/office/MsoControlType.hpp> #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -27,7 +28,7 @@ class MenuEnumeration : public MenuEnumeration_BASE uno::Reference< container::XEnumeration > m_xEnumeration; public: /// @throws uno::RuntimeException - MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) + MenuEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XEnumeration > xEnumeration) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xEnumeration(std::move( xEnumeration )) { } virtual sal_Bool SAL_CALL hasMoreElements() override @@ -59,7 +60,7 @@ public: } -ScVbaMenuItems::ScVbaMenuItems( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBarControls >& xCommandBarControls ) : MenuItems_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls( xCommandBarControls ) +ScVbaMenuItems::ScVbaMenuItems( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< XCommandBarControls > xCommandBarControls ) : MenuItems_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls(std::move( xCommandBarControls )) { } diff --git a/sc/source/ui/vba/vbamenuitems.hxx b/sc/source/ui/vba/vbamenuitems.hxx index 71f43e634c29..55e6fe78225e 100644 --- a/sc/source/ui/vba/vbamenuitems.hxx +++ b/sc/source/ui/vba/vbamenuitems.hxx @@ -23,7 +23,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ); + ScVbaMenuItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< ov::XCommandBarControls > xCommandBarControls ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx index 807f0cf5ade3..b9b2c08fa0f2 100644 --- a/sc/source/ui/vba/vbamenus.cxx +++ b/sc/source/ui/vba/vbamenus.cxx @@ -11,6 +11,7 @@ #include <cppuhelper/implbase.hxx> #include <ooo/vba/office/MsoControlType.hpp> #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -26,7 +27,7 @@ class MenuEnumeration : public MenuEnumeration_BASE uno::Reference< container::XEnumeration > m_xEnumeration; public: /// @throws uno::RuntimeException - MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) + MenuEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XEnumeration > xEnumeration) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xEnumeration(std::move( xEnumeration )) { } virtual sal_Bool SAL_CALL hasMoreElements() override @@ -53,7 +54,7 @@ public: } -ScVbaMenus::ScVbaMenus( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBarControls >& xCommandBarControls ) : Menus_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls( xCommandBarControls ) +ScVbaMenus::ScVbaMenus( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< XCommandBarControls > xCommandBarControls ) : Menus_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls(std::move( xCommandBarControls )) { } diff --git a/sc/source/ui/vba/vbamenus.hxx b/sc/source/ui/vba/vbamenus.hxx index 2a14cf3cb374..4d8f646254b1 100644 --- a/sc/source/ui/vba/vbamenus.hxx +++ b/sc/source/ui/vba/vbamenus.hxx @@ -23,7 +23,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenus( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ); + ScVbaMenus( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< ov::XCommandBarControls > xCommandBarControls ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index 7ef8fe1293f5..eece5396c27c 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -27,19 +27,20 @@ #include <tokenarray.hxx> #include <memory> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XNamedRange >& xName, - const css::uno::Reference< css::sheet::XNamedRanges >& xNames, - const css::uno::Reference< css::frame::XModel >& xModel ): + css::uno::Reference< css::sheet::XNamedRange > xName, + css::uno::Reference< css::sheet::XNamedRanges > xNames, + css::uno::Reference< css::frame::XModel > xModel ): NameImpl_BASE( xParent , xContext ), - mxModel( xModel ), - mxNamedRange( xName ), - mxNames( xNames ) + mxModel(std::move( xModel )), + mxNamedRange(std::move( xName )), + mxNames(std::move( xNames )) { } diff --git a/sc/source/ui/vba/vbaname.hxx b/sc/source/ui/vba/vbaname.hxx index 194b047faeb2..9d12f2ac6bfd 100644 --- a/sc/source/ui/vba/vbaname.hxx +++ b/sc/source/ui/vba/vbaname.hxx @@ -36,7 +36,7 @@ class ScVbaName : public NameImpl_BASE OUString getContent( const formula::FormulaGrammar::Grammar eGrammar ); void setContent( const OUString& sContent, const formula::FormulaGrammar::Grammar eGrammar ); public: - ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel ); + ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XNamedRange > xName , css::uno::Reference< css::sheet::XNamedRanges > xNames , css::uno::Reference< css::frame::XModel > xModel ); virtual ~ScVbaName() override; // Attributes diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 287dbcf3cfff..074cfe60d647 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -27,6 +27,7 @@ #include "vbaname.hxx" #include "vbarange.hxx" #include <tabvwsh.hxx> +#include <utility> #include <viewdata.hxx> #include <compiler.hxx> #include <tokenarray.hxx> @@ -45,7 +46,7 @@ class NamesEnumeration : public EnumerationHelperImpl uno::Reference< sheet::XNamedRanges > m_xNames; public: /// @throws uno::RuntimeException - NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ), m_xNames( xNames ) {} + NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< frame::XModel > xModel , uno::Reference< sheet::XNamedRanges > xNames ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel(std::move( xModel )), m_xNames(std::move( xNames )) {} virtual uno::Any SAL_CALL nextElement( ) override { @@ -60,9 +61,9 @@ public: ScVbaNames::ScVbaNames(const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames, - const css::uno::Reference< css::frame::XModel >& xModel ): + css::uno::Reference< css::frame::XModel > xModel ): ScVbaNames_BASE( xParent , xContext , uno::Reference< container::XIndexAccess >( xNames, uno::UNO_QUERY ) ), - mxModel( xModel ), + mxModel(std::move( xModel )), mxNames( xNames ) { m_xNameAccess.set( xNames, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx index 96f03d435975..db20803a6dd3 100644 --- a/sc/source/ui/vba/vbanames.hxx +++ b/sc/source/ui/vba/vbanames.hxx @@ -35,7 +35,7 @@ class ScVbaNames final : public ScVbaNames_BASE const css::uno::Reference< css::frame::XModel >& getModel() const { return mxModel; } public: - ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel ); + ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , css::uno::Reference< css::frame::XModel > xModel ); ScDocument& getScDocument(); diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 11a8c3934658..06b576f26f61 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -24,6 +24,7 @@ #include "vbaoleobject.hxx" #include "vbaoleobjects.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -81,10 +82,10 @@ class EnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - EnumWrapper( const uno::Reference< XHelperInterface >& xParent, - const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< container::XIndexAccess >& xIndexAccess ) - : m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + EnumWrapper( uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, + uno::Reference< container::XIndexAccess > xIndexAccess ) + : m_xParent(std::move( xParent )), m_xContext(std::move( xContext)), m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { diff --git a/sc/source/ui/vba/vbaoutline.hxx b/sc/source/ui/vba/vbaoutline.hxx index 4554083e9dab..7fd46d3685bf 100644 --- a/sc/source/ui/vba/vbaoutline.hxx +++ b/sc/source/ui/vba/vbaoutline.hxx @@ -19,6 +19,7 @@ #pragma once #include <ooo/vba/excel/XOutline.hpp> +#include <utility> #include <vbahelper/vbahelperinterface.hxx> namespace com::sun::star::uno { class XComponentContext; } @@ -31,7 +32,7 @@ class ScVbaOutline : public ScVbaOutline_BASE css::uno::Reference< css::sheet::XSheetOutline > mxOutline; public: ScVbaOutline( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - css::uno::Reference<css::sheet::XSheetOutline> const & outline): ScVbaOutline_BASE( xParent, xContext) , mxOutline(outline) + css::uno::Reference<css::sheet::XSheetOutline> outline): ScVbaOutline_BASE( xParent, xContext) , mxOutline(std::move(outline)) {} virtual void SAL_CALL ShowLevels( const css::uno::Any& RowLevels, const css::uno::Any& ColumnLevels ) override ; diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index 3d9269c72fb0..2b7d3ff4a605 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -22,6 +22,7 @@ #include <ooo/vba/excel/XlPageBreak.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/table/XCellRange.hpp> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -29,10 +30,10 @@ using namespace ::ooo::vba; template< typename... Ifc > ScVbaPageBreak< Ifc... >::ScVbaPageBreak( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< beans::XPropertySet >& xProps, + uno::Reference< beans::XPropertySet > xProps, sheet::TablePageBreakData aTablePageBreakData): ScVbaPageBreak_BASE( xParent, xContext ), - mxRowColPropertySet( xProps ), + mxRowColPropertySet(std::move( xProps )), maTablePageBreakData( aTablePageBreakData ) { } diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx index 537258923e3d..48d6cad0786a 100644 --- a/sc/source/ui/vba/vbapagebreak.hxx +++ b/sc/source/ui/vba/vbapagebreak.hxx @@ -38,7 +38,7 @@ public: /// @throws css::uno::RuntimeException ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::beans::XPropertySet >& xProps, + css::uno::Reference< css::beans::XPropertySet > xProps, css::sheet::TablePageBreakData aTablePageBreakData); virtual sal_Int32 SAL_CALL getType( ) override; diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 36d9f5c7f0f3..b9a0235c34f3 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/sheet/XSheetPageBreak.hpp> #include <com/sun/star/table/XColumnRowRange.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -40,10 +41,10 @@ private: bool m_bColumn; public: - RangePageBreaks( const uno::Reference< XHelperInterface >& xParent, - const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak, - bool bColumn ) : mxParent( xParent ), mxContext( xContext ), mxSheetPageBreak( xSheetPageBreak ), m_bColumn( bColumn ) + RangePageBreaks( uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, + uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak, + bool bColumn ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxSheetPageBreak(std::move( xSheetPageBreak )), m_bColumn( bColumn ) { } @@ -195,7 +196,7 @@ class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit RangePageBreaksEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit RangePageBreaksEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index 7b7b23d16e4c..f487b74e0c7b 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -33,6 +33,7 @@ #include <ooo/vba/excel/XlPaperSize.hpp> #include <basic/sberrors.hxx> #include <filter/msfilter/util.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -42,9 +43,9 @@ using namespace ::ooo::vba; ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< sheet::XSpreadsheet >& xSheet, + uno::Reference< sheet::XSpreadsheet > xSheet, const uno::Reference< frame::XModel >& xModel): - ScVbaPageSetup_BASE( xParent, xContext ), mxSheet( xSheet ), mbIsLandscape( false ) + ScVbaPageSetup_BASE( xParent, xContext ), mxSheet(std::move( xSheet )), mbIsLandscape( false ) { // query for current page style mxModel.set( xModel, uno::UNO_SET_THROW ); diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx index 75e3ed1d3413..6f2f8b45c51f 100644 --- a/sc/source/ui/vba/vbapagesetup.hxx +++ b/sc/source/ui/vba/vbapagesetup.hxx @@ -35,7 +35,7 @@ public: /// @throws css::uno::RuntimeException ScVbaPageSetup(const css::uno::Reference<ov::XHelperInterface>& xParent, const css::uno::Reference<css::uno::XComponentContext>& xContext, - const css::uno::Reference<css::sheet::XSpreadsheet>& xSheet, + css::uno::Reference<css::sheet::XSpreadsheet> xSheet, const css::uno::Reference<css::frame::XModel>& xModel); // Attribute diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx index 1f7f0b540565..9e9dd2e33fdd 100644 --- a/sc/source/ui/vba/vbapane.cxx +++ b/sc/source/ui/vba/vbapane.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/sheet/XSpreadsheet.hpp> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/table/CellRangeAddress.hpp> +#include <utility> #include "vbarange.hxx" using namespace com::sun::star; @@ -29,13 +30,13 @@ using namespace ooo::vba; ScVbaPane::ScVbaPane( const css::uno::Reference< ov::XHelperInterface >& xParent, - const uno::Reference< uno::XComponentContext >& xContext, + uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel >& rModel, const uno::Reference< sheet::XViewPane >& rViewPane ) : m_xModel(rModel, uno::UNO_SET_THROW), m_xViewPane(rViewPane, uno::UNO_SET_THROW), m_xParent(xParent), - m_xContext(xContext) + m_xContext(std::move(xContext)) { } diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx index cf4fd832803e..962e6839108b 100644 --- a/sc/source/ui/vba/vbapane.hxx +++ b/sc/source/ui/vba/vbapane.hxx @@ -30,7 +30,7 @@ public: /// @throws css::uno::RuntimeException ScVbaPane( const css::uno::Reference< ov::XHelperInterface >& rParent, - const css::uno::Reference< css::uno::XComponentContext >& rContext, + css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::frame::XModel >& rModel, const css::uno::Reference< css::sheet::XViewPane >& rViewPane ); diff --git a/sc/source/ui/vba/vbapivotcache.cxx b/sc/source/ui/vba/vbapivotcache.cxx index 54c6a4ad7a88..15f81c0eb3cf 100644 --- a/sc/source/ui/vba/vbapivotcache.cxx +++ b/sc/source/ui/vba/vbapivotcache.cxx @@ -16,12 +16,14 @@ * 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 "vbapivotcache.hxx" using namespace ::com::sun::star; using namespace ::ooo::vba; -ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable( xTable ) +ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< sheet::XDataPilotTable > xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable(std::move( xTable )) { } diff --git a/sc/source/ui/vba/vbapivotcache.hxx b/sc/source/ui/vba/vbapivotcache.hxx index c02f309200e8..49770f917b88 100644 --- a/sc/source/ui/vba/vbapivotcache.hxx +++ b/sc/source/ui/vba/vbapivotcache.hxx @@ -29,7 +29,7 @@ class ScVbaPivotCache : public PivotCacheImpl_BASE { css::uno::Reference< css::sheet::XDataPilotTable > m_xTable; public: - ScVbaPivotCache( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable ); + ScVbaPivotCache( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XDataPilotTable > xTable ); virtual void SAL_CALL Refresh() override; // XHelperInterface diff --git a/sc/source/ui/vba/vbapivottable.cxx b/sc/source/ui/vba/vbapivottable.cxx index 775ac390c0c1..263a695f79f5 100644 --- a/sc/source/ui/vba/vbapivottable.cxx +++ b/sc/source/ui/vba/vbapivottable.cxx @@ -16,13 +16,15 @@ * 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 "vbapivottable.hxx" #include "vbapivotcache.hxx" using namespace ::com::sun::star; using namespace ::ooo::vba; -ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotTableImpl_BASE( uno::Reference< XHelperInterface >(), xContext), m_xTable( xTable ) +ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< sheet::XDataPilotTable > xTable ) : PivotTableImpl_BASE( uno::Reference< XHelperInterface >(), xContext), m_xTable(std::move( xTable )) { } diff --git a/sc/source/ui/vba/vbapivottable.hxx b/sc/source/ui/vba/vbapivottable.hxx index 3d3392168f6b..c584ebecf119 100644 --- a/sc/source/ui/vba/vbapivottable.hxx +++ b/sc/source/ui/vba/vbapivottable.hxx @@ -30,7 +30,7 @@ class ScVbaPivotTable : public PivotTableImpl_BASE public: ScVbaPivotTable(const css::uno::Reference<css::uno::XComponentContext>& xContext, - const css::uno::Reference<css::sheet::XDataPilotTable>& xTable); + css::uno::Reference<css::sheet::XDataPilotTable> xTable); virtual css::uno::Reference<ov::excel::XPivotCache> SAL_CALL PivotCache() override; // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 99bcce81ba00..29359f41d499 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -151,6 +151,7 @@ #include "vbastyle.hxx" #include "vbaname.hxx" +#include <utility> #include <vector> #include <vbahelper/vbacollectionimpl.hxx> @@ -272,7 +273,7 @@ class SingleRangeEnumeration : public EnumerationHelper_BASE bool bHasMore; public: /// @throws uno::RuntimeException - explicit SingleRangeEnumeration( const uno::Reference< table::XCellRange >& xRange ) : m_xRange( xRange ), bHasMore( true ) { } + explicit SingleRangeEnumeration( uno::Reference< table::XCellRange > xRange ) : m_xRange(std::move( xRange )), bHasMore( true ) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override { return bHasMore; } virtual uno::Any SAL_CALL nextElement( ) override { @@ -293,7 +294,7 @@ private: uno::Reference< table::XCellRange > m_xRange; public: - explicit SingleRangeIndexAccess( const uno::Reference< table::XCellRange >& xRange ) : m_xRange( xRange ) {} + explicit SingleRangeIndexAccess( uno::Reference< table::XCellRange > xRange ) : m_xRange(std::move( xRange )) {} // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount() override { return 1; } virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override @@ -596,7 +597,7 @@ class ColumnsRowEnumeration: public CellsEnumeration_BASE sal_Int32 mCurElem; public: - ColumnsRowEnumeration( const uno::Reference< excel::XRange >& xRange, sal_Int32 nElems ) : mxRange( xRange ), mMaxElems( nElems ), mCurElem( 0 ) + ColumnsRowEnumeration( uno::Reference< excel::XRange > xRange, sal_Int32 nElems ) : mxRange(std::move( xRange )), mMaxElems( nElems ), mCurElem( 0 ) { } @@ -642,7 +643,7 @@ class CellsEnumeration : public CellsEnumeration_BASE } } public: - CellsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCollection >& xAreas ): mxParent( xParent ), mxContext( xContext ), m_xAreas( xAreas ) + CellsEnumeration( const uno::Reference< XHelperInterface >& xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< XCollection > xAreas ): mxParent( xParent ), mxContext(std::move( xContext )), m_xAreas(std::move( xAreas )) { sal_Int32 nItems = m_xAreas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) @@ -685,7 +686,7 @@ class CellValueSetter : public ValueSetter protected: uno::Any maValue; public: - explicit CellValueSetter( const uno::Any& aValue ); + explicit CellValueSetter( uno::Any aValue ); virtual bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) override; virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override; @@ -693,7 +694,7 @@ public: } -CellValueSetter::CellValueSetter( const uno::Any& aValue ): maValue( aValue ) {} +CellValueSetter::CellValueSetter( uno::Any aValue ): maValue(std::move( aValue )) {} void CellValueSetter::visitNode( sal_Int32 /*i*/, sal_Int32 /*j*/, const uno::Reference< table::XCell >& xCell ) @@ -1076,7 +1077,7 @@ class AreasVisitor private: uno::Reference< XCollection > m_Areas; public: - explicit AreasVisitor( const uno::Reference< XCollection >& rAreas ):m_Areas( rAreas ){} + explicit AreasVisitor( uno::Reference< XCollection > xAreas ):m_Areas(std::move( xAreas )){} void visit( RangeProcessor& processor ) { @@ -1098,7 +1099,7 @@ class RangeHelper public: /// @throws uno::RuntimeException - explicit RangeHelper( const uno::Reference< table::XCellRange >& xCellRange ) : m_xCellRange( xCellRange ) + explicit RangeHelper( uno::Reference< table::XCellRange > xCellRange ) : m_xCellRange(std::move( xCellRange )) { if ( !m_xCellRange.is() ) throw uno::RuntimeException(); diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index a6a9a1233b8e..8ba097f9e70b 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -18,6 +18,7 @@ */ #include "vbasheetobjects.hxx" +#include <utility> #include <vector> #include <o3tl/unit_conversion.hxx> #include <rtl/math.hxx> @@ -79,8 +80,8 @@ class ScVbaObjectContainer : public ::cppu::WeakImplHelper< container::XIndexAcc public: /// @throws uno::RuntimeException explicit ScVbaObjectContainer( - const uno::Reference< XHelperInterface >& rxParent, - const uno::Reference< uno::XComponentContext >& rxContext, + uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType ); @@ -168,13 +169,13 @@ private: }; ScVbaObjectContainer::ScVbaObjectContainer( - const uno::Reference< XHelperInterface >& rxParent, - const uno::Reference< uno::XComponentContext >& rxContext, + uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType ) : - mxParent( rxParent ), - mxContext( rxContext ), + mxParent(std::move( xParent )), + mxContext(std::move( xContext )), mxModel( rxModel, uno::UNO_SET_THROW ), mxFactory( rxModel, uno::UNO_QUERY_THROW ), maVbaType( rVbaType ) @@ -381,7 +382,7 @@ public: const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType, - const OUString& rModelServiceName, + OUString aModelServiceName, sal_Int16 /* css::form::FormComponentType */ eType ); protected: @@ -408,10 +409,10 @@ ScVbaControlContainer::ScVbaControlContainer( const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType, - const OUString& rModelServiceName, + OUString aModelServiceName, sal_Int16 /* css::form::FormComponentType */ eType ) : ScVbaObjectContainer( rxParent, rxContext, rxModel, rxSheet, rVbaType ), - maModelServiceName( rModelServiceName ), + maModelServiceName(std::move( aModelServiceName )), meType( eType ) { } diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index c21adf06487a..6481e8911fdf 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -23,6 +23,7 @@ #include <ooo/vba/excel/XRange.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -83,7 +84,7 @@ class EnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<frame::XModel >& xModel ) : m_xIndexAccess( xIndexAccess ), m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ), nIndex( 0 ) {} + EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference<XHelperInterface > xParent, uno::Reference<uno::XComponentContext > xContext, uno::Reference<frame::XModel > xModel ) : m_xIndexAccess(std::move( xIndexAccess )), m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xModel(std::move( xModel )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 550be00607fe..8834ca90c8b2 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -18,6 +18,7 @@ */ #pragma once +#include <utility> #include <vbahelper/vbahelperinterface.hxx> #include "vbainterior.hxx" #include "vbafont.hxx" @@ -40,8 +41,8 @@ typedef InheritedHelperInterfaceImpl< Ifc... > BaseClass; public: TitleImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::drawing::XShape >& _xTitleShape ) - : BaseClass( xParent, xContext ), xTitleShape( _xTitleShape ), m_Palette(nullptr) + css::uno::Reference< css::drawing::XShape > _xTitleShape ) + : BaseClass( xParent, xContext ), xTitleShape(std::move( _xTitleShape )), m_Palette(nullptr) { xShapePropertySet.set( xTitleShape, css::uno::UNO_QUERY_THROW ); oShapeHelper.reset( new ov::ShapeHelper(xTitleShape) ); diff --git a/sc/source/ui/vba/vbavalidation.hxx b/sc/source/ui/vba/vbavalidation.hxx index ab16c053337a..6395d6728ad7 100644 --- a/sc/source/ui/vba/vbavalidation.hxx +++ b/sc/source/ui/vba/vbavalidation.hxx @@ -19,6 +19,7 @@ #pragma once #include <ooo/vba/excel/XValidation.hpp> +#include <utility> #include <vbahelper/vbahelperinterface.hxx> namespace com::sun::star::table { class XCellRange; } @@ -31,7 +32,7 @@ class ScVbaValidation : public ValidationImpl_BASE css::uno::Reference< css::table::XCellRange > m_xRange; public: - ScVbaValidation( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange( xRange) {} + ScVbaValidation( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::table::XCellRange > xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange(std::move( xRange)) {} // Attributes virtual sal_Bool SAL_CALL getIgnoreBlank() override; virtual void SAL_CALL setIgnoreBlank( sal_Bool _ignoreblank ) override; diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 3e7cc4f5676f..6885f9b18ca1 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -42,6 +42,7 @@ #include <docuno.hxx> #include <sc.hrc> #include <sfx2/viewfrm.hxx> +#include <utility> #include <vcl/wrkwin.hxx> #include <unonames.hxx> #include <markdata.hxx> @@ -72,8 +73,8 @@ public: Sheets::const_iterator m_it; /// @throws uno::RuntimeException - SelectedSheetsEnum( const uno::Reference< uno::XComponentContext >& xContext, Sheets&& sheets, const uno::Reference< frame::XModel >& xModel ) - : m_xContext( xContext ), m_sheets( std::move(sheets) ), m_xModel( xModel ) + SelectedSheetsEnum( uno::Reference< uno::XComponentContext > xContext, Sheets&& sheets, uno::Reference< frame::XModel > xModel ) + : m_xContext(std::move( xContext )), m_sheets( std::move(sheets) ), m_xModel(std::move( xModel )) { m_it = m_sheets.begin(); } @@ -101,7 +102,7 @@ class SelectedSheetsEnumAccess : public SelectedSheets_BASE Sheets sheets; uno::Reference< frame::XModel > m_xModel; public: - SelectedSheetsEnumAccess( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ):m_xContext( xContext ), m_xModel( xModel ) + SelectedSheetsEnumAccess( uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel ):m_xContext(std::move( xContext )), m_xModel(std::move( xModel )) { ScModelObj* pModel = static_cast< ScModelObj* >( m_xModel.get() ); if ( !pModel ) diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 3a99603782a1..00cacc5f39cc 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -30,6 +30,7 @@ #include "vbaworkbook.hxx" #include <unordered_map> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -65,14 +66,14 @@ protected: public: /// @throws uno::RuntimeException - WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, Components&& components ) - : m_xContext( xContext ), m_components( std::move(components) ) + WindowComponentEnumImpl( uno::Reference< uno::XComponentContext > xContext, Components&& components ) + : m_xContext(std::move( xContext )), m_components( std::move(components) ) { m_it = m_components.begin(); } /// @throws uno::RuntimeException - explicit WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) : m_xContext( xContext ) + explicit WindowComponentEnumImpl( 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(); @@ -104,7 +105,7 @@ class WindowEnumImpl : public WindowComponentEnumImpl { uno::Any m_aApplication; public: - WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ): WindowComponentEnumImpl( xContext ), m_aApplication( aApplication ) {} + WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, uno::Any aApplication ): WindowComponentEnumImpl( xContext ), m_aApplication(std::move( aApplication )) {} virtual uno::Any SAL_CALL nextElement( ) override { return ComponentToWindow( WindowComponentEnumImpl::nextElement(), m_xContext, m_aApplication ); @@ -126,7 +127,7 @@ class WindowsAccessImpl : public WindowsAccessImpl_BASE Components m_windows; NameIndexHash namesToIndices; public: - explicit WindowsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext ):m_xContext( xContext ) + explicit WindowsAccessImpl( uno::Reference< uno::XComponentContext > xContext ):m_xContext(std::move( xContext )) { uno::Reference< container::XEnumeration > xEnum = new WindowComponentEnumImpl( m_xContext ); sal_Int32 nIndex=0; diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index c5128442799d..cfc84537da62 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -55,6 +55,7 @@ #include <basic/sberrors.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/servicehelper.hxx> +#include <utility> #include <vbahelper/vbashapes.hxx> //zhangyun showdataform @@ -147,8 +148,8 @@ openNewDoc(const OUString& aSheetName ) } ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< sheet::XSpreadsheet >& xSheet, - const uno::Reference< frame::XModel >& xModel ) : WorksheetImpl_BASE( xParent, xContext ), mxSheet( xSheet ), mxModel(xModel), mbVeryHidden( false ) + uno::Reference< sheet::XSpreadsheet > xSheet, + uno::Reference< frame::XModel > xModel ) : WorksheetImpl_BASE( xParent, xContext ), mxSheet(std::move( xSheet )), mxModel(std::move(xModel)), mbVeryHidden( false ) { } diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx index 5eee3df4a175..439e5a3139bd 100644 --- a/sc/source/ui/vba/vbaworksheet.hxx +++ b/sc/source/ui/vba/vbaworksheet.hxx @@ -63,8 +63,8 @@ public: /// @throws css::uno::RuntimeException ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet, - const css::uno::Reference< css::frame::XModel >& xModel ) ; + css::uno::Reference< css::sheet::XSpreadsheet > xSheet, + css::uno::Reference< css::frame::XModel > xModel ) ; /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException ScVbaWorksheet( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index 5df1bc622a24..48795cb9594c 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -36,6 +36,7 @@ #include "vbaworksheet.hxx" #include <markdata.hxx> +#include <utility> #include <vector> #include <prevwsh.hxx> #include <preview.hxx> @@ -136,7 +137,7 @@ class SheetsEnumeration : public EnumerationHelperImpl uno::Reference< frame::XModel > m_xModel; public: /// @throws uno::RuntimeException - SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ) {} + SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< frame::XModel > xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel(std::move( xModel )) {} virtual uno::Any SAL_CALL nextElement( ) override { @@ -159,11 +160,11 @@ public: } -ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) +ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, uno::Reference< frame::XModel > xModel ): ScVbaWorksheets_BASE( xParent, xContext, xSheets ), mxModel(std::move( xModel )), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) { } -ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) +ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, uno::Reference< frame::XModel > xModel ): ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(std::move(xModel)) { } diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx index b795fbf5a89a..611365edfcd1 100644 --- a/sc/source/ui/vba/vbaworksheets.hxx +++ b/sc/source/ui/vba/vbaworksheets.hxx @@ -36,8 +36,8 @@ class ScVbaWorksheets : public ScVbaWorksheets_BASE css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::sheet::XSpreadsheets > m_xSheets; public: - ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, const css::uno::Reference< css::frame::XModel >& xModel ); - ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum, const css::uno::Reference< css::frame::XModel >& xModel ); + ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, css::uno::Reference< css::frame::XModel > xModel ); + ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum, css::uno::Reference< css::frame::XModel > xModel ); bool isSelectedSheets() const; |