summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-07-28 09:49:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-07-28 10:42:37 +0200
commit44a11bb8c99e02ac3ac16b405377ea61ffa8841b (patch)
treefb7bac949b877c90518a35bd0278ef3dd51a2779 /xmlscript
parent7091a5416e6e1d5ff8c3b40646de30fe1458db24 (diff)
clang-tidy modernize-pass-by-value in xml*
Change-Id: I9bd5f6adfd138c391d76aebfe08ba01e6b3ab3bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137550 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/exp_share.hxx13
-rw-r--r--xmlscript/source/xmldlg_imexp/imp_share.hxx27
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx5
-rw-r--r--xmlscript/source/xmllib_imexp/imp_share.hxx2
-rw-r--r--xmlscript/source/xmllib_imexp/xmllib_import.cxx5
-rw-r--r--xmlscript/source/xmlmod_imexp/imp_share.hxx2
-rw-r--r--xmlscript/source/xmlmod_imexp/xmlmod_import.cxx5
7 files changed, 32 insertions, 27 deletions
diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx
index 919950c79bef..55a53bcc13b8 100644
--- a/xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx
@@ -19,6 +19,7 @@
#pragma once
+#include <utility>
#include <xmlscript/xmldlg_imexp.hxx>
#include <xmlscript/xml_helper.hxx>
#include <osl/diagnose.h>
@@ -93,13 +94,13 @@ class ElementDescriptor
public:
ElementDescriptor(
- css::uno::Reference< css::beans::XPropertySet > const & xProps,
- css::uno::Reference< css::beans::XPropertyState > const & xPropState,
- OUString const & name, css::uno::Reference< css::frame::XModel > const & xDocument )
+ css::uno::Reference< css::beans::XPropertySet > xProps,
+ css::uno::Reference< css::beans::XPropertyState > xPropState,
+ OUString const & name, css::uno::Reference< css::frame::XModel > xDocument )
: XMLElement( name )
- , _xProps( xProps )
- , _xPropState( xPropState )
- , _xDocument( xDocument )
+ , _xProps(std::move( xProps ))
+ , _xPropState(std::move( xPropState ))
+ , _xDocument(std::move( xDocument ))
{}
explicit ElementDescriptor(
OUString const & name )
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 12da217242de..ef418446998a 100644
--- a/xmlscript/source/xmldlg_imexp/imp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx
@@ -19,6 +19,7 @@
#pragma once
+#include <utility>
#include <xmlscript/xmldlg_imexp.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
@@ -143,16 +144,16 @@ public:
const & getNumberFormatsSupplier();
DialogImport(
- css::uno::Reference<css::uno::XComponentContext> const & xContext,
+ css::uno::Reference<css::uno::XComponentContext> xContext,
css::uno::Reference<css::container::XNameContainer>
const & xDialogModel,
- std::shared_ptr< std::vector< OUString > > const & pStyleNames,
- std::shared_ptr< std::vector< css::uno::Reference< css::xml::input::XElement > > > const & pStyles,
- css::uno::Reference<css::frame::XModel> const & xDoc )
- : _xContext( xContext )
- , _pStyleNames( pStyleNames )
- , _pStyles( pStyles )
- , _xDoc( xDoc )
+ std::shared_ptr< std::vector< OUString > > pStyleNames,
+ std::shared_ptr< std::vector< css::uno::Reference< css::xml::input::XElement > > > pStyles,
+ css::uno::Reference<css::frame::XModel> xDoc )
+ : _xContext(std::move( xContext ))
+ , _pStyleNames(std::move( pStyleNames ))
+ , _pStyles(std::move( pStyles ))
+ , _xDoc(std::move( xDoc ))
, _xDialogModel( xDialogModel )
, _xDialogModelFactory( xDialogModel, css::uno::UNO_QUERY_THROW )
, XMLNS_DIALOGS_UID( 0 )
@@ -204,7 +205,7 @@ protected:
public:
ElementBase(
- sal_Int32 nUid, OUString const & rLocalName,
+ sal_Int32 nUid, OUString aLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport );
virtual ~ElementBase() override;
@@ -371,11 +372,11 @@ protected:
public:
ImportContext(
DialogImport * pImport,
- css::uno::Reference< css::beans::XPropertySet > const & xControlModel_,
- OUString const & id )
+ css::uno::Reference< css::beans::XPropertySet > xControlModel_,
+ OUString id )
: _pImport( pImport ),
- _xControlModel( xControlModel_ ),
- _aId( id )
+ _xControlModel(std::move( xControlModel_ )),
+ _aId(std::move( id ))
{ OSL_ASSERT( _xControlModel.is() ); }
const css::uno::Reference< css::beans::XPropertySet >& getControlModel() const
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 5cac12605faf..ffe491405b92 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
@@ -19,6 +19,7 @@
#include "common.hxx"
#include "imp_share.hxx"
+#include <utility>
#include <xml_import.hxx>
#include <xmlscript/xmlns.h>
@@ -1659,13 +1660,13 @@ Reference< xml::input::XElement > ElementBase::startChildElement(
}
ElementBase::ElementBase(
- sal_Int32 nUid, OUString const & rLocalName,
+ sal_Int32 nUid, OUString aLocalName,
Reference< xml::input::XAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
: m_pImport( pImport )
, m_pParent( pParent )
, _nUid( nUid )
- , _aLocalName( rLocalName )
+ , _aLocalName(std::move(aLocalName ))
, _xAttributes( xAttributes )
{
}
diff --git a/xmlscript/source/xmllib_imexp/imp_share.hxx b/xmlscript/source/xmllib_imexp/imp_share.hxx
index d9ec1c442402..5798c13b92b6 100644
--- a/xmlscript/source/xmllib_imexp/imp_share.hxx
+++ b/xmlscript/source/xmllib_imexp/imp_share.hxx
@@ -153,7 +153,7 @@ private:
public:
LibElementBase(
- OUString const & rLocalName,
+ OUString aLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
LibElementBase * pParent, LibraryImport * pImport );
virtual ~LibElementBase() override;
diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
index 02c46a65f239..2666089c4766 100644
--- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx
+++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx
@@ -22,6 +22,7 @@
#include <sal/log.hxx>
#include "imp_share.hxx"
+#include <utility>
#include <xml_import.hxx>
#include <xmlscript/xmlns.h>
@@ -77,12 +78,12 @@ Reference< xml::input::XElement > LibElementBase::startChildElement(
}
LibElementBase::LibElementBase(
- OUString const & rLocalName,
+ OUString aLocalName,
Reference< xml::input::XAttributes > const & xAttributes,
LibElementBase * pParent, LibraryImport * pImport )
: mxImport( pImport )
, mxParent( pParent )
- , _aLocalName( rLocalName )
+ , _aLocalName(std::move( aLocalName ))
, _xAttributes( xAttributes )
{
}
diff --git a/xmlscript/source/xmlmod_imexp/imp_share.hxx b/xmlscript/source/xmlmod_imexp/imp_share.hxx
index f914c973bdd1..62bde2e30a00 100644
--- a/xmlscript/source/xmlmod_imexp/imp_share.hxx
+++ b/xmlscript/source/xmlmod_imexp/imp_share.hxx
@@ -74,7 +74,7 @@ class ModuleElement
public:
ModuleElement(
- OUString const & rLocalName,
+ OUString aLocalName,
css::uno::Reference< css::xml::input::XAttributes > const & xAttributes,
ModuleImport * pImport );
virtual ~ModuleElement() override;
diff --git a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
index 2751d9856c18..5d84d9a07adf 100644
--- a/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
+++ b/xmlscript/source/xmlmod_imexp/xmlmod_import.cxx
@@ -24,6 +24,7 @@
#include <sal/log.hxx>
#include "imp_share.hxx"
+#include <utility>
#include <xml_import.hxx>
using namespace css;
@@ -78,11 +79,11 @@ Reference< xml::input::XElement > ModuleElement::startChildElement(
}
ModuleElement::ModuleElement(
- OUString const & rLocalName,
+ OUString aLocalName,
Reference< xml::input::XAttributes > const & xAttributes,
ModuleImport * pImport )
: mxImport( pImport )
- , _aLocalName( rLocalName )
+ , _aLocalName(std::move( aLocalName ))
, _xAttributes( xAttributes )
{
}