summaryrefslogtreecommitdiff
path: root/oox/source/ppt
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/ppt
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/ppt')
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.cxx13
-rw-r--r--oox/source/ppt/extdrawingfragmenthandler.hxx6
-rw-r--r--oox/source/ppt/pptgraphicshapecontext.cxx5
-rw-r--r--oox/source/ppt/pptshapecontext.cxx5
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx5
-rw-r--r--oox/source/ppt/slidemastertextstylescontext.cxx5
-rw-r--r--oox/source/ppt/slidepersist.cxx7
-rw-r--r--oox/source/ppt/timenodelistcontext.cxx5
-rw-r--r--oox/source/ppt/timetargetelementcontext.cxx5
-rw-r--r--oox/source/ppt/timetargetelementcontext.hxx2
10 files changed, 33 insertions, 25 deletions
diff --git a/oox/source/ppt/extdrawingfragmenthandler.cxx b/oox/source/ppt/extdrawingfragmenthandler.cxx
index 9aad170c1c4c..96cc02c1a32b 100644
--- a/oox/source/ppt/extdrawingfragmenthandler.cxx
+++ b/oox/source/ppt/extdrawingfragmenthandler.cxx
@@ -12,6 +12,7 @@
#include <oox/ppt/pptshapegroupcontext.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/core/xmlfilterbase.hxx>
+#include <utility>
using namespace ::oox::core;
using namespace ::com::sun::star::xml::sax;
@@ -21,15 +22,15 @@ namespace oox::ppt {
ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( XmlFilterBase& rFilter,
const OUString& rFragmentPath,
- const oox::ppt::SlidePersistPtr& rSlidePersistPtr,
+ oox::ppt::SlidePersistPtr pSlidePersistPtr,
const oox::ppt::ShapeLocation eShapeLocation,
- oox::drawingml::ShapePtr const & pGroupShapePtr,
- oox::drawingml::ShapePtr const & pShapePtr)
+ oox::drawingml::ShapePtr pGroupShapePtr,
+ oox::drawingml::ShapePtr pShapePtr)
: FragmentHandler2( rFilter, rFragmentPath ),
- mpSlidePersistPtr (rSlidePersistPtr ),
+ mpSlidePersistPtr (std::move(pSlidePersistPtr )),
meShapeLocation( eShapeLocation ),
- mpGroupShapePtr( pGroupShapePtr ),
- mpShapePtr( pShapePtr )
+ mpGroupShapePtr(std::move( pGroupShapePtr )),
+ mpShapePtr(std::move( pShapePtr ))
{
}
diff --git a/oox/source/ppt/extdrawingfragmenthandler.hxx b/oox/source/ppt/extdrawingfragmenthandler.hxx
index 22406f3d998f..ddc828af4cfc 100644
--- a/oox/source/ppt/extdrawingfragmenthandler.hxx
+++ b/oox/source/ppt/extdrawingfragmenthandler.hxx
@@ -19,10 +19,10 @@ class ExtDrawingFragmentHandler : public ::oox::core::FragmentHandler2
{
public:
ExtDrawingFragmentHandler( oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath,
- const oox::ppt::SlidePersistPtr& rSlidePersistPtr,
+ oox::ppt::SlidePersistPtr pSlidePersistPtr,
const oox::ppt::ShapeLocation eShapeLocation,
- oox::drawingml::ShapePtr const & pGroupShapePtr,
- oox::drawingml::ShapePtr const & pShapePtr );
+ oox::drawingml::ShapePtr pGroupShapePtr,
+ oox::drawingml::ShapePtr pShapePtr );
virtual ~ExtDrawingFragmentHandler() noexcept override;
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const AttributeList& rAttribs ) override;
diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx
index 3a29d1c76ed5..ff6b56a60184 100644
--- a/oox/source/ppt/pptgraphicshapecontext.cxx
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
@@ -28,6 +28,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include <oox/token/properties.hxx>
+#include <utility>
using namespace oox::core;
using namespace ::com::sun::star;
@@ -37,9 +38,9 @@ using namespace ::com::sun::star::text;
namespace oox::ppt {
// CT_Shape
-PPTGraphicShapeContext::PPTGraphicShapeContext( ContextHandler2Helper const & rParent, const SlidePersistPtr& rSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr )
+PPTGraphicShapeContext::PPTGraphicShapeContext( ContextHandler2Helper const & rParent, SlidePersistPtr pSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr )
: oox::drawingml::GraphicShapeContext( rParent, pMasterShapePtr, pShapePtr )
-, mpSlidePersistPtr( rSlidePersistPtr )
+, mpSlidePersistPtr(std::move( pSlidePersistPtr ))
{
}
diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx
index 82d6908ef036..f127c3a2a23f 100644
--- a/oox/source/ppt/pptshapecontext.cxx
+++ b/oox/source/ppt/pptshapecontext.cxx
@@ -31,6 +31,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
+#include <utility>
using namespace oox::core;
using namespace ::com::sun::star;
@@ -40,9 +41,9 @@ using namespace ::com::sun::star::text;
namespace oox::ppt {
// CT_Shape
-PPTShapeContext::PPTShapeContext( ContextHandler2Helper const & rParent, const SlidePersistPtr& rSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr )
+PPTShapeContext::PPTShapeContext( ContextHandler2Helper const & rParent, SlidePersistPtr pSlidePersistPtr, const oox::drawingml::ShapePtr& pMasterShapePtr, const oox::drawingml::ShapePtr& pShapePtr )
: oox::drawingml::ShapeContext( rParent, pMasterShapePtr, pShapePtr )
-, mpSlidePersistPtr( rSlidePersistPtr )
+, mpSlidePersistPtr(std::move( pSlidePersistPtr ))
{
}
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index 6c6a340a9f8a..dcce466fefd2 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -35,6 +35,7 @@
#include "extdrawingfragmenthandler.hxx"
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
+#include <utility>
using namespace oox::core;
using namespace ::com::sun::star;
@@ -47,12 +48,12 @@ namespace oox::ppt {
PPTShapeGroupContext::PPTShapeGroupContext(
FragmentHandler2 const & rParent,
- const oox::ppt::SlidePersistPtr& rSlidePersistPtr,
+ oox::ppt::SlidePersistPtr pSlidePersistPtr,
const ShapeLocation eShapeLocation,
const oox::drawingml::ShapePtr& pMasterShapePtr,
const oox::drawingml::ShapePtr& pGroupShapePtr )
: ShapeGroupContext( rParent, pMasterShapePtr, pGroupShapePtr )
-, mpSlidePersistPtr( rSlidePersistPtr )
+, mpSlidePersistPtr(std::move( pSlidePersistPtr ))
, meShapeLocation( eShapeLocation )
{
}
diff --git a/oox/source/ppt/slidemastertextstylescontext.cxx b/oox/source/ppt/slidemastertextstylescontext.cxx
index de326c9bb8a1..a069bbe28c8d 100644
--- a/oox/source/ppt/slidemastertextstylescontext.cxx
+++ b/oox/source/ppt/slidemastertextstylescontext.cxx
@@ -21,6 +21,7 @@
#include <drawingml/textliststylecontext.hxx>
#include <oox/ppt/slidemastertextstylescontext.hxx>
#include <oox/token/namespaces.hxx>
+#include <utility>
using namespace ::oox::core;
using namespace ::com::sun::star::uno;
@@ -28,9 +29,9 @@ using namespace ::com::sun::star::xml::sax;
namespace oox::ppt {
-SlideMasterTextStylesContext::SlideMasterTextStylesContext( FragmentHandler2 const & rParent, SlidePersistPtr const & pSlidePersistPtr )
+SlideMasterTextStylesContext::SlideMasterTextStylesContext( FragmentHandler2 const & rParent, SlidePersistPtr pSlidePersistPtr )
: FragmentHandler2( rParent )
-, mpSlidePersistPtr( pSlidePersistPtr )
+, mpSlidePersistPtr(std::move( pSlidePersistPtr ))
{
}
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 8d45bcdb7947..4b590e38cbd0 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/drawing/XGluePointsSupplier.hpp>
#include <com/sun/star/container/XIdentifierContainer.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp>
+#include <utility>
using namespace ::com::sun::star;
using namespace ::oox::core;
@@ -57,14 +58,14 @@ namespace oox::ppt {
SlidePersist::SlidePersist( XmlFilterBase& rFilter, bool bMaster, bool bNotes,
const css::uno::Reference< css::drawing::XDrawPage >& rxPage,
- oox::drawingml::ShapePtr const & pShapesPtr, const drawingml::TextListStylePtr & pDefaultTextStyle )
+ oox::drawingml::ShapePtr pShapesPtr, drawingml::TextListStylePtr pDefaultTextStyle )
: mpDrawingPtr( std::make_shared<oox::vml::Drawing>( rFilter, rxPage, oox::vml::VMLDRAWING_POWERPOINT ) )
, mxPage( rxPage )
-, maShapesPtr( pShapesPtr )
+, maShapesPtr(std::move( pShapesPtr ))
, mnLayoutValueToken( 0 )
, mbMaster( bMaster )
, mbNotes ( bNotes )
-, maDefaultTextStylePtr( pDefaultTextStyle )
+, maDefaultTextStylePtr(std::move( pDefaultTextStyle ))
, maTitleTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
, maBodyTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
, maNotesTextStylePtr( std::make_shared<oox::drawingml::TextListStyle>() )
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx
index 3be3fea7ff9d..728cbb5b970b 100644
--- a/oox/source/ppt/timenodelistcontext.cxx
+++ b/oox/source/ppt/timenodelistcontext.cxx
@@ -39,6 +39,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include <o3tl/string_view.hxx>
+#include <utility>
#include "animvariantcontext.hxx"
#include "commonbehaviorcontext.hxx"
@@ -960,10 +961,10 @@ namespace oox::ppt {
}
TimeNodeContext::TimeNodeContext( FragmentHandler2 const & rParent, sal_Int32 aElement,
- const TimeNodePtr & pNode ) noexcept
+ TimeNodePtr pNode ) noexcept
: FragmentHandler2( rParent )
, mnElement( aElement )
- , mpNode( pNode )
+ , mpNode(std::move( pNode ))
{
}
diff --git a/oox/source/ppt/timetargetelementcontext.cxx b/oox/source/ppt/timetargetelementcontext.cxx
index a6ced3ea90b4..a4003ee1ad37 100644
--- a/oox/source/ppt/timetargetelementcontext.cxx
+++ b/oox/source/ppt/timetargetelementcontext.cxx
@@ -31,6 +31,7 @@
#include <oox/core/xmlfilterbase.hxx>
#include <com/sun/star/io/XInputStream.hpp>
#include <avmedia/mediaitem.hxx>
+#include <utility>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::xml::sax;
@@ -100,9 +101,9 @@ namespace oox::ppt {
}
- TimeTargetElementContext::TimeTargetElementContext( FragmentHandler2 const & rParent, const AnimTargetElementPtr & pValue )
+ TimeTargetElementContext::TimeTargetElementContext( FragmentHandler2 const & rParent, AnimTargetElementPtr pValue )
: FragmentHandler2( rParent ),
- mpTarget( pValue )
+ mpTarget(std::move( pValue ))
{
OSL_ENSURE( mpTarget, "no valid target passed" );
}
diff --git a/oox/source/ppt/timetargetelementcontext.hxx b/oox/source/ppt/timetargetelementcontext.hxx
index 29fed88b6aa1..d420c9e73595 100644
--- a/oox/source/ppt/timetargetelementcontext.hxx
+++ b/oox/source/ppt/timetargetelementcontext.hxx
@@ -30,7 +30,7 @@ namespace oox::ppt {
: public ::oox::core::FragmentHandler2
{
public:
- TimeTargetElementContext( ::oox::core::FragmentHandler2 const & rParent, const AnimTargetElementPtr & aValue );
+ TimeTargetElementContext( ::oox::core::FragmentHandler2 const & rParent, AnimTargetElementPtr aValue );
virtual ~TimeTargetElementContext( ) noexcept override;
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override;