diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-02 13:42:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-02 14:36:02 +0200 |
commit | 81002bc718edad94613b20c2480719979b443b99 (patch) | |
tree | a25b6474872505e71c34abedef2e3dfc7ccd6435 /oox | |
parent | 554370661554652e7be96034e310d6863c700285 (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')
50 files changed, 159 insertions, 118 deletions
diff --git a/oox/inc/drawingml/textbodycontext.hxx b/oox/inc/drawingml/textbodycontext.hxx index e164e3520d55..e5d41122ee8f 100644 --- a/oox/inc/drawingml/textbodycontext.hxx +++ b/oox/inc/drawingml/textbodycontext.hxx @@ -43,7 +43,7 @@ private: class RegularTextRunContext final : public ::oox::core::ContextHandler2 { public: - RegularTextRunContext( ::oox::core::ContextHandler2Helper const & rParent, TextRunPtr const & pRunPtr ); + RegularTextRunContext( ::oox::core::ContextHandler2Helper const & rParent, TextRunPtr pRunPtr ); virtual void onEndElement() override; virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; diff --git a/oox/source/core/contexthandler.cxx b/oox/source/core/contexthandler.cxx index 80e274c4aa67..082200aa054a 100644 --- a/oox/source/core/contexthandler.cxx +++ b/oox/source/core/contexthandler.cxx @@ -20,6 +20,7 @@ #include <oox/core/contexthandler.hxx> #include <oox/core/fragmenthandler.hxx> +#include <utility> namespace oox::core { @@ -32,8 +33,8 @@ ContextHandler::ContextHandler( const ContextHandler& rParent ) : { } -ContextHandler::ContextHandler( const FragmentBaseDataRef& rxBaseData ) : - mxBaseData( rxBaseData ) +ContextHandler::ContextHandler( FragmentBaseDataRef xBaseData ) : + mxBaseData(std::move( xBaseData )) { } diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx index 2e4e64daa16d..6f22d612aa13 100644 --- a/oox/source/core/filterdetect.cxx +++ b/oox/source/core/filterdetect.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/uri/UriReferenceFactory.hpp> #include <com/sun/star/beans/NamedValue.hpp> +#include <utility> using namespace ::com::sun::star; @@ -51,9 +52,9 @@ using utl::MediaDescriptor; using comphelper::IDocPasswordVerifier; using comphelper::DocPasswordVerifierResult; -FilterDetectDocHandler::FilterDetectDocHandler( const Reference< XComponentContext >& rxContext, OUString& rFilterName, const OUString& rFileName ) : +FilterDetectDocHandler::FilterDetectDocHandler( const Reference< XComponentContext >& rxContext, OUString& rFilterName, OUString aFileName ) : mrFilterName( rFilterName ), - maFileName(rFileName), + maFileName(std::move(aFileName)), maOOXMLVariant( OOXMLVariant::ECMA_Transitional ), mxContext( rxContext ) { diff --git a/oox/source/core/fragmenthandler.cxx b/oox/source/core/fragmenthandler.cxx index 22319fda6e85..cfb1cdb933ed 100644 --- a/oox/source/core/fragmenthandler.cxx +++ b/oox/source/core/fragmenthandler.cxx @@ -20,6 +20,7 @@ #include <oox/core/fragmenthandler.hxx> #include <oox/core/xmlfilterbase.hxx> +#include <utility> namespace oox::core { @@ -27,10 +28,10 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; -FragmentBaseData::FragmentBaseData( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef const & xRelations ) : +FragmentBaseData::FragmentBaseData( XmlFilterBase& rFilter, OUString aFragmentPath, RelationsRef xRelations ) : mrFilter( rFilter ), - maFragmentPath( rFragmentPath ), - mxRelations( xRelations ) + maFragmentPath(std::move( aFragmentPath )), + mxRelations(std::move( xRelations )) { } diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx index d6f35facaf65..24ee5dc0e96c 100644 --- a/oox/source/core/recordparser.cxx +++ b/oox/source/core/recordparser.cxx @@ -19,6 +19,7 @@ #include <oox/core/recordparser.hxx> +#include <utility> #include <vector> #include <com/sun/star/io/IOException.hpp> #include <com/sun/star/lang/DisposedException.hpp> @@ -93,7 +94,7 @@ OUString SAL_CALL Locator::getSystemId() class ContextStack { public: - explicit ContextStack( FragmentHandlerRef const & xHandler ); + explicit ContextStack( FragmentHandlerRef xHandler ); bool empty() const { return maStack.empty(); } @@ -112,8 +113,8 @@ private: ContextInfoVec maStack; }; -ContextStack::ContextStack( FragmentHandlerRef const & xHandler ) : - mxHandler( xHandler ) +ContextStack::ContextStack( FragmentHandlerRef xHandler ) : + mxHandler(std::move( xHandler )) { } diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx index f927c542c89e..cda3f451094a 100644 --- a/oox/source/core/relations.cxx +++ b/oox/source/core/relations.cxx @@ -23,6 +23,7 @@ #include <string_view> #include <oox/core/relations.hxx> +#include <utility> namespace oox::core { @@ -55,8 +56,8 @@ OUString createOfficeDocRelationTypeStrict(std::u16string_view rType) } -Relations::Relations( const OUString& rFragmentPath ) - : maFragmentPath( rFragmentPath ) +Relations::Relations( OUString aFragmentPath ) + : maFragmentPath(std::move( aFragmentPath )) { } diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx index cae8a1331036..858558433cba 100644 --- a/oox/source/crypto/DocumentDecryption.cxx +++ b/oox/source/crypto/DocumentDecryption.cxx @@ -22,6 +22,7 @@ #include <oox/helper/binaryinputstream.hxx> #include <sal/log.hxx> +#include <utility> namespace { @@ -51,10 +52,9 @@ namespace oox::crypto { using namespace css; -DocumentDecryption::DocumentDecryption( - const css::uno::Reference<css::uno::XComponentContext>& rxContext, - oox::ole::OleStorage& rOleStorage) - : mxContext(rxContext) +DocumentDecryption::DocumentDecryption(css::uno::Reference<css::uno::XComponentContext> xContext, + oox::ole::OleStorage& rOleStorage) + : mxContext(std::move(xContext)) , mrOleStorage(rOleStorage) { // Get OLE streams into sequences for later use in CryptoEngine 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 ); } diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 92adac196c71..3ac32abd11aa 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -33,6 +33,7 @@ #include <oox/token/tokens.hxx> #include <sal/log.hxx> #include <drawingml/transform2dcontext.hxx> +#include <utility> using namespace oox::core; using namespace ::com::sun::star; @@ -45,10 +46,10 @@ using namespace ::com::sun::star::xml::sax; namespace oox::drawingml { // CT_Shape -ShapeContext::ShapeContext( ContextHandler2Helper const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr const & pShapePtr ) +ShapeContext::ShapeContext( ContextHandler2Helper const & rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ) : ContextHandler2( rParent ) -, mpMasterShapePtr( pMasterShapePtr ) -, mpShapePtr( pShapePtr ) +, mpMasterShapePtr(std::move( pMasterShapePtr )) +, mpShapePtr(std::move( pShapePtr )) { if( mpMasterShapePtr && mpShapePtr ) mpMasterShapePtr->addChild( mpShapePtr ); diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx index ebe639162c6a..02ce5917e682 100644 --- a/oox/source/drawingml/shapegroupcontext.cxx +++ b/oox/source/drawingml/shapegroupcontext.cxx @@ -29,6 +29,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; @@ -39,9 +40,9 @@ using namespace ::com::sun::star::xml::sax; namespace oox::drawingml { -ShapeGroupContext::ShapeGroupContext( FragmentHandler2 const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr const & pGroupShapePtr ) +ShapeGroupContext::ShapeGroupContext( FragmentHandler2 const & rParent, ShapePtr const & pMasterShapePtr, ShapePtr pGroupShapePtr ) : FragmentHandler2( rParent ) -, mpGroupShapePtr( pGroupShapePtr ) +, mpGroupShapePtr(std::move( pGroupShapePtr )) { if( pMasterShapePtr ) mpGroupShapePtr->setWps(pMasterShapePtr->getWps()); diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index b1e5241aa19a..d647feea485a 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -34,6 +34,7 @@ #include <oox/mathml/import.hxx> #include <sal/log.hxx> +#include <utility> using namespace ::oox::core; using namespace ::com::sun::star::uno; @@ -122,9 +123,9 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken return nullptr; } -RegularTextRunContext::RegularTextRunContext( ContextHandler2Helper const & rParent, TextRunPtr const & pRunPtr ) +RegularTextRunContext::RegularTextRunContext( ContextHandler2Helper const & rParent, TextRunPtr pRunPtr ) : ContextHandler2( rParent ) -, mpRunPtr( pRunPtr ) +, mpRunPtr(std::move( pRunPtr )) , mbIsInText( false ) { } diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx index 9c8acd82846c..19cb4f91cc5f 100644 --- a/oox/source/dump/dffdumper.cxx +++ b/oox/source/dump/dffdumper.cxx @@ -18,6 +18,7 @@ */ #include <oox/dump/dffdumper.hxx> +#include <utility> #ifdef DBG_UTIL @@ -161,8 +162,8 @@ struct PropInfo PropType meType; sal_uInt16 mnId; sal_uInt32 mnSize; - explicit PropInfo( const OUString& rName, PropType eType, sal_uInt16 nId, sal_uInt32 nSize ) : - maName( rName ), meType( eType ), mnId( nId ), mnSize( nSize ) {} + explicit PropInfo( OUString aName, PropType eType, sal_uInt16 nId, sal_uInt32 nSize ) : + maName(std::move( aName )), meType( eType ), mnId( nId ), mnSize( nSize ) {} }; typedef ::std::vector< PropInfo > PropInfoVector; diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 9633352d85c6..e3f0001a3fe3 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -33,6 +33,7 @@ #include <oox/helper/textinputstream.hxx> #include <tools/time.hxx> #include <o3tl/string_view.hxx> +#include <utility> #ifdef DBG_UTIL @@ -1262,11 +1263,11 @@ const NameListRef & NameListWrapper::getNameList( const Config& rCfg ) const } SharedConfigData::SharedConfigData( const OUString& rFileName, - const Reference< XComponentContext >& rxContext, const StorageRef& rxRootStrg, - const OUString& rSysFileName ) : + const Reference< XComponentContext >& rxContext, StorageRef xRootStrg, + OUString aSysFileName ) : mxContext( rxContext ), - mxRootStrg( rxRootStrg ), - maSysFileName( rSysFileName ), + mxRootStrg(std::move( xRootStrg )), + maSysFileName(std::move( aSysFileName )), mbLoaded( false ) { OUString aFileUrl = InputOutputHelper::convertFileNameToUrl( rFileName ); @@ -1692,8 +1693,8 @@ void Output::writeItemName( const String& rItemName ) writeString( rItemName ); } -StorageIterator::StorageIterator( const StorageRef& rxStrg ) : - mxStrg( rxStrg ) +StorageIterator::StorageIterator( StorageRef xStrg ) : + mxStrg(std::move( xStrg )) { if( mxStrg ) mxStrg->getElementNames( maNames ); diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 88a05d6a79ba..0b9345b4eeef 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -135,8 +135,8 @@ bool isPrimaryAxes(sal_Int32 nIndex) class lcl_MatchesRole { public: - explicit lcl_MatchesRole( const OUString & aRole ) : - m_aRole( aRole ) + explicit lcl_MatchesRole( OUString aRole ) : + m_aRole(std::move( aRole )) {} bool operator () ( const Reference< chart2::data::XLabeledDataSequence > & xSeq ) const diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 1bfc59ee13db..8f9269db0de3 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -35,6 +35,7 @@ #include <svx/svdotext.hxx> #include <svx/svdograf.hxx> #include <svx/sdmetitm.hxx> +#include <utility> #include <vcl/cvtgrf.hxx> #include <filter/msfilter/msdffimp.hxx> #include <filter/msfilter/util.hxx> @@ -59,9 +60,9 @@ using namespace com::sun::star; const sal_Int32 Tag_Container = 44444; const sal_Int32 Tag_Commit = 44445; -VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr const & pSerializer, VMLTextExport* pTextExport ) +VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr pSerializer, VMLTextExport* pTextExport ) : EscherEx( std::make_shared<EscherExGlobal>(), nullptr, /*bOOXML=*/true ) - , m_pSerializer( pSerializer ) + , m_pSerializer(std::move( pSerializer )) , m_pTextExport( pTextExport ) , m_eHOri( 0 ) , m_eVOri( 0 ) diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index f327d7eba943..3a4e67acf39a 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -28,6 +28,7 @@ #include <sal/log.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/seqstream.hxx> +#include <utility> #include <vcl/wmfexternal.hxx> #include <vcl/svapp.hxx> #include <vcl/outdev.hxx> @@ -57,9 +58,9 @@ sal_Int32 lclConvertScreenPixelToHmm( double fPixel, double fPixelPerHmm ) } // namespace -GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, const Reference< XFrame >& /*rxTargetFrame*/, const StorageRef& rxStorage ) : +GraphicHelper::GraphicHelper( const Reference< XComponentContext >& rxContext, const Reference< XFrame >& /*rxTargetFrame*/, StorageRef xStorage ) : mxContext( rxContext ), - mxStorage( rxStorage ) + mxStorage(std::move( xStorage )) { OSL_ENSURE( mxContext.is(), "GraphicHelper::GraphicHelper - missing component context" ); if( mxContext.is() ) diff --git a/oox/source/helper/modelobjecthelper.cxx b/oox/source/helper/modelobjecthelper.cxx index c5115bba3e7c..b68af8084fe0 100644 --- a/oox/source/helper/modelobjecthelper.cxx +++ b/oox/source/helper/modelobjecthelper.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/awt/XBitmap.hpp> #include <oox/helper/containerhelper.hxx> +#include <utility> #include <osl/diagnose.h> namespace oox { @@ -37,9 +38,9 @@ using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; -ObjectContainer::ObjectContainer( const Reference< XMultiServiceFactory >& rxModelFactory, const OUString& rServiceName ) : +ObjectContainer::ObjectContainer( const Reference< XMultiServiceFactory >& rxModelFactory, OUString aServiceName ) : mxModelFactory( rxModelFactory ), - maServiceName( rServiceName ), + maServiceName(std::move( aServiceName )), mnIndex( 0 ) { OSL_ENSURE( mxModelFactory.is(), "ObjectContainer::ObjectContainer - missing service factory" ); diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx index 50e7562dc993..46466036316f 100644 --- a/oox/source/helper/storagebase.cxx +++ b/oox/source/helper/storagebase.cxx @@ -24,6 +24,7 @@ #include <rtl/ustrbuf.hxx> #include <oox/helper/binaryinputstream.hxx> #include <oox/helper/binaryoutputstream.hxx> +#include <utility> namespace oox { @@ -74,9 +75,9 @@ StorageBase::StorageBase( const Reference< XStream >& rxOutStream, bool bBaseStr OSL_ENSURE( mxOutStream.is(), "StorageBase::StorageBase - missing base output stream" ); } -StorageBase::StorageBase( const StorageBase& rParentStorage, const OUString& rStorageName, bool bReadOnly ) : +StorageBase::StorageBase( const StorageBase& rParentStorage, OUString aStorageName, bool bReadOnly ) : maParentPath( rParentStorage.getPath() ), - maStorageName( rStorageName ), + maStorageName(std::move( aStorageName )), mbBaseStreamAccess( false ), mbReadOnly( bReadOnly ) { diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index 16f527389924..123ae0072915 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -18,6 +18,7 @@ #include <oox/token/namespaces.hxx> #include <rtl/ustring.hxx> #include <sal/log.hxx> +#include <utility> #define OPENING( token ) XML_STREAM_OPENING( token ) #define CLOSING( token ) XML_STREAM_CLOSING( token ) @@ -140,9 +141,9 @@ XmlStream::Tag::Tag( int t, const uno::Reference< xml::sax::XFastAttributeList > { } -XmlStream::Tag::Tag( int t, const AttributeList& a ) +XmlStream::Tag::Tag( int t, AttributeList a ) : token( t ) -, attributes( a ) +, attributes(std::move( a )) { } diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index a3573b395204..b624fb38a8c7 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -51,6 +51,7 @@ #include <com/sun/star/table/CellRangeAddress.hpp> #include <rtl/tencinfo.h> #include <osl/diagnose.h> +#include <utility> #include <vcl/font.hxx> #include <vcl/outdev.hxx> #include <vcl/settings.hxx> @@ -2654,8 +2655,8 @@ HtmlTextBoxModel::importBinaryModel( BinaryInputStream& rInStrm ) return true; } -EmbeddedControl::EmbeddedControl( const OUString& rName ) : - maName( rName ) +EmbeddedControl::EmbeddedControl( OUString aName ) : + maName(std::move( aName )) { } diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx index 41ab34febea3..f3f73b52f5ed 100644 --- a/oox/source/ole/olehelper.cxx +++ b/oox/source/ole/olehelper.cxx @@ -44,6 +44,7 @@ #include <tools/globname.hxx> #include <unotools/streamwrap.hxx> #include <comphelper/processfactory.hxx> +#include <utility> namespace oox::ole { @@ -203,8 +204,8 @@ StdFontInfo::StdFontInfo() : { } -StdFontInfo::StdFontInfo( const OUString& rName, sal_uInt32 nHeight ) : - maName( rName ), +StdFontInfo::StdFontInfo( OUString aName, sal_uInt32 nHeight ) : + maName(std::move( aName )), mnHeight( nHeight ), mnWeight( OLE_STDFONT_NORMAL ), mnCharSet( WINDOWS_CHARSET_ANSI ), diff --git a/oox/source/ole/oleobjecthelper.cxx b/oox/source/ole/oleobjecthelper.cxx index 9282e2944a20..b71f1ade194a 100644 --- a/oox/source/ole/oleobjecthelper.cxx +++ b/oox/source/ole/oleobjecthelper.cxx @@ -35,6 +35,7 @@ #include <comphelper/sequenceashashmap.hxx> #include <oox/helper/propertymap.hxx> #include <oox/token/properties.hxx> +#include <utility> namespace oox::ole { @@ -57,8 +58,8 @@ const char g_aEmbeddedObjScheme[] = "vnd.sun.star.EmbeddedObject:"; OleObjectHelper::OleObjectHelper( const Reference< XMultiServiceFactory >& rxModelFactory, - uno::Reference<frame::XModel> const& xModel) - : m_xModel(xModel) + uno::Reference<frame::XModel> xModel) + : m_xModel(std::move(xModel)) , mnObjectId( 100 ) { assert(m_xModel.is()); diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx index 4b20e20f842a..5f2ca4d41428 100644 --- a/oox/source/ole/olestorage.cxx +++ b/oox/source/ole/olestorage.cxx @@ -35,6 +35,7 @@ #include <oox/helper/binaryinputstream.hxx> #include <oox/helper/binaryoutputstream.hxx> #include <oox/helper/containerhelper.hxx> +#include <utility> namespace oox::ole { @@ -55,7 +56,7 @@ public: explicit OleOutputStream( const Reference< XComponentContext >& rxContext, const Reference< XNameContainer >& rxStorage, - const OUString& rElementName ); + OUString aElementName ); virtual void SAL_CALL seek( sal_Int64 nPos ) override; virtual sal_Int64 SAL_CALL getPosition() override; @@ -80,9 +81,9 @@ private: }; OleOutputStream::OleOutputStream( const Reference< XComponentContext >& rxContext, - const Reference< XNameContainer >& rxStorage, const OUString& rElementName ) : + const Reference< XNameContainer >& rxStorage, OUString aElementName ) : mxStorage( rxStorage ), - maElementName( rElementName ) + maElementName(std::move( aElementName )) { try { diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx index 01eaff5586af..97d2a6d0adf5 100644 --- a/oox/source/ole/vbaexport.cxx +++ b/oox/source/ole/vbaexport.cxx @@ -31,6 +31,7 @@ #include <sot/storage.hxx> #include <comphelper/xmltools.hxx> +#include <utility> #include <rtl/tencinfo.h> #include <osl/thread.h> @@ -473,8 +474,8 @@ void VBAEncryption::write() #endif -VbaExport::VbaExport(css::uno::Reference<css::frame::XModel> const & xModel): - mxModel(xModel) +VbaExport::VbaExport(css::uno::Reference<css::frame::XModel> xModel): + mxModel(std::move(xModel)) { } diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index 207a76e83bb3..6f1682df070b 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -32,6 +32,7 @@ #include <oox/helper/textinputstream.hxx> #include <oox/ole/vbahelper.hxx> #include <oox/ole/vbainputstream.hxx> +#include <utility> namespace oox::ole { @@ -44,10 +45,10 @@ using ::com::sun::star::awt::KeyEvent; VbaModule::VbaModule( const Reference< XComponentContext >& rxContext, const Reference< frame::XModel >& rxDocModel, - const OUString& rName, rtl_TextEncoding eTextEnc, bool bExecutable ) : + OUString aName, rtl_TextEncoding eTextEnc, bool bExecutable ) : mxContext( rxContext ), mxDocModel( rxDocModel ), - maName( rName ), + maName(std::move( aName )), meTextEnc( eTextEnc ), mnType( script::ModuleType::UNKNOWN ), mnOffset( SAL_MAX_UINT32 ), diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index 001d97bc7513..921caf475aab 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -46,6 +46,7 @@ #include <oox/ole/vbainputstream.hxx> #include <oox/ole/vbamodule.hxx> #include <oox/token/properties.hxx> +#include <utility> namespace oox::ole { @@ -115,8 +116,8 @@ bool VbaFilterConfig::isExportVba() const return lclReadConfigItem( mxConfigAccess, "Save" ); } -VbaMacroAttacherBase::VbaMacroAttacherBase( const OUString& rMacroName ) : - maMacroName( rMacroName ) +VbaMacroAttacherBase::VbaMacroAttacherBase( OUString aMacroName ) : + maMacroName(std::move( aMacroName )) { OSL_ENSURE( !maMacroName.isEmpty(), "VbaMacroAttacherBase::VbaMacroAttacherBase - empty macro name" ); } 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; diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index e88637fc4714..2e4018e4703c 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -36,6 +36,7 @@ #include <oox/drawingml/theme.hxx> #include <oox/drawingml/themefragmenthandler.hxx> #include <memory> +#include <utility> using namespace ::com::sun::star; @@ -43,9 +44,9 @@ namespace oox::shape { using namespace core; using namespace drawingml; -ShapeContextHandler::ShapeContextHandler(const rtl::Reference<ShapeFilterBase>& xFilterBase) : +ShapeContextHandler::ShapeContextHandler(rtl::Reference<ShapeFilterBase> xFilterBase) : m_bFullWPGSUpport(false), - mxShapeFilterBase(xFilterBase) + mxShapeFilterBase(std::move(xFilterBase)) { } diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.cxx b/oox/source/shape/ShapeDrawingFragmentHandler.cxx index aafe004faf17..0e915058fcb4 100644 --- a/oox/source/shape/ShapeDrawingFragmentHandler.cxx +++ b/oox/source/shape/ShapeDrawingFragmentHandler.cxx @@ -11,14 +11,15 @@ #include <oox/drawingml/shapegroupcontext.hxx> #include <oox/token/namespaces.hxx> +#include <utility> using namespace com::sun::star; namespace oox::shape { -ShapeDrawingFragmentHandler::ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr const & pGroupShapePtr) +ShapeDrawingFragmentHandler::ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr pGroupShapePtr) : FragmentHandler2(rFilter, rFragmentPath) - , mpGroupShapePtr(pGroupShapePtr) + , mpGroupShapePtr(std::move(pGroupShapePtr)) { } diff --git a/oox/source/shape/ShapeDrawingFragmentHandler.hxx b/oox/source/shape/ShapeDrawingFragmentHandler.hxx index 68b27f9491ec..15b424b6fd8f 100644 --- a/oox/source/shape/ShapeDrawingFragmentHandler.hxx +++ b/oox/source/shape/ShapeDrawingFragmentHandler.hxx @@ -19,7 +19,7 @@ namespace oox::shape { class ShapeDrawingFragmentHandler : public oox::core::FragmentHandler2 { public: - ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr const & pGroupShapePtr); + ShapeDrawingFragmentHandler(oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, oox::drawingml::ShapePtr pGroupShapePtr); virtual ~ShapeDrawingFragmentHandler() noexcept override; virtual void SAL_CALL endDocument() override; virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const AttributeList& rAttribs ) override; diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 22ea45a3bdd3..8942d13de842 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -23,6 +23,7 @@ #include <o3tl/safeint.hxx> #include <oox/vml/vmlshape.hxx> +#include <utility> #include <vcl/wmfexternal.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -570,9 +571,9 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con PropertySet( rxShape ).setProperties( aPropMap ); } -SimpleShape::SimpleShape( Drawing& rDrawing, const OUString& rService ) : +SimpleShape::SimpleShape( Drawing& rDrawing, OUString aService ) : ShapeBase( rDrawing ), - maService( rService ) + maService(std::move( aService )) { } diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx index e6da71a06d78..ab45720f9cad 100644 --- a/oox/source/vml/vmltextbox.cxx +++ b/oox/source/vml/vmltextbox.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/style/ParagraphAdjust.hpp> #include <comphelper/sequence.hxx> #include <comphelper/sequenceashashmap.hxx> +#include <utility> namespace oox::vml { @@ -39,10 +40,10 @@ TextFontModel::TextFontModel() { } -TextPortionModel::TextPortionModel( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText ) : - maParagraph( rParagraph ), - maFont( rFont ), - maText( rText ) +TextPortionModel::TextPortionModel( TextParagraphModel aParagraph, TextFontModel aFont, OUString aText ) : + maParagraph(std::move( aParagraph )), + maFont(std::move( aFont )), + maText(std::move( aText )) { } diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx index c6b3414be890..b7b41cfc06f0 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -26,6 +26,7 @@ #include <osl/diagnose.h> #include <sal/log.hxx> #include <o3tl/string_view.hxx> +#include <utility> namespace oox::vml { @@ -34,12 +35,12 @@ using ::oox::core::ContextHandler2Helper; using ::oox::core::ContextHandlerRef; TextPortionContext::TextPortionContext( ContextHandler2Helper const & rParent, - TextBox& rTextBox, TextParagraphModel const & rParagraph, const TextFontModel& rParentFont, + TextBox& rTextBox, TextParagraphModel aParagraph, TextFontModel aParentFont, sal_Int32 nElement, const AttributeList& rAttribs ) : ContextHandler2( rParent ), mrTextBox( rTextBox ), - maParagraph( rParagraph ), - maFont( rParentFont ), + maParagraph(std::move( aParagraph )), + maFont(std::move( aParentFont )), mnInitialPortions( rTextBox.getPortionCount() ) { switch( nElement ) |