summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-12 10:45:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-12 15:59:38 +0200
commitca2a4a4b1c839c14832043e714297c30087b4b6d (patch)
tree8229dee461d27537ddb828e6693c27d7a2439c5e /xmloff/source/draw
parent2f93eb49db71c8cbaffbd022cb2b654d56920bda (diff)
clang-tidy modernize-pass-by-value in xmloff
Change-Id: Ica07e393763343d0f5caaad6a89fa3378f6ad344 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136995 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/XMLNumberStyles.cxx7
-rw-r--r--xmloff/source/draw/numithdl.cxx6
-rw-r--r--xmloff/source/draw/numithdl.hxx2
-rw-r--r--xmloff/source/draw/sdpropls.cxx9
-rw-r--r--xmloff/source/draw/sdpropls.hxx4
-rw-r--r--xmloff/source/draw/shapeimport.cxx6
-rw-r--r--xmloff/source/draw/xexptran.cxx13
-rw-r--r--xmloff/source/draw/ximplink.cxx5
-rw-r--r--xmloff/source/draw/ximplink.hxx2
-rw-r--r--xmloff/source/draw/ximpshap.cxx9
-rw-r--r--xmloff/source/draw/ximpshap.hxx4
-rw-r--r--xmloff/source/draw/ximpstyl.cxx7
12 files changed, 41 insertions, 33 deletions
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 48bf04c82419..e97414b914a2 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -19,6 +19,7 @@
#include "XMLNumberStylesExport.hxx"
#include <XMLNumberStylesImport.hxx>
+#include <utility>
#include <xmloff/xmlnamespace.hxx>
#include <xmloff/xmlimp.hxx>
#include <xmloff/namespacemap.hxx>
@@ -501,7 +502,7 @@ public:
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
SdXMLNumberFormatImportContext* pParent,
- const SvXMLImportContextRef& rSlaveContext );
+ SvXMLImportContextRef xSlaveContext );
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
@@ -520,11 +521,11 @@ SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext(
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
SdXMLNumberFormatImportContext* pParent,
- const SvXMLImportContextRef& rSlaveContext )
+ SvXMLImportContextRef xSlaveContext )
: SvXMLImportContext(rImport),
mpParent( pParent ),
maNumberStyle( SvXMLImport::getNameFromToken(nElement) ),
- mxSlaveContext( rSlaveContext )
+ mxSlaveContext(std::move( xSlaveContext ))
{
mbLong = false;
mbTextual = false;
diff --git a/xmloff/source/draw/numithdl.cxx b/xmloff/source/draw/numithdl.cxx
index 078ef4826084..4797f6edf9ef 100644
--- a/xmloff/source/draw/numithdl.cxx
+++ b/xmloff/source/draw/numithdl.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <utility>
+
#include "numithdl.hxx"
using namespace ::com::sun::star;
@@ -24,8 +26,8 @@ using namespace ::com::sun::star;
-XMLNumRulePropHdl::XMLNumRulePropHdl( css::uno::Reference< css::ucb::XAnyCompare > const & xNumRuleCompare )
-: mxNumRuleCompare( xNumRuleCompare )
+XMLNumRulePropHdl::XMLNumRulePropHdl( css::uno::Reference< css::ucb::XAnyCompare > xNumRuleCompare )
+: mxNumRuleCompare(std::move( xNumRuleCompare ))
{
}
diff --git a/xmloff/source/draw/numithdl.hxx b/xmloff/source/draw/numithdl.hxx
index 91db9c17e948..503c4c7b6c40 100644
--- a/xmloff/source/draw/numithdl.hxx
+++ b/xmloff/source/draw/numithdl.hxx
@@ -30,7 +30,7 @@ class XMLNumRulePropHdl : public XMLPropertyHandler
private:
css::uno::Reference< css::ucb::XAnyCompare > mxNumRuleCompare;
public:
- explicit XMLNumRulePropHdl( css::uno::Reference< css::ucb::XAnyCompare > const & xNumRuleCompare );
+ explicit XMLNumRulePropHdl( css::uno::Reference< css::ucb::XAnyCompare > xNumRuleCompare );
virtual ~XMLNumRulePropHdl() override;
virtual bool equals( const css::uno::Any& r1, const css::uno::Any& r2 ) const override;
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 5e68aa17599d..a72a57261b58 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/text/WritingMode.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+#include <utility>
#include <xmloff/EnumPropertyHdl.hxx>
#include <xmloff/NamedBoolPropertyHdl.hxx>
#include <WordWrapPropertyHdl.hxx>
@@ -974,13 +975,13 @@ public:
}
-XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > const & xModel, SvXMLImport& rImport )
-: mxModel( xModel ), mpExport(nullptr), mpImport( &rImport )
+XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLImport& rImport )
+: mxModel(std::move( xModel )), mpExport(nullptr), mpImport( &rImport )
{
}
-XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > const & xModel, SvXMLExport& rExport )
-: mxModel( xModel ), mpExport( &rExport ), mpImport(nullptr)
+XMLSdPropHdlFactory::XMLSdPropHdlFactory( uno::Reference< frame::XModel > xModel, SvXMLExport& rExport )
+: mxModel(std::move( xModel )), mpExport( &rExport ), mpImport(nullptr)
{
}
diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx
index c73de5d61904..2a2557a2b742 100644
--- a/xmloff/source/draw/sdpropls.hxx
+++ b/xmloff/source/draw/sdpropls.hxx
@@ -58,8 +58,8 @@ private:
SvXMLImport* mpImport;
public:
- XMLSdPropHdlFactory( css::uno::Reference< css::frame::XModel > const & xModel, SvXMLExport& rExport );
- XMLSdPropHdlFactory( css::uno::Reference< css::frame::XModel > const & xModel, SvXMLImport& rImport );
+ XMLSdPropHdlFactory( css::uno::Reference< css::frame::XModel > xModel, SvXMLExport& rExport );
+ XMLSdPropHdlFactory( css::uno::Reference< css::frame::XModel > xModel, SvXMLImport& rImport );
virtual ~XMLSdPropHdlFactory() override;
virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const override;
};
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 538120d2bfaa..f0e150910ae9 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -535,7 +535,7 @@ public:
sal_Int32 mnCurrentZ;
std::shared_ptr<ShapeGroupContext> mpParentContext;
- ShapeGroupContext( uno::Reference< drawing::XShapes > const & rShapes, std::shared_ptr<ShapeGroupContext> pParentContext );
+ ShapeGroupContext( uno::Reference< drawing::XShapes > xShapes, std::shared_ptr<ShapeGroupContext> pParentContext );
void popGroupAndPostProcess();
private:
@@ -544,8 +544,8 @@ private:
}
-ShapeGroupContext::ShapeGroupContext( uno::Reference< drawing::XShapes > const & rShapes, std::shared_ptr<ShapeGroupContext> pParentContext )
-: mxShapes( rShapes ), mnCurrentZ( 0 ), mpParentContext( std::move(pParentContext) )
+ShapeGroupContext::ShapeGroupContext( uno::Reference< drawing::XShapes > xShapes, std::shared_ptr<ShapeGroupContext> pParentContext )
+: mxShapes(std::move( xShapes )), mnCurrentZ( 0 ), mpParentContext( std::move(pParentContext) )
{
}
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index 776401fb2840..8975241f895e 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -21,6 +21,7 @@
#include <string_view>
+#include <utility>
#include <xexptran.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
@@ -216,8 +217,8 @@ struct ImpSdXMLExpTransObj2DSkewY : public ImpSdXMLExpTransObj2DBase
struct ImpSdXMLExpTransObj2DMatrix : public ImpSdXMLExpTransObj2DBase
{
::basegfx::B2DHomMatrix maMatrix;
- explicit ImpSdXMLExpTransObj2DMatrix(const ::basegfx::B2DHomMatrix& rNew)
- : ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_MATRIX), maMatrix(rNew) {}
+ explicit ImpSdXMLExpTransObj2DMatrix(::basegfx::B2DHomMatrix aNew)
+ : ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_MATRIX), maMatrix(std::move(aNew)) {}
};
}
@@ -596,8 +597,8 @@ struct ImpSdXMLExpTransObj3DTranslate : public ImpSdXMLExpTransObj3DBase
struct ImpSdXMLExpTransObj3DMatrix : public ImpSdXMLExpTransObj3DBase
{
::basegfx::B3DHomMatrix maMatrix;
- explicit ImpSdXMLExpTransObj3DMatrix(const ::basegfx::B3DHomMatrix& rNew)
- : ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_MATRIX), maMatrix(rNew) {}
+ explicit ImpSdXMLExpTransObj3DMatrix(::basegfx::B3DHomMatrix aNew)
+ : ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_MATRIX), maMatrix(std::move(aNew)) {}
};
}
@@ -992,8 +993,8 @@ SdXMLImExViewBox::SdXMLImExViewBox(double fX, double fY, double fW, double fH)
}
// #100617# Asked vincent hardy: svg:viewBox values may be double precision.
-SdXMLImExViewBox::SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverter& rConv)
-: msString(rNew),
+SdXMLImExViewBox::SdXMLImExViewBox(OUString aNew, const SvXMLUnitConverter& rConv)
+: msString(std::move(aNew)),
mfX( 0.0 ),
mfY( 0.0 ),
mfW( 1000.0 ),
diff --git a/xmloff/source/draw/ximplink.cxx b/xmloff/source/draw/ximplink.cxx
index 41b236cc8a9c..24672f9a7415 100644
--- a/xmloff/source/draw/ximplink.cxx
+++ b/xmloff/source/draw/ximplink.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/log.hxx>
+#include <utility>
#include <xmloff/xmlimp.hxx>
#include <xmloff/xmlnamespace.hxx>
#include "ximplink.hxx"
@@ -27,9 +28,9 @@ using namespace ::com::sun::star;
using namespace ::xmloff::token;
-SdXMLShapeLinkContext::SdXMLShapeLinkContext( SvXMLImport& rImport, const uno::Reference< xml::sax::XFastAttributeList>& xAttrList, uno::Reference< drawing::XShapes > const & rShapes)
+SdXMLShapeLinkContext::SdXMLShapeLinkContext( SvXMLImport& rImport, const uno::Reference< xml::sax::XFastAttributeList>& xAttrList, uno::Reference< drawing::XShapes > xShapes)
: SvXMLShapeContext( rImport, false )
-, mxParent( rShapes )
+, mxParent(std::move( xShapes ))
{
for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
{
diff --git a/xmloff/source/draw/ximplink.hxx b/xmloff/source/draw/ximplink.hxx
index cd5259154361..017c6384028e 100644
--- a/xmloff/source/draw/ximplink.hxx
+++ b/xmloff/source/draw/ximplink.hxx
@@ -37,7 +37,7 @@ public:
SdXMLShapeLinkContext( SvXMLImport& rImport,
const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
- css::uno::Reference< css::drawing::XShapes > const & rShapes);
+ css::uno::Reference< css::drawing::XShapes > xShapes);
virtual ~SdXMLShapeLinkContext() override;
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 9e2973403142..22c302205e02 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/presentation/ClickAction.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
+#include <utility>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <com/sun/star/drawing/XGluePointsSupplier.hpp>
#include <com/sun/star/drawing/GluePoint2.hpp>
@@ -143,12 +144,12 @@ static bool ImpIsEmptyURL( std::u16string_view rURL )
SdXMLShapeContext::SdXMLShapeContext(
SvXMLImport& rImport,
- const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
- uno::Reference< drawing::XShapes > const & rShapes,
+ css::uno::Reference< css::xml::sax::XFastAttributeList> xAttrList,
+ uno::Reference< drawing::XShapes > xShapes,
bool bTemporaryShape)
: SvXMLShapeContext( rImport, bTemporaryShape )
- , mxShapes( rShapes )
- , mxAttrList(xAttrList)
+ , mxShapes(std::move( xShapes ))
+ , mxAttrList(std::move(xAttrList))
, mbListContextPushed( false )
, mnStyleFamily(XmlStyleFamily::SD_GRAPHICS_ID)
, mbIsPlaceholder(false)
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 202de49d7bc9..217c773c9785 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -98,8 +98,8 @@ protected:
public:
SdXMLShapeContext( SvXMLImport& rImport,
- const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
- css::uno::Reference< css::drawing::XShapes > const & rShapes,
+ css::uno::Reference< css::xml::sax::XFastAttributeList> xAttrList,
+ css::uno::Reference< css::drawing::XShapes > xShapes,
bool bTemporaryShape);
virtual ~SdXMLShapeContext() override;
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 4befbb00815c..8b818a919129 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -18,6 +18,7 @@
*/
#include "ximpstyl.hxx"
+#include <utility>
#include <xmloff/maptype.hxx>
#include <xmloff/XMLDrawingPageStyleContext.hxx>
#include <xmloff/XMLShapeStyleContext.hxx>
@@ -91,7 +92,7 @@ class XMLThemeContext : public SvXMLImportContext
public:
XMLThemeContext(SvXMLImport& rImport,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
- const uno::Reference<beans::XPropertySet>& xMasterPage);
+ uno::Reference<beans::XPropertySet> xMasterPage);
~XMLThemeContext();
uno::Reference<xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(
@@ -1488,9 +1489,9 @@ void SdXMLHeaderFooterDeclContext::characters( const OUString& rChars )
XMLThemeContext::XMLThemeContext(SvXMLImport& rImport,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList,
- const uno::Reference<beans::XPropertySet>& xMasterPage)
+ uno::Reference<beans::XPropertySet> xMasterPage)
: SvXMLImportContext(rImport)
- , m_xMasterPage(xMasterPage)
+ , m_xMasterPage(std::move(xMasterPage))
{
for (const auto& rAttribute : sax_fastparser::castToFastAttributeList(xAttrList))
{