summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/diagram
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 13:42:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 14:36:02 +0200
commit81002bc718edad94613b20c2480719979b443b99 (patch)
treea25b6474872505e71c34abedef2e3dfc7ccd6435 /oox/source/drawingml/diagram
parent554370661554652e7be96034e310d6863c700285 (diff)
clang-tidy modernize-pass-by-value in oox
Change-Id: Ia553a24693f2ffc0f580c9869b82f0d01a1a0ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/drawingml/diagram')
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.cxx5
-rw-r--r--oox/source/drawingml/diagram/diagramdefinitioncontext.hxx2
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.cxx9
-rw-r--r--oox/source/drawingml/diagram/diagramfragmenthandler.hxx4
-rw-r--r--oox/source/drawingml/diagram/diagramhelper.cxx9
-rw-r--r--oox/source/drawingml/diagram/diagramhelper.hxx4
-rw-r--r--oox/source/drawingml/diagram/diagramlayoutatoms.hxx3
-rw-r--r--oox/source/drawingml/diagram/layoutatomvisitors.hxx5
-rw-r--r--oox/source/drawingml/diagram/layoutnodecontext.cxx5
9 files changed, 26 insertions, 20 deletions
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
index 3742a250c14b..42d78d1f3b66 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
@@ -23,6 +23,7 @@
#include "layoutnodecontext.hxx"
#include <oox/helper/attributelist.hxx>
#include <oox/token/namespaces.hxx>
+#include <utility>
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
@@ -33,9 +34,9 @@ namespace oox::drawingml {
// CT_DiagramDefinition
DiagramDefinitionContext::DiagramDefinitionContext( ContextHandler2Helper const & rParent,
const AttributeList& rAttributes,
- const DiagramLayoutPtr &pLayout )
+ DiagramLayoutPtr pLayout )
: ContextHandler2( rParent )
- , mpLayout( pLayout )
+ , mpLayout(std::move( pLayout ))
{
mpLayout->setDefStyle( rAttributes.getStringDefaulted( XML_defStyle ) );
OUString sValue = rAttributes.getStringDefaulted( XML_minVer );
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
index e92460f5dfb3..022299852706 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.hxx
@@ -28,7 +28,7 @@ namespace oox::drawingml {
class DiagramDefinitionContext : public ::oox::core::ContextHandler2
{
public:
- DiagramDefinitionContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttributes, const DiagramLayoutPtr &pLayout );
+ DiagramDefinitionContext( ::oox::core::ContextHandler2Helper const & rParent, const ::oox::AttributeList& rAttributes, DiagramLayoutPtr pLayout );
virtual ~DiagramDefinitionContext() override;
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
index 02f406e40105..b65fca3f98fc 100644
--- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx
@@ -24,6 +24,7 @@
#include <drawingml/colorchoicecontext.hxx>
#include <oox/helper/attributelist.hxx>
#include <oox/token/namespaces.hxx>
+#include <utility>
using namespace ::oox::core;
using namespace ::com::sun::star::xml::sax;
@@ -33,9 +34,9 @@ namespace oox::drawingml {
DiagramDataFragmentHandler::DiagramDataFragmentHandler( XmlFilterBase& rFilter,
const OUString& rFragmentPath,
- const OoxDiagramDataPtr& rDataPtr )
+ OoxDiagramDataPtr xDataPtr )
: FragmentHandler2( rFilter, rFragmentPath )
- , mpDataPtr( rDataPtr )
+ , mpDataPtr(std::move( xDataPtr ))
{
}
@@ -66,9 +67,9 @@ DiagramDataFragmentHandler::onCreateContext( ::sal_Int32 aElement,
DiagramLayoutFragmentHandler::DiagramLayoutFragmentHandler( XmlFilterBase& rFilter,
const OUString& rFragmentPath,
- const DiagramLayoutPtr& rDataPtr )
+ DiagramLayoutPtr xDataPtr )
: FragmentHandler2( rFilter, rFragmentPath )
- , mpDataPtr( rDataPtr )
+ , mpDataPtr(std::move( xDataPtr ))
{
}
diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
index eb51d6407448..caecb4886ae6 100644
--- a/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
+++ b/oox/source/drawingml/diagram/diagramfragmenthandler.hxx
@@ -29,7 +29,7 @@ namespace oox::drawingml {
class DiagramDataFragmentHandler : public ::oox::core::FragmentHandler2
{
public:
- DiagramDataFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, const OoxDiagramDataPtr& rDataPtr);
+ DiagramDataFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, OoxDiagramDataPtr xDataPtr);
virtual ~DiagramDataFragmentHandler() noexcept override;
virtual void SAL_CALL endDocument() override;
@@ -43,7 +43,7 @@ private:
class DiagramLayoutFragmentHandler : public ::oox::core::FragmentHandler2
{
public:
- DiagramLayoutFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, const DiagramLayoutPtr& rDataPtr);
+ DiagramLayoutFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, DiagramLayoutPtr xDataPtr);
virtual ~DiagramLayoutFragmentHandler() noexcept override;
virtual void SAL_CALL endDocument() override;
diff --git a/oox/source/drawingml/diagram/diagramhelper.cxx b/oox/source/drawingml/diagram/diagramhelper.cxx
index 7b746e0678ba..ebd6f3ebbf4a 100644
--- a/oox/source/drawingml/diagram/diagramhelper.cxx
+++ b/oox/source/drawingml/diagram/diagramhelper.cxx
@@ -28,6 +28,7 @@
#include <comphelper/processfactory.hxx>
#include <oox/drawingml/themefragmenthandler.hxx>
#include <com/sun/star/xml/sax/XFastSAXSerializable.hpp>
+#include <utility>
using namespace ::com::sun::star;
@@ -39,12 +40,12 @@ bool AdvancedDiagramHelper::hasDiagramData() const
}
AdvancedDiagramHelper::AdvancedDiagramHelper(
- const std::shared_ptr< Diagram >& rDiagramPtr,
- const std::shared_ptr<::oox::drawingml::Theme>& rTheme,
+ std::shared_ptr< Diagram > xDiagramPtr,
+ std::shared_ptr<::oox::drawingml::Theme> xTheme,
css::awt::Size aImportSize)
: svx::diagram::IDiagramHelper()
-, mpDiagramPtr(rDiagramPtr)
-, mpThemePtr(rTheme)
+, mpDiagramPtr(std::move(xDiagramPtr))
+, mpThemePtr(std::move(xTheme))
, maImportSize(aImportSize)
{
}
diff --git a/oox/source/drawingml/diagram/diagramhelper.hxx b/oox/source/drawingml/diagram/diagramhelper.hxx
index 85ca4c45728c..6059c2261d50 100644
--- a/oox/source/drawingml/diagram/diagramhelper.hxx
+++ b/oox/source/drawingml/diagram/diagramhelper.hxx
@@ -58,8 +58,8 @@ class AdvancedDiagramHelper final : public svx::diagram::IDiagramHelper
public:
AdvancedDiagramHelper(
- const std::shared_ptr< Diagram >& rDiagramPtr,
- const std::shared_ptr<::oox::drawingml::Theme>& rTheme,
+ std::shared_ptr< Diagram > xDiagramPtr,
+ std::shared_ptr<::oox::drawingml::Theme> xTheme,
css::awt::Size aImportSize);
virtual ~AdvancedDiagramHelper();
diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
index cf80789230d8..5458999029cb 100644
--- a/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
+++ b/oox/source/drawingml/diagram/diagramlayoutatoms.hxx
@@ -24,6 +24,7 @@
#include <memory>
#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+#include <utility>
#include "diagram.hxx"
@@ -354,7 +355,7 @@ class ShapeAtom
: public LayoutAtom
{
public:
- ShapeAtom(LayoutNode& rLayoutNode, const ShapePtr& pShape) : LayoutAtom(rLayoutNode), mpShapeTemplate(pShape) {}
+ ShapeAtom(LayoutNode& rLayoutNode, ShapePtr pShape) : LayoutAtom(rLayoutNode), mpShapeTemplate(std::move(pShape)) {}
virtual void accept( LayoutAtomVisitor& ) override;
const ShapePtr& getShapeTemplate() const
{ return mpShapeTemplate; }
diff --git a/oox/source/drawingml/diagram/layoutatomvisitors.hxx b/oox/source/drawingml/diagram/layoutatomvisitors.hxx
index c04fb1d973ec..7c10fc436d8c 100644
--- a/oox/source/drawingml/diagram/layoutatomvisitors.hxx
+++ b/oox/source/drawingml/diagram/layoutatomvisitors.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_OOX_SOURCE_DRAWINGML_DIAGRAM_LAYOUTATOMVISITORS_HXX
#include <oox/drawingml/drawingmltypes.hxx>
+#include <utility>
#include "diagram.hxx"
#include "diagramlayoutatoms.hxx"
#include "layoutatomvisitorbase.hxx"
@@ -32,9 +33,9 @@ class ShapeCreationVisitor : public LayoutAtomVisitorBase
public:
ShapeCreationVisitor(const Diagram& rDgm,
const svx::diagram::Point* pRootPoint,
- const ShapePtr& rParentShape) :
+ ShapePtr xParentShape) :
LayoutAtomVisitorBase(rDgm, pRootPoint),
- mpParentShape(rParentShape)
+ mpParentShape(std::move(xParentShape))
{}
using LayoutAtomVisitorBase::visit;
diff --git a/oox/source/drawingml/diagram/layoutnodecontext.cxx b/oox/source/drawingml/diagram/layoutnodecontext.cxx
index 68ec7b1367b9..45756e20bd23 100644
--- a/oox/source/drawingml/diagram/layoutnodecontext.cxx
+++ b/oox/source/drawingml/diagram/layoutnodecontext.cxx
@@ -27,6 +27,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include <sal/log.hxx>
+#include <utility>
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
@@ -98,9 +99,9 @@ class ChooseContext
: public ContextHandler2
{
public:
- ChooseContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, const LayoutAtomPtr & pNode )
+ ChooseContext( ContextHandler2Helper const & rParent, const AttributeList& rAttribs, LayoutAtomPtr pNode )
: ContextHandler2( rParent )
- , mpNode( pNode )
+ , mpNode(std::move( pNode ))
{
msName = rAttribs.getStringDefaulted( XML_name );
}