sw/inc/SwAppletImpl.hxx                       |    3 +-
 sw/inc/SwUndoField.hxx                        |    4 +-
 sw/inc/ToxLinkProcessor.hxx                   |    5 ++-
 sw/inc/ToxTextGenerator.hxx                   |    2 -
 sw/inc/UndoParagraphSignature.hxx             |    4 +-
 sw/inc/breakit.hxx                            |    2 -
 sw/inc/calc.hxx                               |    4 +-
 sw/inc/cellfml.hxx                            |    2 -
 sw/inc/dbfld.hxx                              |    8 ++---
 sw/inc/dbmgr.hxx                              |    5 ++-
 sw/inc/ddefld.hxx                             |    2 -
 sw/inc/docufld.hxx                            |   28 ++++++++++----------
 sw/inc/editsh.hxx                             |    5 ++-
 sw/inc/expfld.hxx                             |   11 ++++---
 sw/inc/finalthreadmanager.hxx                 |    2 -
 sw/inc/fmtinfmt.hxx                           |    2 -
 sw/inc/fmtmeta.hxx                            |    2 -
 sw/inc/fmtrfmrk.hxx                           |    2 -
 sw/inc/fmtruby.hxx                            |    2 -
 sw/inc/format.hxx                             |    2 -
 sw/inc/hints.hxx                              |    5 ++-
 sw/inc/htmltbl.hxx                            |    6 ++--
 sw/inc/iodetect.hxx                           |    5 ++-
 sw/inc/list.hxx                               |    2 -
 sw/inc/ndole.hxx                              |    2 -
 sw/inc/numrule.hxx                            |    2 -
 sw/inc/redline.hxx                            |    4 +-
 sw/inc/reffld.hxx                             |    2 -
 sw/inc/section.hxx                            |    2 -
 sw/inc/shellio.hxx                            |   10 +++----
 sw/inc/splargs.hxx                            |    6 ++--
 sw/inc/swscanner.hxx                          |    4 +-
 sw/inc/tblafmt.hxx                            |    2 -
 sw/inc/tox.hxx                                |    4 +-
 sw/inc/unocrsr.hxx                            |    5 ++-
 sw/inc/unoframe.hxx                           |    2 -
 sw/inc/unostyle.hxx                           |    6 ++--
 sw/inc/unotextcursor.hxx                      |    4 +-
 sw/inc/unotxdoc.hxx                           |    8 ++---
 sw/source/core/attr/format.cxx                |    4 +-
 sw/source/core/bastyp/breakit.cxx             |    4 +-
 sw/source/core/bastyp/calc.cxx                |    8 ++---
 sw/source/core/doc/docredln.cxx               |    8 ++---
 sw/source/core/doc/htmltbl.cxx                |   10 +++----
 sw/source/core/doc/list.cxx                   |    4 +-
 sw/source/core/doc/number.cxx                 |    4 +-
 sw/source/core/doc/tblafmt.cxx                |    4 +-
 sw/source/core/docnode/finalthreadmanager.cxx |    4 +-
 sw/source/core/docnode/section.cxx            |    4 +-
 sw/source/core/edit/edfcol.cxx                |    8 ++---
 sw/source/core/fields/cellfml.cxx             |    4 +-
 sw/source/core/fields/dbfld.cxx               |   20 +++++++-------
 sw/source/core/fields/ddefld.cxx              |    4 +-
 sw/source/core/fields/docufld.cxx             |   36 +++++++++++++-------------
 sw/source/core/fields/expfld.cxx              |   12 ++++----
 sw/source/core/fields/macrofld.cxx            |    4 +-
 sw/source/core/fields/reffld.cxx              |    6 ++--
 sw/source/core/fields/scrptfld.cxx            |    4 +-
 sw/source/core/ole/ndole.cxx                  |    4 +-
 sw/source/core/tox/ToxTextGenerator.cxx       |    4 +-
 sw/source/core/tox/tox.cxx                    |    8 ++---
 sw/source/core/txtnode/atrref.cxx             |    4 +-
 sw/source/core/txtnode/fmtatr2.cxx            |   14 +++++-----
 sw/source/core/txtnode/txtedt.cxx             |   12 ++++----
 sw/source/core/undo/SwUndoField.cxx           |    4 +-
 sw/source/core/unocore/unoframe.cxx           |    4 +-
 sw/source/core/unocore/unoobj.cxx             |    8 ++---
 sw/source/core/unocore/unostyle.cxx           |   12 ++++----
 sw/source/filter/basflt/shellio.cxx           |   20 +++++++-------
 sw/source/uibase/uno/unotxdoc.cxx             |   22 +++++++--------
 70 files changed, 227 insertions(+), 219 deletions(-)

New commits:
commit a3e061845b736409094af2bcc2a542ec94b093d9
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Aug 4 09:27:50 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Aug 4 15:08:26 2022 +0200

    clang-tidy modernize-pass-by-value in sw
    
    Change-Id: Ie5c250c64f95e649d33d3f3da7b54e81a4b81d0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137781
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx
index a1abec7b5f4e..24384fda4500 100644
--- a/sw/inc/SwAppletImpl.hxx
+++ b/sw/inc/SwAppletImpl.hxx
@@ -24,6 +24,7 @@
 
 #include <svl/itemset.hxx>
 #include <svl/ownlist.hxx>
+#include <utility>
 
 namespace com::sun::star::embed { class XEmbeddedObject; }
 
@@ -46,7 +47,7 @@ class SwApplet_Impl
 public:
     static SwHtmlOptType GetOptionType( const OUString& rName, bool bApplet );
     SwApplet_Impl( SfxItemPool& rPool );
-    SwApplet_Impl( SfxItemSet const & rSet ): m_aItemSet ( rSet) {}
+    SwApplet_Impl( SfxItemSet aSet ): m_aItemSet (std::move(aSet)) {}
     ~SwApplet_Impl();
     void CreateApplet( const OUString& rCode, const OUString& rName,
                        bool bMayScript, const OUString& rCodeBase,
diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx
index d6145d63127b..5c12c50356ce 100644
--- a/sw/inc/SwUndoField.hxx
+++ b/sw/inc/SwUndoField.hxx
@@ -70,8 +70,8 @@ class SwUndoFieldFromAPI final : public SwUndoField
 
 public:
     SwUndoFieldFromAPI(const SwPosition & rPos,
-                       const css::uno::Any & rOldVal,
-                       const css::uno::Any & rNewVal,
+                       css::uno::Any aOldVal,
+                       css::uno::Any aNewVal,
                        sal_uInt16 nWhich);
     virtual ~SwUndoFieldFromAPI() override;
 
diff --git a/sw/inc/ToxLinkProcessor.hxx b/sw/inc/ToxLinkProcessor.hxx
index 77307cf6b784..d85b0665225e 100644
--- a/sw/inc/ToxLinkProcessor.hxx
+++ b/sw/inc/ToxLinkProcessor.hxx
@@ -14,6 +14,7 @@
 #include <rtl/ustring.hxx>
 
 #include <memory>
+#include <utility>
 #include <vector>
 
 class SwTextNode;
@@ -58,8 +59,8 @@ private:
 
     /** Information about a started link */
     struct StartedLink {
-        StartedLink(sal_Int32 startPosition, const OUString& characterStyle) :
-                mStartPosition(startPosition), mCharacterStyle(characterStyle) 
{
+        StartedLink(sal_Int32 startPosition, OUString characterStyle) :
+                mStartPosition(startPosition), 
mCharacterStyle(std::move(characterStyle)) {
         }
         sal_Int32 mStartPosition;
         OUString mCharacterStyle;
diff --git a/sw/inc/ToxTextGenerator.hxx b/sw/inc/ToxTextGenerator.hxx
index d3a7e9177db0..30581e110a1e 100644
--- a/sw/inc/ToxTextGenerator.hxx
+++ b/sw/inc/ToxTextGenerator.hxx
@@ -58,7 +58,7 @@ class ToxWhitespaceStripper;
 class ToxTextGenerator
 {
 public:
-    ToxTextGenerator(const SwForm& toxForm, 
std::shared_ptr<ToxTabStopTokenHandler> const & tabStopHandler);
+    ToxTextGenerator(const SwForm& toxForm, 
std::shared_ptr<ToxTabStopTokenHandler> tabStopHandler);
 
     virtual ~ToxTextGenerator();
 
diff --git a/sw/inc/UndoParagraphSignature.hxx 
b/sw/inc/UndoParagraphSignature.hxx
index 79bb1624e44c..4fe5640a6193 100644
--- a/sw/inc/UndoParagraphSignature.hxx
+++ b/sw/inc/UndoParagraphSignature.hxx
@@ -48,8 +48,8 @@ private:
     const bool m_bRemove;
 
 public:
-    SwUndoParagraphSigning(SwDoc& rDoc, const 
css::uno::Reference<css::text::XTextField>& xField,
-                           const css::uno::Reference<css::text::XTextContent>& 
xParent,
+    SwUndoParagraphSigning(SwDoc& rDoc, 
css::uno::Reference<css::text::XTextField> xField,
+                           css::uno::Reference<css::text::XTextContent> 
xParent,
                            const bool bRemove);
 
     virtual void UndoImpl(::sw::UndoRedoContext&) override;
diff --git a/sw/inc/breakit.hxx b/sw/inc/breakit.hxx
index f7511decf5e1..a901a1f10a89 100644
--- a/sw/inc/breakit.hxx
+++ b/sw/inc/breakit.hxx
@@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwBreakIt
     SwBreakIt& operator=(SwBreakIt const&) = delete;
 
     // private (see @ Create_, Delete_).
-    explicit SwBreakIt(const css::uno::Reference<css::uno::XComponentContext> 
& rxContext);
+    explicit SwBreakIt(css::uno::Reference<css::uno::XComponentContext> 
xContext);
 
 public:
     // private (see @ source/core/bastyp/init.cxx).
diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index 7acfec20fde8..81ae76f4e29b 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -133,7 +133,7 @@ public:
 // Calculate HashTables for VarTable and Operations
 struct SwHash
 {
-    SwHash( const OUString& rStr );
+    SwHash( OUString aStr );
     virtual ~SwHash();
     OUString aStr;
     std::unique_ptr<SwHash> pNext;
@@ -144,7 +144,7 @@ struct SwCalcExp final : public SwHash
     SwSbxValue  nValue;
     const SwFieldType* pFieldType;
 
-    SwCalcExp( const OUString& rStr, const SwSbxValue& rVal,
+    SwCalcExp( const OUString& rStr, SwSbxValue aVal,
                 const SwFieldType* pFieldType );
 };
 
diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx
index 6f90bca53715..16ca387305b8 100644
--- a/sw/inc/cellfml.hxx
+++ b/sw/inc/cellfml.hxx
@@ -101,7 +101,7 @@ protected:
     // !!! every derived class must override this !!!
     virtual const SwNode* GetNodeOfFormula() const = 0;
 
-    SwTableFormula( const OUString& rFormula );
+    SwTableFormula( OUString aFormula );
 
     OUString MakeFormula( SwTableCalcPara& rCalcPara ) const
     {
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 8904575f319b..1ecbf4dfeeb0 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -35,7 +35,7 @@ class SW_DLLPUBLIC SwDBFieldType final : public 
SwValueFieldType
 
 public:
 
-    SwDBFieldType(SwDoc* pDocPtr, const OUString& rColumnName, const SwDBData& 
rDBData);
+    SwDBFieldType(SwDoc* pDocPtr, const OUString& rColumnName, SwDBData 
aDBData);
     virtual ~SwDBFieldType() override;
 
     virtual OUString GetName() const override;
@@ -128,7 +128,7 @@ protected:
     const SwDBData& GetDBData() const {return m_aDBData;}
     SwDBData&       GetDBData() {return m_aDBData;}
 
-    SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, sal_uInt32 
nFormat = 0);
+    SwDBNameInfField(SwFieldType* pTyp, SwDBData aDBData, sal_uInt32 nFormat = 
0);
 
 public:
     /// DBName
@@ -163,7 +163,7 @@ class SW_DLLPUBLIC SwDBNextSetField final : public 
SwDBNameInfField
 
 public:
     SwDBNextSetField( SwDBNextSetFieldType*,
-                      const OUString& rCond, const SwDBData& rDBData);
+                      OUString aCond, const SwDBData& rDBData);
 
     virtual OUString    ExpandImpl(SwRootFrame const* pLayout) const override;
     virtual std::unique_ptr<SwField> Copy() const override;
@@ -203,7 +203,7 @@ class SwDBNumSetField final : public SwDBNameInfField
     bool    m_bCondValid;
 
 public:
-    SwDBNumSetField(SwDBNumSetFieldType*, const OUString& rCond, const 
OUString& rDBNum, const SwDBData& rDBData);
+    SwDBNumSetField(SwDBNumSetFieldType*, OUString aCond, OUString aDBNum, 
const SwDBData& rDBData);
 
     virtual OUString    ExpandImpl(SwRootFrame const* pLayout) const override;
     virtual std::unique_ptr<SwField> Copy() const override;
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index b2235f214d71..b0d4b756917d 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -32,6 +32,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 
 #include <memory>
+#include <utility>
 #include <vector>
 
 namespace com::sun::star{
@@ -119,10 +120,10 @@ struct SwDSParam : public SwDBData
         {}
 
     SwDSParam(const SwDBData& rData,
-        const css::uno::Reference< css::sdbc::XResultSet>&    xResSet,
+        css::uno::Reference< css::sdbc::XResultSet> xResSet,
         const css::uno::Sequence<  css::uno::Any >&   rSelection) :
         SwDBData(rData),
-        xResultSet(xResSet),
+        xResultSet(std::move(xResSet)),
         aSelection(rSelection),
         bScrollable(true),
         bEndOfDB(false),
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 324e8635dc78..3e37716b675a 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -62,7 +62,7 @@ class SW_DLLPUBLIC SwDDEFieldType final : public SwFieldType
     SAL_DLLPRIVATE void RefCntChgd();
 
 public:
-    SwDDEFieldType( const OUString& rName, const OUString& rCmd,
+    SwDDEFieldType( OUString aName, const OUString& rCmd,
                     SfxLinkUpdateMode );
     virtual ~SwDDEFieldType() override;
 
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 511b9c00890e..76c0c2cb1f51 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -313,15 +313,15 @@ class SW_DLLPUBLIC SwHiddenTextField final : public 
SwField
 public:
     SwHiddenTextField( SwHiddenTextFieldType*,
                      bool   bConditional,
-                     const OUString& rCond,
+                     OUString aCond,
                      const OUString& rText,
                      bool   bHidden,
                      SwFieldTypesEnum nSubType = SwFieldTypesEnum::HiddenText);
 
     SwHiddenTextField( SwHiddenTextFieldType*,
-                      const OUString& rCond,
-                      const OUString& rTrue,
-                      const OUString& rFalse,
+                      OUString aCond,
+                      OUString aTrue,
+                      OUString aFalse,
                       SwFieldTypesEnum nSubType = 
SwFieldTypesEnum::HiddenText);
 
     virtual OUString    GetFieldName() const override;
@@ -367,7 +367,7 @@ class SwHiddenParaField final : public SwField
     bool m_bIsHidden;
 public:
     /// Direct input, delete old value.
-    SwHiddenParaField(SwHiddenParaFieldType*, const OUString& rCond);
+    SwHiddenParaField(SwHiddenParaFieldType*, OUString aCond);
 
     virtual OUString    ExpandImpl(SwRootFrame const* pLayout) const override;
     virtual std::unique_ptr<SwField> Copy() const override;
@@ -403,8 +403,8 @@ class SW_DLLPUBLIC SwMacroField final : public SwField
 
 public:
     /// Direct input, delete old value.
-    SwMacroField( SwMacroFieldType*, const OUString& rLibAndName,
-                  const OUString& rText);
+    SwMacroField( SwMacroFieldType*, OUString aLibAndName,
+                  OUString aText);
 
     const OUString&  GetMacro() const { return m_aMacro; }
     OUString         GetLibName() const;
@@ -461,10 +461,10 @@ public:
     static sal_uInt32 s_nLastPostItId;
 
     SwPostItField( SwPostItFieldType*,
-                   const OUString& rAuthor,
-                   const OUString& rText,
-                   const OUString& rInitials,
-                   const OUString& rName,
+                   OUString aAuthor,
+                   OUString aText,
+                   OUString aInitials,
+                   OUString aName,
                    const DateTime& rDate,
                    const bool bResolved = false,
                    const sal_uInt32 nPostItId = 0);
@@ -667,7 +667,7 @@ class SwJumpEditField final : public SwField
     OUString m_sHelp;
 public:
     SwJumpEditField( SwJumpEditFieldType*, sal_uInt32 nFormat,
-                     const OUString& sText, const OUString& sHelp );
+                     OUString sText, OUString sHelp );
 
     virtual OUString    ExpandImpl(SwRootFrame const* pLayout) const override;
     virtual std::unique_ptr<SwField> Copy() const override;
@@ -704,8 +704,8 @@ class SW_DLLPUBLIC SwScriptField final : public SwField
     bool    m_bCodeURL; ///< Code contains URL of a script.
 
 public:
-    SwScriptField( SwScriptFieldType*, const OUString& rType,
-                   const OUString& rCode, bool bURL );
+    SwScriptField( SwScriptFieldType*, OUString aType,
+                   OUString aCode, bool bURL );
 
     virtual OUString        GetDescription() const override;
 
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 67c18d798a12..663a0ffc35f7 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -30,6 +30,7 @@
 #include "tox.hxx"
 
 #include <memory>
+#include <utility>
 #include <vector>
 #include <o3tl/sorted_vector.hxx>
 
@@ -119,8 +120,8 @@ struct SwGetINetAttr
     OUString sText;
     const SwTextINetFormat& rINetAttr;
 
-    SwGetINetAttr( const OUString& rText, const SwTextINetFormat& rAttr )
-        : sText( rText ), rINetAttr( rAttr )
+    SwGetINetAttr( OUString aText, const SwTextINetFormat& rAttr )
+        : sText(std::move( aText )), rINetAttr( rAttr )
     {}
 };
 typedef std::vector<SwGetINetAttr> SwGetINetAttrs;
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 92ef8136dcde..f8694304f6c1 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -23,6 +23,7 @@
 #include "fldbas.hxx"
 #include "cellfml.hxx"
 #include <memory>
+#include <utility>
 #include <vector>
 #include <tools/solar.h>
 #include <o3tl/sorted_vector.hxx>
@@ -51,8 +52,8 @@ struct SeqFieldLstElem
     OUString sDlgEntry;
     sal_uInt16 nSeqNo;
 
-    SeqFieldLstElem( const OUString& rStr, sal_uInt16 nNo )
-        : sDlgEntry( rStr ), nSeqNo( nNo )
+    SeqFieldLstElem( OUString aStr, sal_uInt16 nNo )
+        : sDlgEntry(std::move( aStr )), nSeqNo( nNo )
     {}
 };
 
@@ -155,7 +156,7 @@ class SW_DLLPUBLIC SwSetExpFieldType final : public 
SwValueFieldType
     virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
 
 public:
-    SwSetExpFieldType( SwDoc* pDoc, const OUString& rName,
+    SwSetExpFieldType( SwDoc* pDoc, OUString aName,
                         sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR );
     virtual std::unique_ptr<SwFieldType> Copy() const override;
     virtual OUString        GetName() const override;
@@ -304,8 +305,8 @@ public:
     /// Direct input via dialog; delete old value.
     SwInputField(
         SwInputFieldType* pFieldType,
-        const OUString& rContent,
-        const OUString& rPrompt,
+        OUString aContent,
+        OUString aPrompt,
         sal_uInt16 nSubType,
         sal_uLong nFormat = 0,
         bool bIsFormField = true );
diff --git a/sw/inc/finalthreadmanager.hxx b/sw/inc/finalthreadmanager.hxx
index be73781e71b3..cf35dd731b47 100644
--- a/sw/inc/finalthreadmanager.hxx
+++ b/sw/inc/finalthreadmanager.hxx
@@ -41,7 +41,7 @@ class FinalThreadManager final : public 
::cppu::WeakImplHelper< css::lang::XServ
                                                            
css::frame::XTerminateListener2 >
 {
 public:
-    explicit FinalThreadManager(css::uno::Reference< 
css::uno::XComponentContext > const & context);
+    explicit FinalThreadManager(css::uno::Reference< 
css::uno::XComponentContext > context);
 
     // css::lang::XServiceInfo:
     virtual OUString SAL_CALL getImplementationName() override;
diff --git a/sw/inc/fmtinfmt.hxx b/sw/inc/fmtinfmt.hxx
index 1abc322bbf2a..32e05f6bd3a9 100644
--- a/sw/inc/fmtinfmt.hxx
+++ b/sw/inc/fmtinfmt.hxx
@@ -48,7 +48,7 @@ class SW_DLLPUBLIC SwFormatINetFormat final
     sal_uInt16 mnINetFormatId;
     sal_uInt16 mnVisitedFormatId;
 public:
-    SwFormatINetFormat( const OUString& rURL, const OUString& rTarget );
+    SwFormatINetFormat( OUString aURL, OUString aTarget );
     SwFormatINetFormat( const SwFormatINetFormat& rAttr );
     SwFormatINetFormat();                     ///< For TypeInfo.
     virtual ~SwFormatINetFormat() override;
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 71031089a67b..5f476e0011a5 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -108,7 +108,7 @@ private:
 
 public:
     /// takes ownership
-    explicit SwFormatMeta( std::shared_ptr< ::sw::Meta > const & i_pMeta,
+    explicit SwFormatMeta( std::shared_ptr< ::sw::Meta > i_pMeta,
                         const sal_uInt16 i_nWhich );
     virtual ~SwFormatMeta() override;
 
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
index 1d7836f46187..0d41e9070e14 100644
--- a/sw/inc/fmtrfmrk.hxx
+++ b/sw/inc/fmtrfmrk.hxx
@@ -45,7 +45,7 @@ class SAL_DLLPUBLIC_RTTI SwFormatRefMark final
     unotools::WeakReference<SwXReferenceMark> m_wXReferenceMark;
 
 public:
-    SwFormatRefMark( const OUString& rText );
+    SwFormatRefMark( OUString aText );
     SwFormatRefMark( const SwFormatRefMark& rRefMark );
     virtual ~SwFormatRefMark( ) override;
 
diff --git a/sw/inc/fmtruby.hxx b/sw/inc/fmtruby.hxx
index 7ac18fef4f83..08f150f09954 100644
--- a/sw/inc/fmtruby.hxx
+++ b/sw/inc/fmtruby.hxx
@@ -37,7 +37,7 @@ class SW_DLLPUBLIC SwFormatRuby final : public SfxPoolItem
     css::text::RubyAdjust m_eAdjustment;      ///< Specific adjustment of the 
Ruby-ch.
 
 public:
-    SwFormatRuby( const OUString& rRubyText );
+    SwFormatRuby( OUString aRubyText );
     SwFormatRuby( const SwFormatRuby& rAttr );
     virtual ~SwFormatRuby() override;
 
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index d2eae51ee1d1..710a249fa9fc 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -68,7 +68,7 @@ class SW_DLLPUBLIC SwFormat : public sw::BorderCacheOwner, 
public sw::Broadcasti
 protected:
     SwFormat( SwAttrPool& rPool, const char* pFormatNm,
             const WhichRangesContainer& pWhichRanges, SwFormat *pDrvdFrame, 
sal_uInt16 nFormatWhich );
-    SwFormat( SwAttrPool& rPool, const OUString &rFormatNm, const 
WhichRangesContainer& pWhichRanges,
+    SwFormat( SwAttrPool& rPool, OUString aFormatNm, const 
WhichRangesContainer& pWhichRanges,
             SwFormat *pDrvdFrame, sal_uInt16 nFormatWhich );
     SwFormat( const SwFormat& rFormat );
     virtual void SwClientNotify(const SwModify&, const SfxHint&) override;
diff --git a/sw/inc/hints.hxx b/sw/inc/hints.hxx
index 9c37399f68f6..9b4962246fa4 100644
--- a/sw/inc/hints.hxx
+++ b/sw/inc/hints.hxx
@@ -21,6 +21,7 @@
 
 #include "swatrset.hxx"
 #include "swtypes.hxx"
+#include <utility>
 #include <vcl/vclptr.hxx>
 
 class SwFormat;
@@ -347,8 +348,8 @@ public:
 
     const OUString& GetString() const { return m_sStr; }
 
-    SwStringMsgPoolItem( sal_uInt16 nId, const OUString& rStr )
-        : SwMsgPoolItem( nId ), m_sStr( rStr )
+    SwStringMsgPoolItem( sal_uInt16 nId, OUString aStr )
+        : SwMsgPoolItem( nId ), m_sStr(std::move( aStr ))
     {}
 };
 #endif
diff --git a/sw/inc/htmltbl.hxx b/sw/inc/htmltbl.hxx
index 5b59f2a8d71d..5213ef8df21b 100644
--- a/sw/inc/htmltbl.hxx
+++ b/sw/inc/htmltbl.hxx
@@ -58,8 +58,8 @@ class SwHTMLTableLayoutCnts
 
 public:
 
-    SwHTMLTableLayoutCnts(const SwStartNode* pSttNd, 
std::shared_ptr<SwHTMLTableLayout> const& rTab,
-                          bool bNoBreakTag, 
std::shared_ptr<SwHTMLTableLayoutCnts> const& rNxt);
+    SwHTMLTableLayoutCnts(const SwStartNode* pSttNd, 
std::shared_ptr<SwHTMLTableLayout> aTab,
+                          bool bNoBreakTag, 
std::shared_ptr<SwHTMLTableLayoutCnts>  rNxt);
 
     void SetTableBox( SwTableBox *pBx ) { m_pBox = pBx; }
     SwTableBox *GetTableBox() const { return m_pBox; }
@@ -93,7 +93,7 @@ class SwHTMLTableLayoutCell
 
 public:
 
-    SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts> const& rCnts,
+    SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts> xCnts,
                          sal_uInt16 nRSpan, sal_uInt16 nCSpan,
                          sal_uInt16 nWidthOpt, bool bPercentWidthOpt,
                          bool bNWrapOpt );
diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx
index 1441815877b7..c81d84742403 100644
--- a/sw/inc/iodetect.hxx
+++ b/sw/inc/iodetect.hxx
@@ -25,6 +25,7 @@
 #include <o3tl/string_view.hxx>
 #include <rtl/ustring.hxx>
 #include <tools/lineend.hxx>
+#include <utility>
 #include <tools/solar.h>
 #include "swdllapi.h"
 
@@ -56,8 +57,8 @@ struct SwIoDetect
 {
     const OUString sName;
 
-    SwIoDetect(const OUString &rN)
-        : sName(rN)
+    SwIoDetect(OUString aN)
+        : sName(std::move(aN))
     {
     }
 
diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx
index d62d3a46ea86..8055eb065dce 100644
--- a/sw/inc/list.hxx
+++ b/sw/inc/list.hxx
@@ -39,7 +39,7 @@ enum class SwListRedlineType
 class SwList
 {
     public:
-        SwList( const OUString& sListId,
+        SwList( OUString sListId,
                 SwNumRule& rDefaultListStyle,
                 const SwNodes& rNodes );
         ~SwList() COVERITY_NOEXCEPT_FALSE;
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 302c9a0a5ebe..5344549f88bf 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -56,7 +56,7 @@ class SW_DLLPUBLIC SwOLEObj
 
 public:
     SwOLEObj( const svt::EmbeddedObjectRef& pObj );
-    SwOLEObj( const OUString &rName, sal_Int64 nAspect );
+    SwOLEObj( OUString aName, sal_Int64 nAspect );
     ~SwOLEObj() COVERITY_NOEXCEPT_FALSE;
 
     bool UnloadObject();
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 20e498961bda..fde2c8de0fb8 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -142,7 +142,7 @@ private:
 
 public:
     /// add parameter <eDefaultNumberFormatPositionAndSpaceMode>
-    SwNumRule( const OUString& rNm,
+    SwNumRule( OUString aNm,
                const SvxNumberFormat::SvxNumPositionAndSpaceMode 
eDefaultNumberFormatPositionAndSpaceMode,
                SwNumRuleType = NUM_RULE );
 
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index a76c9b2eb871..c8123f178c22 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -56,7 +56,7 @@ class SW_DLLPUBLIC SwRedlineExtraData_FormatColl final : 
public SwRedlineExtraDa
     sal_uInt16 m_nPoolId;
     bool m_bFormatAll; // don't strip the last paragraph mark
 public:
-    SwRedlineExtraData_FormatColl( const OUString& rColl, sal_uInt16 
nPoolFormatId,
+    SwRedlineExtraData_FormatColl( OUString aColl, sal_uInt16 nPoolFormatId,
                                 const SfxItemSet* pSet = nullptr, bool 
bFormatAll = true );
     virtual ~SwRedlineExtraData_FormatColl() override;
     virtual SwRedlineExtraData* CreateNew() const override;
@@ -103,7 +103,7 @@ public:
 
     // For sw3io: pNext/pExtraData are taken over.
     SwRedlineData( RedlineType eT, std::size_t nAut, const DateTime& rDT,
-                   const OUString& rCmnt, SwRedlineData* pNxt );
+                   OUString aCmnt, SwRedlineData* pNxt );
 
     ~SwRedlineData();
 
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index c8c8965b5cb1..931441d27725 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -99,7 +99,7 @@ private:
     virtual std::unique_ptr<SwField> Copy() const override;
 
 public:
-    SwGetRefField( SwGetRefFieldType*, const OUString& rSetRef, const 
OUString& rReferenceLanguage,
+    SwGetRefField( SwGetRefFieldType*, OUString aSetRef, OUString 
aReferenceLanguage,
                     sal_uInt16 nSubType, sal_uInt16 nSeqNo, sal_uLong nFormat 
);
 
     virtual ~SwGetRefField() override;
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 5600ecc3dc06..5bcd3f0c1b9a 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -84,7 +84,7 @@ private:
 
 public:
 
-    SwSectionData(SectionType const eType, OUString const& rName);
+    SwSectionData(SectionType const eType, OUString aName);
     explicit SwSectionData(SwSection const&);
     SwSectionData(SwSectionData const&);
     SwSectionData & operator=(SwSectionData const&);
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 437487720073..f88286c57502 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -163,13 +163,13 @@ public:
     // Initial reading. Document is created only at Read(...)
     // or in case it is given, into that.
     // Special case for Load with Sw3Reader.
-    SwReader( SfxMedium&, const OUString& rFilename, SwDoc *pDoc = nullptr );
+    SwReader( SfxMedium&, OUString aFilename, SwDoc *pDoc = nullptr );
 
     // Read into existing document.
     // Document and position in document are taken from SwPaM.
-    SwReader( SvStream&, const OUString& rFilename, const OUString& rBaseURL, 
SwPaM& );
-    SwReader( SfxMedium&, const OUString& rFilename, SwPaM& );
-    SwReader( const css::uno::Reference < css::embed::XStorage >&, const 
OUString& rFilename, SwPaM& );
+    SwReader( SvStream&, OUString aFilename, const OUString& rBaseURL, SwPaM& 
);
+    SwReader( SfxMedium&, OUString aFilename, SwPaM& );
+    SwReader( css::uno::Reference < css::embed::XStorage > , OUString 
aFilename, SwPaM& );
 
     // The only export interface is SwReader::Read(...)!!!
     ErrCode Read( const Reader& );
@@ -520,7 +520,7 @@ public:
     SwWriter( SvStream&, SwDoc & );
     SwWriter( SvStream&, SwPaM &, bool bWriteAll = false );
 
-    SwWriter( const css::uno::Reference < css::embed::XStorage >&, SwDoc& );
+    SwWriter( css::uno::Reference < css::embed::XStorage > , SwDoc& );
 
     SwWriter( SfxMedium&, SwCursorShell &, bool bWriteAll );
     SwWriter( SfxMedium&, SwDoc & );
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 7f0c4795a031..ba5574a15549 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/linguistic2/XSpellChecker1.hpp>
 
 #include <functional>
+#include <utility>
 
 class SwTextFrame;
 class SwTextNode;
@@ -91,13 +92,12 @@ struct SwSpellArgs : SwArgsBase
 
     bool bIsGrammarCheck;
 
-    SwSpellArgs(css::uno::Reference<
-            css::linguistic2::XSpellChecker1 > const &rxSplChk,
+    SwSpellArgs(css::uno::Reference< css::linguistic2::XSpellChecker1 > 
xSplChk,
             SwTextNode* pStart, SwContentIndex& rStart,
             SwTextNode* pEnd, SwContentIndex& rEnd,
             bool bGrammar )
         :   SwArgsBase( pStart, rStart, pEnd, rEnd ),
-            xSpeller( rxSplChk ),
+            xSpeller(std::move( xSplChk )),
             bIsGrammarCheck( bGrammar )
         {}
 };
diff --git a/sw/inc/swscanner.hxx b/sw/inc/swscanner.hxx
index a59d006b2866..5dd118ad0049 100644
--- a/sw/inc/swscanner.hxx
+++ b/sw/inc/swscanner.hxx
@@ -47,8 +47,8 @@ class SwScanner
     bool m_bClip;
 
 public:
-    SwScanner(const std::function<LanguageType(sal_Int32, sal_Int32, bool)>& 
pGetLangOfChar,
-              const OUString& rText, const LanguageType* pLang, const 
ModelToViewHelper& rConvMap,
+    SwScanner(std::function<LanguageType(sal_Int32, sal_Int32, bool)>  
pGetLangOfChar,
+              OUString aText, const LanguageType* pLang, ModelToViewHelper 
aConvMap,
               sal_uInt16 nWordType, sal_Int32 nStart, sal_Int32 nEnd, bool 
bClip = false);
     SwScanner( const SwTextNode& rNd, const OUString& rText,
                const LanguageType* pLang,
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index 4049c28f5714..c056810450be 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -181,7 +181,7 @@ class SW_DLLPUBLIC SwTableAutoFormat
     bool m_bHidden;
     bool m_bUserDefined;
 public:
-    SwTableAutoFormat( const OUString& rName );
+    SwTableAutoFormat( OUString aName );
     SwTableAutoFormat( const SwTableAutoFormat& rNew );
     ~SwTableAutoFormat();
 
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 551ca829a5e5..3357cde5160c 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -173,7 +173,7 @@ public:
 class SwTOXType final: public sw::BroadcastingModify
 {
 public:
-    SwTOXType(SwDoc& rDoc, TOXTypes eTyp, const OUString& rName);
+    SwTOXType(SwDoc& rDoc, TOXTypes eTyp, OUString aName);
 
     // @@@ public copy ctor, but no copy assignment?
     SwTOXType(const SwTOXType& rCopy);
@@ -459,7 +459,7 @@ protected:
 
 public:
     SwTOXBase( const SwTOXType* pTyp, const SwForm& rForm,
-               SwTOXElement nCreaType, const OUString& rTitle );
+               SwTOXElement nCreaType, OUString aTitle );
     SwTOXBase( const SwTOXBase& rCopy, SwDoc* pDoc = nullptr );
     virtual ~SwTOXBase() override;
 
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 72c8fa744dd0..7f4b27ed1bab 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -22,6 +22,7 @@
 #include "swcrsr.hxx"
 #include <svl/SfxBroadcaster.hxx>
 #include <svl/lstner.hxx>
+#include <utility>
 
 namespace sw
 {
@@ -108,8 +109,8 @@ namespace sw
         public:
             UnoCursorPointer()
            {}
-            UnoCursorPointer(std::shared_ptr<SwUnoCursor> const & pCursor)
-                : m_pCursor(pCursor)
+            UnoCursorPointer(std::shared_ptr<SwUnoCursor> pCursor)
+                : m_pCursor(std::move(pCursor))
             {
                 StartListening(m_pCursor->m_aNotifier);
             }
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index 6f89a6bc5a80..e1b1425f103c 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -313,7 +313,7 @@ class SwXOLEListener final : public 
cppu::WeakImplHelper<css::util::XModifyListe
     css::uno::Reference<css::frame::XModel> m_xOLEModel;
 
 public:
-    SwXOLEListener(SwFormat& rOLEFormat, css::uno::Reference< 
css::frame::XModel > const & xOLE);
+    SwXOLEListener(SwFormat& rOLEFormat, css::uno::Reference< 
css::frame::XModel > xOLE);
     virtual ~SwXOLEListener() override;
 
 // css::lang::XEventListener
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index d3f1124785b9..7091fd603602 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -189,7 +189,7 @@ private:
 
 public:
 
-    SwXAutoStyle( SwDoc* pDoc, std::shared_ptr<SfxItemSet> const & pInitSet, 
IStyleAccess::SwAutoStyleFamily eFam );
+    SwXAutoStyle( SwDoc* pDoc, std::shared_ptr<SfxItemSet> pInitSet, 
IStyleAccess::SwAutoStyleFamily eFam );
     virtual ~SwXAutoStyle() override;
 
     //XPropertySet
@@ -340,9 +340,9 @@ class SwXTextCellStyle final : public cppu::WeakImplHelper
     bool m_bPhysical;
 
  public:
-    SwXTextCellStyle(SwDocShell* pDocShell, SwBoxAutoFormat* pBoxAutoFormat, 
const OUString& sParentStyle);
+    SwXTextCellStyle(SwDocShell* pDocShell, SwBoxAutoFormat* pBoxAutoFormat, 
OUString sParentStyle);
     /// Create non physical style
-    SwXTextCellStyle(SwDocShell* pDocShell, const OUString& sName);
+    SwXTextCellStyle(SwDocShell* pDocShell, OUString  sName);
 
     /**
     * This function looks for a SwBoxAutoFormat with given name. Parses the 
name and returns parent name.
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index f3bf0a24dcfe..4979fba063c0 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -89,12 +89,12 @@ public:
 
     SwXTextCursor(
             SwDoc & rDoc,
-            css::uno::Reference< css::text::XText > const& xParent,
+            css::uno::Reference< css::text::XText > xParent,
             const CursorType eType,
             SwPosition const& rPos,
             SwPosition const*const pMark = nullptr);
     SwXTextCursor(
-            css::uno::Reference< css::text::XText > const& xParent,
+            css::uno::Reference< css::text::XText > xParent,
             SwPaM const& rSourceCursor,
             const CursorType eType = CursorType::All);
 
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 94abaac25607..16f83ae149bc 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -522,9 +522,9 @@ class SwXLinkNameAccessWrapper final : public 
cppu::WeakImplHelper
 
 public:
     SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess 
>  const & xAccess,
-            const OUString& rLinkDisplayName, const OUString& sSuffix);
+            OUString aLinkDisplayName, OUString  sSuffix);
     SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
-            const OUString& rLinkDisplayName, const OUString& sSuffix);
+            OUString aLinkDisplayName, OUString sSuffix);
     virtual ~SwXLinkNameAccessWrapper() override;
 
     //XNameAccess
@@ -567,7 +567,7 @@ class SwXOutlineTarget final : public cppu::WeakImplHelper
     const sal_Int32             m_nOutlineLevel;
 
 public:
-    SwXOutlineTarget(const OUString& rOutlineText, const rtl::OUString 
&rActualText,
+    SwXOutlineTarget(OUString aOutlineText, OUString aActualText,
                      const sal_Int32 nOutlineLevel);
     virtual ~SwXOutlineTarget() override;
 
@@ -596,7 +596,7 @@ class SwXDrawingObjectTarget final : public 
cppu::WeakImplHelper
     OUString                    m_sDrawingObjectText;
 
 public:
-    SwXDrawingObjectTarget(const OUString& rDrawingObjectText);
+    SwXDrawingObjectTarget(OUString aDrawingObjectText);
     virtual ~SwXDrawingObjectTarget() override;
 
     //XPropertySet
diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx
index 94b6af99df68..f0e96e060970 100644
--- a/sw/source/core/attr/format.cxx
+++ b/sw/source/core/attr/format.cxx
@@ -56,10 +56,10 @@ SwFormat::SwFormat( SwAttrPool& rPool, const char* 
pFormatNm,
     }
 }
 
-SwFormat::SwFormat( SwAttrPool& rPool, const OUString& rFormatNm,
+SwFormat::SwFormat( SwAttrPool& rPool, OUString aFormatNm,
               const WhichRangesContainer& pWhichRanges, SwFormat* pDrvdFrame,
               sal_uInt16 nFormatWhich ) :
-    m_aFormatName( rFormatNm ),
+    m_aFormatName( std::move(aFormatNm) ),
     m_aSet( rPool, pWhichRanges ),
     m_nWhichId( nFormatWhich ),
     m_nPoolFormatId( USHRT_MAX ),
diff --git a/sw/source/core/bastyp/breakit.cxx 
b/sw/source/core/bastyp/breakit.cxx
index af77672f7eb8..2fd474d0df87 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -49,8 +49,8 @@ SwBreakIt * SwBreakIt::Get()
     return g_pBreakIt;
 }
 
-SwBreakIt::SwBreakIt( const uno::Reference<uno::XComponentContext> & rxContext 
)
-    : m_xContext(rxContext)
+SwBreakIt::SwBreakIt( uno::Reference<uno::XComponentContext> xContext )
+    : m_xContext(std::move(xContext))
     , m_xBreak(i18n::BreakIterator::create(m_xContext))
     , m_aForbiddenLang(LANGUAGE_DONTKNOW)
 {
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 685e7adac17a..baa98a3815db 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1435,8 +1435,8 @@ bool SwCalc::IsValidVarName( const OUString& rStr, 
OUString* pValidName )
     return bRet;
 }
 
-SwHash::SwHash(const OUString& rStr)
-    : aStr(rStr)
+SwHash::SwHash(OUString _aStr)
+    : aStr(std::move(_aStr))
 {
 }
 
@@ -1444,10 +1444,10 @@ SwHash::~SwHash()
 {
 }
 
-SwCalcExp::SwCalcExp(const OUString& rStr, const SwSbxValue& rVal,
+SwCalcExp::SwCalcExp(const OUString& rStr, SwSbxValue aVal,
                       const SwFieldType* pType)
     : SwHash(rStr)
-    , nValue(rVal)
+    , nValue(std::move(aVal))
     , pFieldType(pType)
 {
 }
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index edc8b44752e9..9fc6314e218e 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -868,11 +868,11 @@ bool SwRedlineExtraData::operator == ( const 
SwRedlineExtraData& ) const
     return false;
 }
 
-SwRedlineExtraData_FormatColl::SwRedlineExtraData_FormatColl( const OUString& 
rColl,
+SwRedlineExtraData_FormatColl::SwRedlineExtraData_FormatColl( OUString aColl,
                                                 sal_uInt16 nPoolFormatId,
                                                 const SfxItemSet* pItemSet,
                                                 bool bFormatAll )
-    : m_sFormatNm(rColl), m_nPoolId(nPoolFormatId), m_bFormatAll(bFormatAll)
+    : m_sFormatNm(std::move(aColl)), m_nPoolId(nPoolFormatId), 
m_bFormatAll(bFormatAll)
 {
     if( pItemSet && pItemSet->Count() )
         m_pSet.reset( new SfxItemSet( *pItemSet ) );
@@ -1029,8 +1029,8 @@ SwRedlineData::SwRedlineData(
 
 // For sw3io: We now own pNext!
 SwRedlineData::SwRedlineData(RedlineType eT, std::size_t nAut, const DateTime& 
rDT,
-    const OUString& rCmnt, SwRedlineData *pNxt)
-    : m_pNext(pNxt), m_pExtraData(nullptr), m_sComment(rCmnt), m_aStamp(rDT),
+    OUString aCmnt, SwRedlineData *pNxt)
+    : m_pNext(pNxt), m_pExtraData(nullptr), m_sComment(std::move(aCmnt)), 
m_aStamp(rDT),
     m_nAuthor(nAut), m_eType(eT), m_nSeqNo(0), m_bAutoFormat(false), 
m_bMoved(false)
 {
 }
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 19f8e330587a..c21da4c8017a 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -78,10 +78,10 @@ public:
 }
 
 SwHTMLTableLayoutCnts::SwHTMLTableLayoutCnts(const SwStartNode *pSttNd,
-                                             
std::shared_ptr<SwHTMLTableLayout> const& rTab,
+                                             
std::shared_ptr<SwHTMLTableLayout> xTab,
                                              bool bNoBrTag,
-                                             
std::shared_ptr<SwHTMLTableLayoutCnts> const& rNxt ) :
-    m_xNext( rNxt ), m_pBox( nullptr ), m_xTable( rTab ), m_pStartNode( pSttNd 
),
+                                             
std::shared_ptr<SwHTMLTableLayoutCnts> xNxt ) :
+    m_xNext( std::move(xNxt) ), m_pBox( nullptr ), m_xTable( std::move(xTab) 
), m_pStartNode( pSttNd ),
     m_nPass1Done( 0 ), m_nWidthSet( 0 ), m_bNoBreakTag( bNoBrTag )
 {}
 
@@ -90,11 +90,11 @@ const SwStartNode *SwHTMLTableLayoutCnts::GetStartNode() 
const
     return m_pBox ? m_pBox->GetSttNd() : m_pStartNode;
 }
 
-SwHTMLTableLayoutCell::SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts>
 const& rCnts,
+SwHTMLTableLayoutCell::SwHTMLTableLayoutCell(std::shared_ptr<SwHTMLTableLayoutCnts>
 xCnts,
                                           sal_uInt16 nRSpan, sal_uInt16 nCSpan,
                                           sal_uInt16 nWidth, bool 
bPercentWidth,
                                           bool bNWrapOpt ) :
-    m_xContents(rCnts),
+    m_xContents(std::move(xCnts)),
     m_nRowSpan( nRSpan ), m_nColSpan( nCSpan ),
     m_nWidthOption( nWidth ), m_bPercentWidthOption( bPercentWidth ),
     m_bNoWrapOption( bNWrapOpt )
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index 1a6c4504631c..706ba19ce40f 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -23,10 +23,10 @@
 #include <ndarr.hxx>
 #include <node.hxx>
 
-SwList::SwList( const OUString& sListId,
+SwList::SwList( OUString sListId,
                         SwNumRule& rDefaultListStyle,
                         const SwNodes& rNodes )
-    : msListId( sListId ),
+    : msListId( std::move(sListId) ),
       msDefaultListStyleName( rDefaultListStyle.GetName() ),
       mnMarkedListLevel( MAXLEVEL )
 {
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 74e039155307..9a62e8603388 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -360,11 +360,11 @@ const SwFormatVertOrient*      
SwNumFormat::GetGraphicOrientation() const
     }
 }
 
-SwNumRule::SwNumRule( const OUString& rNm,
+SwNumRule::SwNumRule( OUString aNm,
                       const SvxNumberFormat::SvxNumPositionAndSpaceMode 
eDefaultNumberFormatPositionAndSpaceMode,
                       SwNumRuleType eType )
   : mpNumRuleMap(nullptr),
-    msName( rNm ),
+    msName( std::move(aNm) ),
     meRuleType( eType ),
     mnPoolFormatId( USHRT_MAX ),
     mnPoolHelpId( USHRT_MAX ),
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 8c47e9859bf2..9a8cd8bff543 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -360,8 +360,8 @@ bool SwBoxAutoFormat::Save( SvStream& rStream, sal_uInt16 
fileVersion ) const
     return ERRCODE_NONE == rStream.GetError();
 }
 
-SwTableAutoFormat::SwTableAutoFormat( const OUString& rName )
-    : m_aName( rName )
+SwTableAutoFormat::SwTableAutoFormat( OUString aName )
+    : m_aName( std::move(aName) )
     , m_nStrResId( USHRT_MAX )
     , m_aKeepWithNextPara(std::make_shared<SvxFormatKeepItem>(false, RES_KEEP))
     , m_aRepeatHeading( 0 )
diff --git a/sw/source/core/docnode/finalthreadmanager.cxx 
b/sw/source/core/docnode/finalthreadmanager.cxx
index bfae4a6b443e..4eb80a07168b 100644
--- a/sw/source/core/docnode/finalthreadmanager.cxx
+++ b/sw/source/core/docnode/finalthreadmanager.cxx
@@ -222,8 +222,8 @@ void SAL_CALL TerminateOfficeThread::onTerminated()
         delete this;
 }
 
-FinalThreadManager::FinalThreadManager(css::uno::Reference< 
css::uno::XComponentContext > const & context)
-    : m_xContext(context),
+FinalThreadManager::FinalThreadManager(css::uno::Reference< 
css::uno::XComponentContext > context)
+    : m_xContext(std::move(context)),
       mpTerminateOfficeThread( nullptr ),
       mbRegisteredAtDesktop( false )
 {
diff --git a/sw/source/core/docnode/section.cxx 
b/sw/source/core/docnode/section.cxx
index 6306b1c33684..6b543c801bdc 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -91,9 +91,9 @@ namespace {
     };
 }
 
-SwSectionData::SwSectionData(SectionType const eType, OUString const& rName)
+SwSectionData::SwSectionData(SectionType const eType, OUString aName)
     : m_eType(eType)
-    , m_sSectionName(rName)
+    , m_sSectionName(std::move(aName))
     , m_bHiddenFlag(false)
     , m_bProtectFlag(false)
     , m_bEditInReadonlyFlag(false) // edit in readonly sections
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 829db44d1b3f..af8248d0e165 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1667,13 +1667,13 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& 
rWatermark)
 }
 
 SwUndoParagraphSigning::SwUndoParagraphSigning(SwDoc& rDoc,
-                                               const 
uno::Reference<text::XTextField>& xField,
-                                               const 
uno::Reference<text::XTextContent>& xParent,
+                                               
uno::Reference<text::XTextField> xField,
+                                               
uno::Reference<text::XTextContent> xParent,
                                                const bool bRemove)
   : SwUndo(SwUndoId::PARA_SIGN_ADD, &rDoc),
     m_rDoc(rDoc),
-    m_xField(xField),
-    m_xParent(xParent),
+    m_xField(std::move(xField)),
+    m_xParent(std::move(xParent)),
     m_bRemove(bRemove)
 {
     // Save the metadata and field content to undo/redo.
diff --git a/sw/source/core/fields/cellfml.cxx 
b/sw/source/core/fields/cellfml.cxx
index 339a0337b561..6cf4f48f3bf9 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -320,8 +320,8 @@ bool SwTableCalcPara::CalcWithStackOverflow()
     return !m_rCalc.IsCalcError();
 }
 
-SwTableFormula::SwTableFormula( const OUString& rFormula )
-: m_sFormula( rFormula )
+SwTableFormula::SwTableFormula( OUString aFormula )
+: m_sFormula( std::move(aFormula) )
 , m_eNmType( EXTRNL_NAME )
 , m_bValidValue( false )
 {
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 7263997feb0a..b6c622b087ae 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -45,9 +45,9 @@ static OUString lcl_DBSeparatorConvert(const OUString& 
aContent)
 
 // database field type
 
-SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const OUString& rNam, const 
SwDBData& rDBData ) :
+SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const OUString& rNam, SwDBData 
aDBData ) :
     SwValueFieldType( pDocPtr, SwFieldIds::Database ),
-    m_aDBData(rDBData),
+    m_aDBData(std::move(aDBData)),
     m_sName(rNam),
     m_sColumn(rNam),
     m_nRefCnt(0)
@@ -439,9 +439,9 @@ bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 
nWhichId )
 
 // base class for all further database fields
 
-SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, 
sal_uInt32 nFormat) :
+SwDBNameInfField::SwDBNameInfField(SwFieldType* pTyp, SwDBData aDBData, 
sal_uInt32 nFormat) :
     SwField(pTyp, nFormat),
-    m_aDBData(rDBData),
+    m_aDBData(std::move(aDBData)),
     m_nSubType(0)
 {
 }
@@ -553,9 +553,9 @@ std::unique_ptr<SwFieldType> SwDBNextSetFieldType::Copy() 
const
 // SwDBSetField
 
 SwDBNextSetField::SwDBNextSetField(SwDBNextSetFieldType* pTyp,
-                                   const OUString& rCond,
+                                   OUString aCond,
                                    const SwDBData& rDBData) :
-    SwDBNameInfField(pTyp, rDBData), m_aCond(rCond), m_bCondValid(true)
+    SwDBNameInfField(pTyp, rDBData), m_aCond(std::move(aCond)), 
m_bCondValid(true)
 {}
 
 OUString SwDBNextSetField::ExpandImpl(SwRootFrame const*const) const
@@ -635,12 +635,12 @@ std::unique_ptr<SwFieldType> SwDBNumSetFieldType::Copy() 
const
 }
 
 SwDBNumSetField::SwDBNumSetField(SwDBNumSetFieldType* pTyp,
-                                 const OUString& rCond,
-                                 const OUString& rDBNum,
+                                 OUString aCond,
+                                 OUString aDBNum,
                                  const SwDBData& rDBData) :
     SwDBNameInfField(pTyp, rDBData),
-    m_aCond(rCond),
-    m_aPar2(rDBNum),
+    m_aCond(std::move(aCond)),
+    m_aPar2(std::move(aDBNum)),
     m_bCondValid(true)
 {}
 
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 8b326d02cd62..c80e514593ce 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -144,10 +144,10 @@ bool SwIntrnlRefLink::IsInRange( SwNodeOffset nSttNd, 
SwNodeOffset nEndNd ) cons
     return bInRange;
 }
 
-SwDDEFieldType::SwDDEFieldType(const OUString& rName,
+SwDDEFieldType::SwDDEFieldType( OUString aName,
                                const OUString& rCmd, SfxLinkUpdateMode 
nUpdateType )
     : SwFieldType( SwFieldIds::Dde ),
-    m_aName( rName ), m_pDoc( nullptr ), m_nRefCount( 0 )
+    m_aName( std::move(aName) ), m_pDoc( nullptr ), m_nRefCount( 0 )
 {
     m_bCRLFFlag = m_bDeleted = false;
     m_RefLink = new SwIntrnlRefLink( *this, nUpdateType );
diff --git a/sw/source/core/fields/docufld.cxx 
b/sw/source/core/fields/docufld.cxx
index a773904615b0..3128aeeaf9c7 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1269,11 +1269,11 @@ void SwHiddenTextFieldType::SetHiddenFlag( bool 
bSetHidden )
 
 SwHiddenTextField::SwHiddenTextField( SwHiddenTextFieldType* pFieldType,
                                     bool    bConditional,
-                                    const OUString& rCond,
+                                    OUString aCond,
                                     const OUString& rStr,
                                     bool    bHidden,
                                     SwFieldTypesEnum  nSub) :
-    SwField( pFieldType ), m_aCond(rCond), m_nSubType(nSub),
+    SwField( pFieldType ), m_aCond(std::move(aCond)), m_nSubType(nSub),
     m_bCanToggle(bConditional), m_bIsHidden(bHidden), m_bValid(false)
 {
     if(m_nSubType == SwFieldTypesEnum::ConditionalText)
@@ -1296,11 +1296,11 @@ SwHiddenTextField::SwHiddenTextField( 
SwHiddenTextFieldType* pFieldType,
 }
 
 SwHiddenTextField::SwHiddenTextField( SwHiddenTextFieldType* pFieldType,
-                                    const OUString& rCond,
-                                    const OUString& rTrue,
-                                    const OUString& rFalse,
+                                    OUString aCond,
+                                    OUString aTrue,
+                                    OUString aFalse,
                                     SwFieldTypesEnum nSub)
-    : SwField( pFieldType ), m_aTRUEText(rTrue), m_aFALSEText(rFalse), 
m_aCond(rCond), m_nSubType(nSub),
+    : SwField( pFieldType ), m_aTRUEText(std::move(aTrue)), 
m_aFALSEText(std::move(aFalse)), m_aCond(std::move(aCond)), m_nSubType(nSub),
       m_bIsHidden(true), m_bValid(false)
 {
     m_bCanToggle = !m_aCond.isEmpty();
@@ -1649,8 +1649,8 @@ std::unique_ptr<SwFieldType> 
SwHiddenParaFieldType::Copy() const
 
 // field for line height 0
 
-SwHiddenParaField::SwHiddenParaField(SwHiddenParaFieldType* pTyp, const 
OUString& rStr)
-    : SwField(pTyp), m_aCond(rStr)
+SwHiddenParaField::SwHiddenParaField(SwHiddenParaFieldType* pTyp, OUString 
aStr)
+    : SwField(pTyp), m_aCond(std::move(aStr))
 {
     m_bIsHidden = false;
 }
@@ -1729,19 +1729,19 @@ std::unique_ptr<SwFieldType> SwPostItFieldType::Copy() 
const
 sal_uInt32 SwPostItField::s_nLastPostItId = 1;
 
 SwPostItField::SwPostItField( SwPostItFieldType* pT,
-        const OUString& rAuthor,
-        const OUString& rText,
-        const OUString& rInitials,
-        const OUString& rName,
+        OUString aAuthor,
+        OUString aText,
+        OUString aInitials,
+        OUString aName,
         const DateTime& rDateTime,
         const bool bResolved,
         const sal_uInt32 nPostItId
 )
     : SwField( pT )
-    , m_sText( rText )
-    , m_sAuthor( rAuthor )
-    , m_sInitials( rInitials )
-    , m_sName( rName )
+    , m_sText( std::move(aText) )
+    , m_sAuthor( std::move(aAuthor) )
+    , m_sInitials( std::move(aInitials) )
+    , m_sName( std::move(aName) )
     , m_aDateTime( rDateTime )
     , m_bResolved( bResolved )
 {
@@ -2479,8 +2479,8 @@ SwCharFormat* SwJumpEditFieldType::GetCharFormat()
 }
 
 SwJumpEditField::SwJumpEditField( SwJumpEditFieldType* pTyp, sal_uInt32 nForm,
-                                const OUString& rText, const OUString& rHelp )
-    : SwField( pTyp, nForm ), m_sText( rText ), m_sHelp( rHelp )
+                                OUString aText, OUString aHelp )
+    : SwField( pTyp, nForm ), m_sText( std::move(aText) ), m_sHelp( 
std::move(aHelp) )
 {
 }
 
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index f0a0f474312c..728489a20217 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -506,9 +506,9 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, 
sal_uInt16 nWhichId )
     return true;
 }
 
-SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const OUString& rName, 
sal_uInt16 nTyp )
+SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, OUString aName, sal_uInt16 
nTyp )
     : SwValueFieldType( pDc, SwFieldIds::SetExp ),
-    m_sName( rName ),
+    m_sName( std::move(aName) ),
     m_sDelim( "." ),
     m_nType(nTyp), m_nLevel( UCHAR_MAX ),
     m_bDeleted( false )
@@ -1215,14 +1215,14 @@ std::unique_ptr<SwFieldType> SwInputFieldType::Copy() 
const
 }
 
 SwInputField::SwInputField( SwInputFieldType* pFieldType,
-                            const OUString& rContent,
-                            const OUString& rPrompt,
+                            OUString aContent,
+                            OUString aPrompt,
                             sal_uInt16 nSub,
                             sal_uLong nFormat,
                             bool bIsFormField )
     : SwField( pFieldType, nFormat, LANGUAGE_SYSTEM, false )
-    , maContent(rContent)
-    , maPText(rPrompt)
+    , maContent(std::move(aContent))
+    , maPText(std::move(aPrompt))
     , mnSubType(nSub)
     , mbIsFormField( bIsFormField )
     , mpFormatField( nullptr )
diff --git a/sw/source/core/fields/macrofld.cxx 
b/sw/source/core/fields/macrofld.cxx
index 2430a859afbe..efab24d877cf 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -39,8 +39,8 @@ std::unique_ptr<SwFieldType> SwMacroFieldType::Copy() const
 }
 
 SwMacroField::SwMacroField(SwMacroFieldType* pInitType,
-                           const OUString& rLibAndName, const OUString& rText) 
:
-    SwField(pInitType), m_aMacro(rLibAndName), m_aText(rText), 
m_bIsScriptURL(false)
+                           OUString aLibAndName, OUString aText) :
+    SwField(pInitType), m_aMacro(std::move(aLibAndName)), 
m_aText(std::move(aText)), m_bIsScriptURL(false)
 {
     m_bIsScriptURL = isScriptURL(m_aMacro);
 }
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 6bedbdcbd79a..03ad0ee90920 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -346,11 +346,11 @@ static void lcl_formatReferenceLanguage( OUString& 
rRefText,
 
 /// get references
 SwGetRefField::SwGetRefField( SwGetRefFieldType* pFieldType,
-                              const OUString& rSetRef, const OUString& 
rSetReferenceLanguage, sal_uInt16 nSubTyp,
+                              OUString aSetRef, OUString 
aSetReferenceLanguage, sal_uInt16 nSubTyp,
                               sal_uInt16 nSequenceNo, sal_uLong nFormat )
     : SwField( pFieldType, nFormat ),
-      m_sSetRefName( rSetRef ),
-      m_sSetReferenceLanguage( rSetReferenceLanguage ),
+      m_sSetRefName( std::move(aSetRef) ),
+      m_sSetReferenceLanguage( std::move(aSetReferenceLanguage) ),
       m_nSubType( nSubTyp ),
       m_nSeqNo( nSequenceNo )
 {
diff --git a/sw/source/core/fields/scrptfld.cxx 
b/sw/source/core/fields/scrptfld.cxx
index ded42cc7f0ba..eb2e8609ffd8 100644
--- a/sw/source/core/fields/scrptfld.cxx
+++ b/sw/source/core/fields/scrptfld.cxx
@@ -35,9 +35,9 @@ std::unique_ptr<SwFieldType> SwScriptFieldType::Copy() const
 }
 
 SwScriptField::SwScriptField( SwScriptFieldType* pInitType,
-                                const OUString& rType, const OUString& rCode,
+                                OUString aType, OUString aCode,
                                 bool bURL )
-    : SwField( pInitType ), m_sType( rType ), m_sCode( rCode ), m_bCodeURL( 
bURL )
+    : SwField( pInitType ), m_sType( std::move(aType) ), m_sCode( 
std::move(aCode) ), m_bCodeURL( bURL )
 {
 }
 
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 45bf94e28c6f..8e0187470146 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -782,9 +782,9 @@ SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
     }
 }
 
-SwOLEObj::SwOLEObj( const OUString &rString, sal_Int64 nAspect ) :
+SwOLEObj::SwOLEObj( OUString aString, sal_Int64 nAspect ) :
     m_pOLENode( nullptr ),
-    m_aName( rString )
+    m_aName( std::move(aString) )
 {
     m_xOLERef.Lock();
     m_xOLERef.SetViewAspect( nAspect );
diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index 12cb91c50b0c..8b143d6fc1dc 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -105,10 +105,10 @@ ToxTextGenerator::GetNumStringOfFirstNode(const 
SwTOXSortTabBase& rBase,
 
 
 ToxTextGenerator::ToxTextGenerator(const SwForm& toxForm,
-        std::shared_ptr<ToxTabStopTokenHandler> const & tabStopHandler)
+        std::shared_ptr<ToxTabStopTokenHandler> tabStopHandler)
 : mToxForm(toxForm),
   mLinkProcessor(std::make_shared<ToxLinkProcessor>()),
-  mTabStopTokenHandler(tabStopHandler)
+  mTabStopTokenHandler(std::move(tabStopHandler))
 {}
 
 ToxTextGenerator::~ToxTextGenerator()
diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 63d9d430d0ae..df70997cab75 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -217,9 +217,9 @@ OUString SwTOXMark::GetText(SwRootFrame const*const 
pLayout) const
 }
 
 // Manage types of TOX
-SwTOXType::SwTOXType(SwDoc& rDoc, TOXTypes eTyp, const OUString& rName)
+SwTOXType::SwTOXType(SwDoc& rDoc, TOXTypes eTyp, OUString aName)
     : m_rDoc(rDoc)
-    , m_aName(rName)
+    , m_aName(std::move(aName))
     , m_eType(eTyp)
 {
 }
@@ -532,10 +532,10 @@ OUString SwForm::GetFormText()        {return "<X>";}
 OUString SwForm::GetFormAuth()        {return "<A>";}
 
 SwTOXBase::SwTOXBase(const SwTOXType* pTyp, const SwForm& rForm,
-                     SwTOXElement nCreaType, const OUString& rTitle )
+                     SwTOXElement nCreaType, OUString aTitle )
     : 
SwClient(const_cast<sw::BroadcastingModify*>(static_cast<sw::BroadcastingModify 
const *>(pTyp)))
     , m_aForm(rForm)
-    , m_aTitle(rTitle)
+    , m_aTitle(std::move(aTitle))
     , m_eLanguage(::GetAppLanguage())
     , m_nCreateType(nCreaType)
     , m_nOLEOptions(SwTOOElements::NONE)
diff --git a/sw/source/core/txtnode/atrref.cxx 
b/sw/source/core/txtnode/atrref.cxx
index 167306efb706..2c82e1403503 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -28,11 +28,11 @@ SwFormatRefMark::~SwFormatRefMark( )
 {
 }
 
-SwFormatRefMark::SwFormatRefMark( const OUString& rName )
+SwFormatRefMark::SwFormatRefMark( OUString aName )
     : SfxPoolItem(RES_TXTATR_REFMARK)
     , sw::BroadcastingModify()
     , m_pTextAttr(nullptr)
-    , m_aRefName(rName)
+    , m_aRefName(std::move(aName))
 {
 }
 
diff --git a/sw/source/core/txtnode/fmtatr2.cxx 
b/sw/source/core/txtnode/fmtatr2.cxx
index 6088866fca22..900a4ea3b036 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -164,10 +164,10 @@ SwFormatINetFormat::SwFormatINetFormat()
     , mnVisitedFormatId( 0 )
 {}
 
-SwFormatINetFormat::SwFormatINetFormat( const OUString& rURL, const OUString& 
rTarget )
+SwFormatINetFormat::SwFormatINetFormat( OUString aURL, OUString aTarget )
     : SfxPoolItem( RES_TXTATR_INETFMT )
-    , msURL( rURL )
-    , msTargetFrame( rTarget )
+    , msURL( std::move(aURL) )
+    , msTargetFrame( std::move(aTarget) )
     , msINetFormatName()
     , msVisitedFormatName()
     , msHyperlinkName()
@@ -386,9 +386,9 @@ bool SwFormatINetFormat::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
     return bRet;
 }
 
-SwFormatRuby::SwFormatRuby( const OUString& rRubyText )
+SwFormatRuby::SwFormatRuby( OUString aRubyText )
     : SfxPoolItem( RES_TXTATR_CJK_RUBY ),
-    m_sRubyText( rRubyText ),
+    m_sRubyText( std::move(aRubyText) ),
     m_pTextAttr( nullptr ),
     m_nCharFormatId( 0 ),
     m_nPosition( 0 ),
@@ -539,10 +539,10 @@ SwFormatMeta::SwFormatMeta(const sal_uInt16 i_nWhich)
             "ERROR: SwFormatMeta: invalid which id!");
 }
 
-SwFormatMeta::SwFormatMeta( std::shared_ptr< ::sw::Meta > const & i_pMeta,
+SwFormatMeta::SwFormatMeta( std::shared_ptr< ::sw::Meta > i_pMeta,
                         const sal_uInt16 i_nWhich )
     : SfxPoolItem( i_nWhich )
-    , m_pMeta( i_pMeta )
+    , m_pMeta( std::move(i_pMeta) )
     , m_pTextAttr( nullptr )
 {
     OSL_ENSURE((RES_TXTATR_META == i_nWhich) || (RES_TXTATR_METAFIELD == 
i_nWhich),
diff --git a/sw/source/core/txtnode/txtedt.cxx 
b/sw/source/core/txtnode/txtedt.cxx
index 447cd77a30d2..2e524e116921 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -714,14 +714,14 @@ SwScanner::SwScanner( const SwTextNode& rNd, const 
OUString& rText,
 {
 }
 
-SwScanner::SwScanner(std::function<LanguageType(sal_Int32, sal_Int32, bool)> 
const& pGetLangOfChar,
-                     const OUString& rText, const LanguageType* pLang,
-                     const ModelToViewHelper& rConvMap, sal_uInt16 nType, 
sal_Int32 nStart,
+SwScanner::SwScanner(std::function<LanguageType(sal_Int32, sal_Int32, bool)> 
aGetLangOfChar,
+                     OUString aText, const LanguageType* pLang,
+                     ModelToViewHelper aConvMap, sal_uInt16 nType, sal_Int32 
nStart,
                      sal_Int32 nEnd, bool bClp)
-    : m_pGetLangOfChar(pGetLangOfChar)
-    , m_aPreDashReplacementText(rText)
+    : m_pGetLangOfChar(std::move(aGetLangOfChar))
+    , m_aPreDashReplacementText(std::move(aText))
     , m_pLanguage(pLang)
-    , m_ModelToView(rConvMap)
+    , m_ModelToView(std::move(aConvMap))
     , m_nLength(0)
     , m_nOverriddenDashCount(0)
     , m_nWordType(nType)
diff --git a/sw/source/core/undo/SwUndoField.cxx 
b/sw/source/core/undo/SwUndoField.cxx
index 3d736a46e1bc..ca9456057dbd 100644
--- a/sw/source/core/undo/SwUndoField.cxx
+++ b/sw/source/core/undo/SwUndoField.cxx
@@ -110,9 +110,9 @@ void SwUndoFieldFromDoc::RepeatImpl(::sw::RepeatContext &)
 }
 
 SwUndoFieldFromAPI::SwUndoFieldFromAPI(const SwPosition & rPos,
-                                       const Any & rOldVal, const Any & 
rNewVal,
+                                       Any aOldVal, Any aNewVal,
                                        sal_uInt16 _nWhich)
-    : SwUndoField(rPos), m_aOldVal(rOldVal), m_aNewVal(rNewVal), 
m_nWhich(_nWhich)
+    : SwUndoField(rPos), m_aOldVal(std::move(aOldVal)), 
m_aNewVal(std::move(aNewVal)), m_nWhich(_nWhich)
 {
 }
 
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index f2f75ac2e623..7229f9bd4fe8 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -3637,9 +3637,9 @@ namespace
     }
 }
 
-SwXOLEListener::SwXOLEListener( SwFormat& rOLEFormat, uno::Reference< XModel > 
const & xOLE)
+SwXOLEListener::SwXOLEListener( SwFormat& rOLEFormat, uno::Reference< XModel > 
xOLE)
     : m_pOLEFormat(&rOLEFormat)
-    , m_xOLEModel(xOLE)
+    , m_xOLEModel(std::move(xOLE))
 {
     StartListening(m_pOLEFormat->GetNotifier());
 }
diff --git a/sw/source/core/unocore/unoobj.cxx 
b/sw/source/core/unocore/unoobj.cxx
index a1826477dc1b..53c98b71e149 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -668,13 +668,13 @@ SwDoc* SwXTextCursor::GetDoc()
 
 SwXTextCursor::SwXTextCursor(
         SwDoc & rDoc,
-        uno::Reference< text::XText > const& xParent,
+        uno::Reference< text::XText > xParent,
         const CursorType eType,
         const SwPosition& rPos,
         SwPosition const*const pMark)
     : m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
     , m_eType(eType)
-    , m_xParentText(xParent)
+    , m_xParentText(std::move(xParent))
     , m_pUnoCursor(rDoc.CreateUnoCursor(rPos))
 {
     if (pMark)
@@ -684,11 +684,11 @@ SwXTextCursor::SwXTextCursor(
     }
 }
 
-SwXTextCursor::SwXTextCursor(uno::Reference< text::XText > const& xParent,
+SwXTextCursor::SwXTextCursor(uno::Reference< text::XText > xParent,
         SwPaM const& rSourceCursor, const CursorType eType)
     : m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXT_CURSOR))
     , m_eType(eType)
-    , m_xParentText(xParent)
+    , m_xParentText(std::move(xParent))
     , 
m_pUnoCursor(rSourceCursor.GetDoc().CreateUnoCursor(*rSourceCursor.GetPoint()))
 {
     if (rSourceCursor.HasMark())
diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index c305279068e2..c2ca14ae1c84 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -3881,9 +3881,9 @@ uno::Any SwXAutoStylesEnumerator::nextElement(  )
 
 SwXAutoStyle::SwXAutoStyle(
     SwDoc* pDoc,
-    std::shared_ptr<SfxItemSet> const & pInitSet,
+    std::shared_ptr<SfxItemSet> pInitSet,
     IStyleAccess::SwAutoStyleFamily eFam)
-:   mpSet(pInitSet),
+:   mpSet(std::move(pInitSet)),
     meFamily(eFam),
     mrDoc(*pDoc)
 {
@@ -4671,17 +4671,17 @@ css::uno::Sequence<OUString> SAL_CALL 
SwXTextTableStyle::getSupportedServiceName
 }
 
 // SwXTextCellStyle
-SwXTextCellStyle::SwXTextCellStyle(SwDocShell* pDocShell, SwBoxAutoFormat* 
pBoxAutoFormat, const OUString& sParentStyle) :
+SwXTextCellStyle::SwXTextCellStyle(SwDocShell* pDocShell, SwBoxAutoFormat* 
pBoxAutoFormat, OUString sParentStyle) :
     m_pDocShell(pDocShell),
     m_pBoxAutoFormat(pBoxAutoFormat),
-    m_sParentStyle(sParentStyle),
+    m_sParentStyle(std::move(sParentStyle)),
     m_bPhysical(true)
 { }
 
-SwXTextCellStyle::SwXTextCellStyle(SwDocShell* pDocShell, const OUString& 
sName) :
+SwXTextCellStyle::SwXTextCellStyle(SwDocShell* pDocShell, OUString sName) :
     m_pDocShell(pDocShell),
     m_pBoxAutoFormat_Impl(std::make_shared<SwBoxAutoFormat>()),
-    m_sName(sName),
+    m_sName(std::move(sName)),
     m_bPhysical(false)
 {
     m_pBoxAutoFormat = m_pBoxAutoFormat_Impl.get();
diff --git a/sw/source/filter/basflt/shellio.cxx 
b/sw/source/filter/basflt/shellio.cxx
index d8e1b3e9ce94..87d71d4b0e4f 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -400,9 +400,9 @@ ErrCode SwReader::Read( const Reader& rOptions )
 }
 
 
-SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwDoc 
*pDocument)
+SwReader::SwReader(SfxMedium& rMedium, OUString aFileName, SwDoc *pDocument)
     : SwDocFac(pDocument), mpStrm(nullptr), mpMedium(&rMedium), 
mpCursor(nullptr),
-    maFileName(rFileName), mbSkipImages(false)
+    maFileName(std::move(aFileName)), mbSkipImages(false)
 {
     SetBaseURL( rMedium.GetBaseURL() );
     SetSkipImages( rMedium.IsSkipImages() );
@@ -410,22 +410,22 @@ SwReader::SwReader(SfxMedium& rMedium, const OUString& 
rFileName, SwDoc *pDocume
 
 
 // Read into an existing document
-SwReader::SwReader(SvStream& rStrm, const OUString& rFileName, const OUString& 
rBaseURL, SwPaM& rPam)
+SwReader::SwReader(SvStream& rStrm, OUString aFileName, const OUString& 
rBaseURL, SwPaM& rPam)
     : SwDocFac(&rPam.GetDoc()), mpStrm(&rStrm), mpMedium(nullptr), 
mpCursor(&rPam),
-    maFileName(rFileName), mbSkipImages(false)
+    maFileName(std::move(aFileName)), mbSkipImages(false)
 {
     SetBaseURL( rBaseURL );
 }
 
-SwReader::SwReader(SfxMedium& rMedium, const OUString& rFileName, SwPaM& rPam)
+SwReader::SwReader(SfxMedium& rMedium, OUString aFileName, SwPaM& rPam)
     : SwDocFac(&rPam.GetDoc()), mpStrm(nullptr), mpMedium(&rMedium),
-    mpCursor(&rPam), maFileName(rFileName), mbSkipImages(false)
+    mpCursor(&rPam), maFileName(std::move(aFileName)), mbSkipImages(false)
 {
     SetBaseURL( rMedium.GetBaseURL() );
 }
 
-SwReader::SwReader( const uno::Reference < embed::XStorage > &rStg, const 
OUString& rFilename, SwPaM &rPam )
-    : SwDocFac(&rPam.GetDoc()), mpStrm(nullptr), mxStg( rStg ), 
mpMedium(nullptr), mpCursor(&rPam), maFileName(rFilename), mbSkipImages(false)
+SwReader::SwReader( uno::Reference < embed::XStorage > xStg, OUString 
aFilename, SwPaM &rPam )
+    : SwDocFac(&rPam.GetDoc()), mpStrm(nullptr), mxStg( std::move(xStg) ), 
mpMedium(nullptr), mpCursor(&rPam), maFileName(std::move(aFilename)), 
mbSkipImages(false)
 {
 }
 
@@ -710,8 +710,8 @@ SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, bool 
bInWriteAll)
 {
 }
 
-SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc 
&rDocument)
-    : m_pStrm(nullptr), m_xStg( rStg ), m_pMedium(nullptr), 
m_pOutPam(nullptr), m_pShell(nullptr), m_rDoc(rDocument), m_bWriteAll(true)
+SwWriter::SwWriter( uno::Reference < embed::XStorage > xStg, SwDoc &rDocument)
+    : m_pStrm(nullptr), m_xStg( std::move(xStg) ), m_pMedium(nullptr), 
m_pOutPam(nullptr), m_pShell(nullptr), m_rDoc(rDocument), m_bWriteAll(true)
 {
 }
 
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index f002d6a960b5..eb497dbb266c 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -4097,20 +4097,20 @@ Sequence< OUString > 
SwXLinkTargetSupplier::getSupportedServiceNames()
 }
 
 SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
-            Reference< XNameAccess > const & xAccess, const OUString& 
rLinkDisplayName, const OUString& sSuffix ) :
+            Reference< XNameAccess > const & xAccess, OUString 
aLinkDisplayName, OUString sSuffix ) :
     m_xRealAccess(xAccess),
     m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
-    m_sLinkSuffix(sSuffix),
-    m_sLinkDisplayName(rLinkDisplayName),
+    m_sLinkSuffix(std::move(sSuffix)),
+    m_sLinkDisplayName(std::move(aLinkDisplayName)),
     m_pxDoc(nullptr)
 {
 }
 
 SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
-            const OUString& rLinkDisplayName, const OUString& sSuffix) :
+            OUString aLinkDisplayName, OUString sSuffix) :
     m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
-    m_sLinkSuffix(sSuffix),
-    m_sLinkDisplayName(rLinkDisplayName),
+    m_sLinkSuffix(std::move(sSuffix)),
+    m_sLinkDisplayName(std::move(aLinkDisplayName)),
     m_pxDoc(&rxDoc)
 {
 }
@@ -4410,11 +4410,11 @@ Sequence< OUString > 
SwXLinkNameAccessWrapper::getSupportedServiceNames()
     return aRet;
 }
 
-SwXOutlineTarget::SwXOutlineTarget(const OUString& rOutlineText, const 
OUString& rActualText,
+SwXOutlineTarget::SwXOutlineTarget(OUString aOutlineText, OUString aActualText,
                                    const sal_Int32 nOutlineLevel) :
     m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
-    m_sOutlineText(rOutlineText),
-    m_sActualText(rActualText),
+    m_sOutlineText(std::move(aOutlineText)),
+    m_sActualText(std::move(aActualText)),
     m_nOutlineLevel(nOutlineLevel)
 {
 }
@@ -4487,9 +4487,9 @@ Sequence< OUString > 
SwXOutlineTarget::getSupportedServiceNames()
     return aRet;
 }
 
-SwXDrawingObjectTarget::SwXDrawingObjectTarget(const OUString& 
rDrawingObjectText) :
+SwXDrawingObjectTarget::SwXDrawingObjectTarget(OUString aDrawingObjectText) :
     m_pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
-    m_sDrawingObjectText(rDrawingObjectText)
+    m_sDrawingObjectText(std::move(aDrawingObjectText))
 {
 }
 

Reply via email to