summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-03 14:13:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-03 18:32:32 +0200
commit5a6b4b4f288621772991269180aa3a2cffff01af (patch)
tree8f29ed7593c8e54dc62a1ffcc41f3570eb984064 /include/svl
parentf0b7b388ae06d95007b69812bcf844ac9bed15c4 (diff)
clang-tidy modernize-pass-by-value in svl
Change-Id: I184efd7aee2c3eb02399100a4a7500951255d423 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/cryptosign.hxx5
-rw-r--r--include/svl/custritm.hxx5
-rw-r--r--include/svl/instrm.hxx2
-rw-r--r--include/svl/itemprop.hxx5
-rw-r--r--include/svl/lockfilecommon.hxx2
-rw-r--r--include/svl/macitem.hxx9
-rw-r--r--include/svl/outstrm.hxx2
-rw-r--r--include/svl/style.hxx2
-rw-r--r--include/svl/urlbmk.hxx5
9 files changed, 21 insertions, 16 deletions
diff --git a/include/svl/cryptosign.hxx b/include/svl/cryptosign.hxx
index 5c971cc99f07..3bb682916edc 100644
--- a/include/svl/cryptosign.hxx
+++ b/include/svl/cryptosign.hxx
@@ -9,6 +9,7 @@
#include <sal/types.h>
+#include <utility>
#include <vector>
#include <rtl/strbuf.hxx>
@@ -48,8 +49,8 @@ class SVL_DLLPUBLIC Signing
{
public:
- Signing(const css::uno::Reference<css::security::XCertificate>& xCertificate) :
- m_xCertificate(xCertificate)
+ Signing(css::uno::Reference<css::security::XCertificate> xCertificate) :
+ m_xCertificate(std::move(xCertificate))
{
}
diff --git a/include/svl/custritm.hxx b/include/svl/custritm.hxx
index d46fe011ad6c..90215aff45d3 100644
--- a/include/svl/custritm.hxx
+++ b/include/svl/custritm.hxx
@@ -23,6 +23,7 @@
#include <svl/svldllapi.h>
#include <svl/poolitem.hxx>
#include <cassert>
+#include <utility>
class SVL_DLLPUBLIC CntUnencodedStringItem: public SfxPoolItem
{
@@ -33,8 +34,8 @@ public:
CntUnencodedStringItem(sal_uInt16 which): SfxPoolItem(which)
{}
- CntUnencodedStringItem(sal_uInt16 which, const OUString & rTheValue):
- SfxPoolItem(which), m_aValue(rTheValue)
+ CntUnencodedStringItem(sal_uInt16 which, OUString aTheValue):
+ SfxPoolItem(which), m_aValue(std::move(aTheValue))
{}
virtual bool operator ==(const SfxPoolItem & rItem) const override;
diff --git a/include/svl/instrm.hxx b/include/svl/instrm.hxx
index 6ddccfeaf3c5..66f30a107a05 100644
--- a/include/svl/instrm.hxx
+++ b/include/svl/instrm.hxx
@@ -53,7 +53,7 @@ class SVL_DLLPUBLIC SvInputStream final : public SvStream
SVL_DLLPRIVATE virtual void SetSize(sal_uInt64) override;
public:
- SvInputStream( css::uno::Reference< css::io::XInputStream > const & rTheStream );
+ SvInputStream( css::uno::Reference< css::io::XInputStream > xTheStream );
virtual ~SvInputStream() override;
};
diff --git a/include/svl/itemprop.hxx b/include/svl/itemprop.hxx
index 12954a1324b0..08207f1b173e 100644
--- a/include/svl/itemprop.hxx
+++ b/include/svl/itemprop.hxx
@@ -27,6 +27,7 @@
#include <svl/svldllapi.h>
#include <o3tl/sorted_vector.hxx>
#include <string_view>
+#include <utility>
// values from com/sun/star/beans/PropertyAttribute
#define PROPERTY_NONE 0
@@ -44,9 +45,9 @@ struct SfxItemPropertyMapEntry
sal_uInt8 nMemberId;
PropertyMoreFlags nMoreFlags;
- SfxItemPropertyMapEntry(const OUString & _aName, sal_uInt16 _nWID, css::uno::Type const & _rType,
+ SfxItemPropertyMapEntry(OUString _aName, sal_uInt16 _nWID, css::uno::Type const & _rType,
sal_Int16 _nFlags, sal_uInt8 const _nMemberId, PropertyMoreFlags _nMoreFlags = PropertyMoreFlags::NONE)
- : aName( _aName )
+ : aName(std::move( _aName ))
, aType( _rType )
, nWID( _nWID )
, nFlags( _nFlags )
diff --git a/include/svl/lockfilecommon.hxx b/include/svl/lockfilecommon.hxx
index 054e723ee01d..d71cb8262e92 100644
--- a/include/svl/lockfilecommon.hxx
+++ b/include/svl/lockfilecommon.hxx
@@ -53,7 +53,7 @@ protected:
static OUString GenerateOwnLockFileURL(std::u16string_view aOrigURL, std::u16string_view aPrefix);
public:
- LockFileCommon(const OUString& aLockFileURL);
+ LockFileCommon(OUString aLockFileURL);
virtual ~LockFileCommon();
const OUString& GetURL() const;
diff --git a/include/svl/macitem.hxx b/include/svl/macitem.hxx
index 4d89510346c9..e58871101adc 100644
--- a/include/svl/macitem.hxx
+++ b/include/svl/macitem.hxx
@@ -25,6 +25,7 @@
#include <svl/svldllapi.h>
#include <svl/poolitem.hxx>
#include <map>
+#include <utility>
class SvStream;
enum class SvMacroItemId : sal_uInt16;
@@ -48,9 +49,9 @@ class SVL_DLLPUBLIC SvxMacro
public:
- SvxMacro( const OUString &rMacName, const OUString &rLanguage);
+ SvxMacro( OUString aMacName, const OUString &rLanguage);
- SvxMacro( const OUString &rMacName, const OUString &rLibName,
+ SvxMacro( OUString aMacName, OUString aLibName,
ScriptType eType); // = STARBASIC removes
const OUString &GetLibName() const { return aLibName; }
@@ -62,9 +63,9 @@ public:
bool HasMacro() const { return !aMacName.isEmpty(); }
};
-inline SvxMacro::SvxMacro( const OUString &rMacName, const OUString &rLibName,
+inline SvxMacro::SvxMacro( OUString _aMacName, OUString _aLibName,
ScriptType eTyp )
- : aMacName( rMacName ), aLibName( rLibName ), eType( eTyp )
+ : aMacName(std::move( _aMacName )), aLibName(std::move( _aLibName )), eType( eTyp )
{}
// Macro Table, destroys the pointers in the DTor!
diff --git a/include/svl/outstrm.hxx b/include/svl/outstrm.hxx
index ff694a5c97a5..f85b26515d7e 100644
--- a/include/svl/outstrm.hxx
+++ b/include/svl/outstrm.hxx
@@ -44,7 +44,7 @@ class SVL_DLLPUBLIC SvOutputStream final : public SvStream
SVL_DLLPRIVATE virtual void SetSize(sal_uInt64) override;
public:
- SvOutputStream(css::uno::Reference<css::io::XOutputStream> const& rTheStream);
+ SvOutputStream(css::uno::Reference<css::io::XOutputStream> xTheStream);
virtual ~SvOutputStream() override;
};
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 5ad4d0d33773..b5b7aa3adcf5 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -337,7 +337,7 @@ class UNLESS_MERGELIBS(SVL_DLLPUBLIC) SfxStyleSheetModifiedHint final : public S
OUString aName;
public:
- SfxStyleSheetModifiedHint( const OUString& rOld,
+ SfxStyleSheetModifiedHint( OUString aOld,
SfxStyleSheetBase& );
const OUString& GetOldName() const { return aName; }
};
diff --git a/include/svl/urlbmk.hxx b/include/svl/urlbmk.hxx
index a0b97a2b0d00..e2a090806dcb 100644
--- a/include/svl/urlbmk.hxx
+++ b/include/svl/urlbmk.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SVL_URLBMK_HXX
#include <rtl/ustring.hxx>
+#include <utility>
/**
@@ -36,8 +37,8 @@ class INetBookmark
OUString aDescr;
public:
- INetBookmark( const OUString &rUrl, const OUString &rDescr )
- : aUrl( rUrl ), aDescr( rDescr )
+ INetBookmark( OUString _aUrl, OUString _aDescr )
+ : aUrl(std::move( _aUrl )), aDescr(std::move( _aDescr ))
{}
INetBookmark()
{}