include/sfx2/DocumentSigner.hxx                     |    5 ++-
 include/sfx2/devtools/DocumentModelTreeHandler.hxx  |    2 -
 include/sfx2/docfac.hxx                             |    2 -
 include/sfx2/docfilt.hxx                            |   12 ++++----
 include/sfx2/docinsert.hxx                          |    2 -
 include/sfx2/event.hxx                              |    9 +++---
 include/sfx2/evntconf.hxx                           |    9 +++---
 include/sfx2/frame.hxx                              |    2 -
 include/sfx2/infobar.hxx                            |    2 -
 include/sfx2/linksrc.hxx                            |    5 ++-
 include/sfx2/minfitem.hxx                           |    8 ++---
 include/sfx2/sidebar/AsynchronousCall.hxx           |    2 -
 include/sfx2/sidebar/Context.hxx                    |    2 -
 include/sfx2/sidebar/FocusManager.hxx               |    2 -
 include/sfx2/sidebar/Panel.hxx                      |    3 --
 include/sfx2/sidebar/SidebarPanelBase.hxx           |    2 -
 include/sfx2/sidebar/TabBar.hxx                     |    4 +-
 include/sfx2/styfitem.hxx                           |    7 ++---
 include/sfx2/tplpitem.hxx                           |    4 +-
 sfx2/inc/commandpopup/CommandPopup.hxx              |    7 ++---
 sfx2/inc/preventduplicateinteraction.hxx            |    2 -
 sfx2/inc/saveastemplatedlg.hxx                      |    3 --
 sfx2/inc/sidebar/DeckTitleBar.hxx                   |    2 -
 sfx2/inc/sidebar/UnoDeck.hxx                        |    2 -
 sfx2/inc/sidebar/UnoDecks.hxx                       |    2 -
 sfx2/inc/sidebar/UnoPanel.hxx                       |    2 -
 sfx2/inc/sidebar/UnoPanels.hxx                      |    2 -
 sfx2/inc/sidebar/UnoSidebar.hxx                     |    2 -
 sfx2/inc/srchdlg.hxx                                |    2 -
 sfx2/inc/unoctitm.hxx                               |    2 -
 sfx2/source/appl/helpdispatch.cxx                   |    5 ++-
 sfx2/source/appl/helpdispatch.hxx                   |    2 -
 sfx2/source/appl/linksrc.cxx                        |    5 ++-
 sfx2/source/appl/newhelp.cxx                        |    9 +++---
 sfx2/source/appl/preventduplicateinteraction.cxx    |    5 ++-
 sfx2/source/appl/shutdownicon.cxx                   |    5 ++-
 sfx2/source/appl/shutdownicon.hxx                   |    2 -
 sfx2/source/bastyp/fltfnc.cxx                       |    9 +++---
 sfx2/source/control/minfitem.cxx                    |   17 ++++++------
 sfx2/source/control/statcach.cxx                    |    7 ++---
 sfx2/source/control/unoctitm.cxx                    |    5 ++-
 sfx2/source/devtools/DocumentModelTreeHandler.cxx   |   12 ++++----
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx |   23 ++++++++---------
 sfx2/source/devtools/SelectionChangeHandler.hxx     |    5 ++-
 sfx2/source/dialog/StyleList.cxx                    |    7 ++---
 sfx2/source/dialog/backingwindow.cxx                |    5 ++-
 sfx2/source/dialog/dinfdlg.cxx                      |    5 ++-
 sfx2/source/dialog/filtergrouping.cxx               |   19 +++++++-------
 sfx2/source/dialog/infobar.cxx                      |    5 ++-
 sfx2/source/dialog/srchdlg.cxx                      |    5 ++-
 sfx2/source/dialog/styfitem.cxx                     |    7 ++---
 sfx2/source/dialog/tabdlg.cxx                       |    1 
 sfx2/source/dialog/tplpitem.cxx                     |    9 +++---
 sfx2/source/doc/DocumentMetadataAccess.cxx          |    5 ++-
 sfx2/source/doc/Metadatable.cxx                     |    9 +++---
 sfx2/source/doc/docfac.cxx                          |    5 ++-
 sfx2/source/doc/docfile.cxx                         |    4 +-
 sfx2/source/doc/docfilt.cxx                         |   27 ++++++++++----------
 sfx2/source/doc/docinsert.cxx                       |    5 ++-
 sfx2/source/doc/doctempl.cxx                        |    7 ++---
 sfx2/source/doc/doctemplates.cxx                    |   21 ++++++++-------
 sfx2/source/doc/guisaveas.cxx                       |    7 ++---
 sfx2/source/doc/iframe.cxx                          |    7 ++---
 sfx2/source/doc/objmisc.cxx                         |    5 ++-
 sfx2/source/doc/oleprops.cxx                        |    7 ++---
 sfx2/source/doc/printhelper.cxx                     |    5 ++-
 sfx2/source/doc/saveastemplatedlg.cxx               |    5 ++-
 sfx2/source/inc/hintpost.hxx                        |    2 -
 sfx2/source/inc/objshimp.hxx                        |    2 -
 sfx2/source/inc/openurlhint.hxx                     |    2 -
 sfx2/source/inc/sfxurlrelocator.hxx                 |    2 -
 sfx2/source/inc/statcach.hxx                        |    4 +-
 sfx2/source/inc/workwin.hxx                         |    5 ++-
 sfx2/source/notify/hintpost.cxx                     |    5 ++-
 sfx2/source/notify/openurlhint.cxx                  |    5 ++-
 sfx2/source/sidebar/AsynchronousCall.cxx            |    5 ++-
 sfx2/source/sidebar/Context.cxx                     |    9 +++---
 sfx2/source/sidebar/DeckLayouter.cxx                |    5 ++-
 sfx2/source/sidebar/DeckTitleBar.cxx                |    5 ++-
 sfx2/source/sidebar/FocusManager.cxx                |    5 ++-
 sfx2/source/sidebar/Panel.cxx                       |    5 ++-
 sfx2/source/sidebar/SidebarPanelBase.cxx            |    9 +++---
 sfx2/source/sidebar/TabBar.cxx                      |    9 +++---
 sfx2/source/sidebar/UnoDeck.cxx                     |    7 ++---
 sfx2/source/sidebar/UnoDecks.cxx                    |    5 ++-
 sfx2/source/sidebar/UnoPanel.cxx                    |    9 +++---
 sfx2/source/sidebar/UnoPanels.cxx                   |    5 ++-
 sfx2/source/sidebar/UnoSidebar.cxx                  |    5 ++-
 sfx2/source/view/frame.cxx                          |    5 ++-
 sfx2/source/view/viewprn.cxx                        |   13 +++++----
 sfx2/source/view/viewsh.cxx                         |    7 ++---
 91 files changed, 298 insertions(+), 242 deletions(-)

New commits:
commit 8c15ccc2671d93b06c00730d03b441f3466984d4
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jul 14 10:12:44 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jul 14 15:38:12 2022 +0200

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

diff --git a/include/sfx2/DocumentSigner.hxx b/include/sfx2/DocumentSigner.hxx
index 8059cb9cbd24..2fe0f7d7d20a 100644
--- a/include/sfx2/DocumentSigner.hxx
+++ b/include/sfx2/DocumentSigner.hxx
@@ -14,6 +14,7 @@
 #include <sal/config.h>
 #include <sfx2/dllapi.h>
 #include <rtl/ustring.hxx>
+#include <utility>
 
 namespace com::sun::star::security
 {
@@ -32,8 +33,8 @@ private:
     OUString m_aUrl;
 
 public:
-    DocumentSigner(OUString const& rUrl)
-        : m_aUrl(rUrl)
+    DocumentSigner(OUString aUrl)
+        : m_aUrl(std::move(aUrl))
     {
     }
 
diff --git a/include/sfx2/devtools/DocumentModelTreeHandler.hxx 
b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
index 47294d527efe..f26af793c9e8 100644
--- a/include/sfx2/devtools/DocumentModelTreeHandler.hxx
+++ b/include/sfx2/devtools/DocumentModelTreeHandler.hxx
@@ -35,7 +35,7 @@ private:
 
 public:
     DocumentModelTreeHandler(std::unique_ptr<weld::TreeView>& 
pDocumentModelTree,
-                             css::uno::Reference<css::uno::XInterface> const& 
xDocument);
+                             css::uno::Reference<css::uno::XInterface> 
xDocument);
 
     DECL_LINK(ExpandingHandler, const weld::TreeIter&, bool);
 
diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx
index 884112530c90..b3fcd63dc9c1 100644
--- a/include/sfx2/docfac.hxx
+++ b/include/sfx2/docfac.hxx
@@ -44,7 +44,7 @@ private:
     std::unique_ptr<SfxObjectFactory_Impl> pImpl;      // Additional Data
 
 public:
-    SfxObjectFactory( const SvGlobalName &rName, const OUString& sFactoryName 
);
+    SfxObjectFactory( const SvGlobalName &rName, OUString sFactoryName );
     ~SfxObjectFactory();
 
     const SvGlobalName& GetClassId() const;
diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx
index fb5bb55051fd..9dbbb37b87d2 100644
--- a/include/sfx2/docfilt.hxx
+++ b/include/sfx2/docfilt.hxx
@@ -61,16 +61,16 @@ class SFX2_DLLPUBLIC SfxFilter
     bool mbEnabled;
 
 public:
-    SfxFilter( const OUString& rProvider, const OUString& rFilterName );
+    SfxFilter( OUString aProvider, OUString aFilterName );
 
-    SfxFilter( const OUString &rName,
+    SfxFilter( OUString aName,
                std::u16string_view rWildCard,
                SfxFilterFlags nFormatType,
                SotClipboardFormatId lFormat,
-               const OUString &rTypeName,
-               const OUString &rMimeType,
-               const OUString &rUserData,
-               const OUString& rServiceName,
+               OUString aTypeName,
+               OUString aMimeType,
+               OUString aUserData,
+               OUString aServiceName,
                bool bEnabled = true );
     ~SfxFilter();
 
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index 7c41071243f0..7e64a3882f44 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -62,7 +62,7 @@ public:
         Compare,
         Merge
     };
-    DocumentInserter(weld::Window* pParent, const OUString& rFactory, const 
Mode mode = Mode::Insert);
+    DocumentInserter(weld::Window* pParent, OUString aFactory, const Mode mode 
= Mode::Insert);
     ~DocumentInserter();
 
     void                    StartExecuteModal( const 
Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink );
diff --git a/include/sfx2/event.hxx b/include/sfx2/event.hxx
index 9f7cd304a038..021472830ab8 100644
--- a/include/sfx2/event.hxx
+++ b/include/sfx2/event.hxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/frame/XController2.hpp>
 #include <com/sun/star/view/PrintableState.hpp>
+#include <utility>
 
 namespace com::sun::star::beans { struct PropertyValue; }
 
@@ -195,9 +196,9 @@ class SFX2_DLLPUBLIC SfxEventHint : public SfxHint
     SfxEventHintId      nEventId;
 
 public:
-    SfxEventHint( SfxEventHintId nId, const OUString& aName, SfxObjectShell 
*pObj )
+    SfxEventHint( SfxEventHintId nId, OUString aName, SfxObjectShell *pObj )
                         :   pObjShell(pObj),
-                            aEventName(aName),
+                            aEventName(std::move(aName)),
                             nEventId(nId)
                         {}
 
@@ -222,9 +223,9 @@ public:
                         , xViewController( xController, css::uno::UNO_QUERY )
                         {}
 
-    SfxViewEventHint( SfxEventHintId nId, const OUString& aName, 
SfxObjectShell *pObj, const css::uno::Reference< css::frame::XController2 >& 
xController )
+    SfxViewEventHint( SfxEventHintId nId, const OUString& aName, 
SfxObjectShell *pObj, css::uno::Reference< css::frame::XController2 > 
xController )
                         : SfxEventHint( nId, aName, pObj )
-                        , xViewController( xController )
+                        , xViewController(std::move( xController ))
                         {}
 
     const css::uno::Reference< css::frame::XController2 >& GetController() 
const
diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx
index 8720a733060a..6c4649cba17d 100644
--- a/include/sfx2/evntconf.hxx
+++ b/include/sfx2/evntconf.hxx
@@ -25,6 +25,7 @@
 #include <sfx2/event.hxx>
 #include <svl/poolitem.hxx>
 #include <memory>
+#include <utility>
 #include <vector>
 
 class SfxObjectShell;
@@ -37,11 +38,11 @@ struct SFX2_DLLPUBLIC SfxEventName
     OUString      maUIName;
 
             SfxEventName( SvMacroItemId nId,
-                             const OUString& rEventName,
-                             const OUString& rUIName )
+                             OUString aEventName,
+                             OUString aUIName )
                 : mnId( nId )
-                , maEventName( rEventName )
-                , maUIName( rUIName ) {}
+                , maEventName(std::move( aEventName ))
+                , maUIName(std::move( aUIName )) {}
 };
 
 class SFX2_DLLPUBLIC SfxEventNamesList
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index b9004bdb8b36..d13499c2fdfd 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -188,7 +188,7 @@ class SFX2_DLLPUBLIC SfxUnoFrameItem final : public 
SfxPoolItem
 public:
                                 static SfxPoolItem* CreateDefault();
                                 SfxUnoFrameItem();
-                                SfxUnoFrameItem( sal_uInt16 nWhich, const 
css::uno::Reference< css::frame::XFrame >& i_rFrame );
+                                SfxUnoFrameItem( sal_uInt16 nWhich, 
css::uno::Reference< css::frame::XFrame > i_xFrame );
     const css::uno::Reference< css::frame::XFrame >&
                                 GetFrame() const
                                 { return m_xFrame; }
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index f5b948014e9c..4f3737eadf3f 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -78,7 +78,7 @@ private:
     void SetCloseButtonImage();
 
 public:
-    SfxInfoBarWindow(vcl::Window* parent, const OUString& sId, const OUString& 
sPrimaryMessage,
+    SfxInfoBarWindow(vcl::Window* parent, OUString sId, const OUString& 
sPrimaryMessage,
                      const OUString& sSecondaryMessage, InfobarType 
InfobarType,
                      bool bShowCloseButton);
     Size DoLayout();
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index 4f12d72f4a14..bac48b18589e 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -25,6 +25,7 @@
 #include <tools/ref.hxx>
 #include <com/sun/star/uno/Reference.hxx>
 #include <memory>
+#include <utility>
 
 namespace com::sun::star::uno
 {
@@ -94,8 +95,8 @@ public:
 
     struct StreamToLoadFrom{
         StreamToLoadFrom(
-            const css::uno::Reference<css::io::XInputStream>& xInputStream, 
bool bIsReadOnly )
-            :m_xInputStreamToLoadFrom(xInputStream),
+            css::uno::Reference<css::io::XInputStream> xInputStream, bool 
bIsReadOnly )
+            :m_xInputStreamToLoadFrom(std::move(xInputStream)),
              m_bIsReadOnly(bIsReadOnly)
         {
         }
diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx
index ce6f8b25a3dc..c89705726e20 100644
--- a/include/sfx2/minfitem.hxx
+++ b/include/sfx2/minfitem.hxx
@@ -41,10 +41,10 @@ public:
     static SfxPoolItem* CreateDefault();
     SfxMacroInfoItem( sal_uInt16 nWhich,
                     const BasicManager* pMgr,
-                    const OUString &rLibName,
-                    const OUString &rModuleName,
-                    const OUString &rMethodName,
-                    const OUString &rComment);
+                    OUString aLibName,
+                    OUString aModuleName,
+                    OUString aMethodName,
+                    OUString aComment);
 
     virtual SfxMacroInfoItem* Clone( SfxItemPool *pPool = nullptr ) const 
override;
     virtual bool            operator==( const SfxPoolItem& ) const override;
diff --git a/include/sfx2/sidebar/AsynchronousCall.hxx 
b/include/sfx2/sidebar/AsynchronousCall.hxx
index 0f2377abc511..c7e522401d5a 100644
--- a/include/sfx2/sidebar/AsynchronousCall.hxx
+++ b/include/sfx2/sidebar/AsynchronousCall.hxx
@@ -33,7 +33,7 @@ class AsynchronousCall
 public:
     typedef ::std::function<void()> Action;
 
-    AsynchronousCall(const Action& rAction);
+    AsynchronousCall(Action aAction);
     ~AsynchronousCall();
 
     void RequestCall();
diff --git a/include/sfx2/sidebar/Context.hxx b/include/sfx2/sidebar/Context.hxx
index f4ca42d753d8..c1ea1f5e4aea 100644
--- a/include/sfx2/sidebar/Context.hxx
+++ b/include/sfx2/sidebar/Context.hxx
@@ -31,7 +31,7 @@ public:
     OUString msContext;
 
     Context();
-    Context(const OUString& rsApplication, const OUString& rsContext);
+    Context(OUString sApplication, OUString sContext);
 
     /** When two contexts are matched against each other, then
         application or context name may have the wildcard value 'any'.
diff --git a/include/sfx2/sidebar/FocusManager.hxx 
b/include/sfx2/sidebar/FocusManager.hxx
index c51ccbfa832f..7236e1f84c85 100644
--- a/include/sfx2/sidebar/FocusManager.hxx
+++ b/include/sfx2/sidebar/FocusManager.hxx
@@ -50,7 +50,7 @@ class DeckTitleBar;
 class FocusManager
 {
 public:
-    FocusManager(const std::function<void(const Panel&)>& rShowPanelFunctor);
+    FocusManager(std::function<void(const Panel&)> aShowPanelFunctor);
     ~FocusManager();
 
     /** Forget all panels and buttons.  Remove all window listeners.
diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index 1c0af8ad249c..c04c6a53a1b9 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -54,8 +54,7 @@ class SFX2_DLLPUBLIC Panel final
 {
 public:
     Panel(const PanelDescriptor& rPanelDescriptor, weld::Widget* pParentWindow,
-          const bool bIsInitiallyExpanded, Deck* pDeck,
-          const std::function<Context()>& rContextAccess,
+          const bool bIsInitiallyExpanded, Deck* pDeck, 
std::function<Context()> aContextAccess,
           const css::uno::Reference<css::frame::XFrame>& rxFrame);
 
     ~Panel();
diff --git a/include/sfx2/sidebar/SidebarPanelBase.hxx 
b/include/sfx2/sidebar/SidebarPanelBase.hxx
index b00d4ca3cead..c1c99cd24a19 100644
--- a/include/sfx2/sidebar/SidebarPanelBase.hxx
+++ b/include/sfx2/sidebar/SidebarPanelBase.hxx
@@ -83,7 +83,7 @@ public:
     void SetParentPanel(sfx2::sidebar::Panel* pPanel);
 
 private:
-    SidebarPanelBase(const OUString& rsResourceURL, const 
css::uno::Reference<css::frame::XFrame>& rxFrame,
+    SidebarPanelBase(OUString sResourceURL, 
css::uno::Reference<css::frame::XFrame> xFrame,
                      std::unique_ptr<PanelLayout> xControl, const 
css::ui::LayoutSize& rLayoutSize);
     virtual ~SidebarPanelBase() override;
     SidebarPanelBase(const SidebarPanelBase&) = delete;
diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx
index 5cc092c239de..fcbced33fa98 100644
--- a/include/sfx2/sidebar/TabBar.hxx
+++ b/include/sfx2/sidebar/TabBar.hxx
@@ -58,8 +58,8 @@ public:
     TabBar (
         vcl::Window* pParentWindow,
         const css::uno::Reference<css::frame::XFrame>& rxFrame,
-        const ::std::function<void (const OUString& rsDeckId)>& 
rDeckActivationFunctor,
-        const PopupMenuProvider& rPopupMenuProvider,
+        ::std::function<void (const OUString& rsDeckId)> 
aDeckActivationFunctor,
+        PopupMenuProvider aPopupMenuProvider,
         SidebarController* rParentSidebarController);
 
     weld::Container* GetContainer() { return m_xContainer.get(); }
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index dc2efd88cf85..d53f9fcdc02c 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -24,14 +24,15 @@
 #include <sfx2/dllapi.h>
 #include <svl/style.hxx>
 #include <unotools/resmgr.hxx>
+#include <utility>
 #include <vector>
 
 struct SFX2_DLLPUBLIC SfxFilterTuple
 {
     OUString aName;
     SfxStyleSearchBits nFlags;
-    SfxFilterTuple(const OUString& rName, SfxStyleSearchBits nArg)
-        : aName(rName)
+    SfxFilterTuple(OUString _aName, SfxStyleSearchBits nArg)
+        : aName(std::move(_aName))
         , nFlags(nArg)
     {
     }
@@ -47,7 +48,7 @@ class SFX2_DLLPUBLIC SfxStyleFamilyItem
     SfxStyleFilter  aFilterList;
 
 public:
-    SfxStyleFamilyItem(SfxStyleFamily nFamily, const OUString &rName, const 
OUString& rImage, const std::pair<TranslateId, SfxStyleSearchBits>* 
pStringArray, const std::locale& rLocale);
+    SfxStyleFamilyItem(SfxStyleFamily nFamily, OUString rName, OUString  
rImage, const std::pair<TranslateId, SfxStyleSearchBits>* pStringArray, const 
std::locale& rLocale);
 
     const OUString& GetText() const { return aText; }
     SfxStyleFamily  GetFamily() const { return nFamily; }
diff --git a/include/sfx2/tplpitem.hxx b/include/sfx2/tplpitem.hxx
index 647e2b8e72bf..d367daa8bb3e 100644
--- a/include/sfx2/tplpitem.hxx
+++ b/include/sfx2/tplpitem.hxx
@@ -33,8 +33,8 @@ public:
     static SfxPoolItem* CreateDefault();
     SfxTemplateItem();
     SfxTemplateItem( sal_uInt16 nWhich,
-                     const OUString &rStyle,
-                     const OUString &rStyleIdentifier = "" );
+                     OUString aStyle,
+                     OUString aStyleIdentifier = "" );
 
     const OUString&         GetStyleName() const { return aStyle; }
     const OUString&         GetStyleIdentifier() const { return 
aStyleIdentifier; }
diff --git a/sfx2/inc/commandpopup/CommandPopup.hxx 
b/sfx2/inc/commandpopup/CommandPopup.hxx
index a34425f0d693..c93a283608c3 100644
--- a/sfx2/inc/commandpopup/CommandPopup.hxx
+++ b/sfx2/inc/commandpopup/CommandPopup.hxx
@@ -9,6 +9,7 @@
 
 #pragma once
 
+#include <utility>
 #include <vcl/weld.hxx>
 
 #include <com/sun/star/uno/XComponentContext.hpp>
@@ -25,9 +26,9 @@ struct CurrentEntry final
     OUString m_aCommandURL;
     OUString m_aTooltip;
 
-    CurrentEntry(OUString const& rCommandURL, OUString const& rTooltip)
-        : m_aCommandURL(rCommandURL)
-        , m_aTooltip(rTooltip)
+    CurrentEntry(OUString aCommandURL, OUString aTooltip)
+        : m_aCommandURL(std::move(aCommandURL))
+        , m_aTooltip(std::move(aTooltip))
     {
     }
 };
diff --git a/sfx2/inc/preventduplicateinteraction.hxx 
b/sfx2/inc/preventduplicateinteraction.hxx
index 62e59dd96c2e..1798dd5f5bd4 100644
--- a/sfx2/inc/preventduplicateinteraction.hxx
+++ b/sfx2/inc/preventduplicateinteraction.hxx
@@ -252,7 +252,7 @@ class PreventDuplicateInteraction final :
 
             @threadsafe not necessary
         */
-        PreventDuplicateInteraction(const css::uno::Reference< 
css::uno::XComponentContext >& rxContext);
+        PreventDuplicateInteraction(css::uno::Reference< 
css::uno::XComponentContext > xContext);
 
 
         /**
diff --git a/sfx2/inc/saveastemplatedlg.hxx b/sfx2/inc/saveastemplatedlg.hxx
index a4df61853aaf..ddc95abd31c7 100644
--- a/sfx2/inc/saveastemplatedlg.hxx
+++ b/sfx2/inc/saveastemplatedlg.hxx
@@ -49,8 +49,7 @@ public:
     bool SaveTemplate();
 
 public:
-    SfxSaveAsTemplateDialog(weld::Window* pParent,
-                            const css::uno::Reference<css::frame::XModel>& 
rModel);
+    SfxSaveAsTemplateDialog(weld::Window* pParent, 
css::uno::Reference<css::frame::XModel> xModel);
 };
 
 #endif // INCLUDED_SFX2_INC_SAVEASTEMPLATEDLG_HXX
diff --git a/sfx2/inc/sidebar/DeckTitleBar.hxx 
b/sfx2/inc/sidebar/DeckTitleBar.hxx
index 7ed23a8bf914..72eda5cb7d7b 100644
--- a/sfx2/inc/sidebar/DeckTitleBar.hxx
+++ b/sfx2/inc/sidebar/DeckTitleBar.hxx
@@ -30,7 +30,7 @@ class DeckTitleBar final : public TitleBar
 {
 public:
     DeckTitleBar(const OUString& rsTitle, weld::Builder& rBuilder,
-                 const std::function<void()>& rCloserAction);
+                 std::function<void()> aCloserAction);
     virtual ~DeckTitleBar() override;
 
     virtual void SetTitle(const OUString& rsTitle) override;
diff --git a/sfx2/inc/sidebar/UnoDeck.hxx b/sfx2/inc/sidebar/UnoDeck.hxx
index 42c975c44d3b..b65042355419 100644
--- a/sfx2/inc/sidebar/UnoDeck.hxx
+++ b/sfx2/inc/sidebar/UnoDeck.hxx
@@ -28,7 +28,7 @@ class SfxUnoDeck final : public 
cppu::WeakImplHelper<css::ui::XDeck>
 
 public:
 
-    SfxUnoDeck(const css::uno::Reference<css::frame::XFrame>& , const 
OUString&);
+    SfxUnoDeck(css::uno::Reference<css::frame::XFrame>, OUString );
 
     virtual OUString SAL_CALL getId() override;
 
diff --git a/sfx2/inc/sidebar/UnoDecks.hxx b/sfx2/inc/sidebar/UnoDecks.hxx
index 95ce0be62398..ed7b50679006 100644
--- a/sfx2/inc/sidebar/UnoDecks.hxx
+++ b/sfx2/inc/sidebar/UnoDecks.hxx
@@ -24,7 +24,7 @@ class SfxUnoDecks final : public 
cppu::WeakImplHelper<css::ui::XDecks>
 
 public:
 
-    SfxUnoDecks(const css::uno::Reference<css::frame::XFrame>&);
+    SfxUnoDecks(css::uno::Reference<css::frame::XFrame> );
 
 // XNameAccess
 
diff --git a/sfx2/inc/sidebar/UnoPanel.hxx b/sfx2/inc/sidebar/UnoPanel.hxx
index 4e148befdf8d..97cd6c910c26 100644
--- a/sfx2/inc/sidebar/UnoPanel.hxx
+++ b/sfx2/inc/sidebar/UnoPanel.hxx
@@ -31,7 +31,7 @@ class SfxUnoPanel final : public 
cppu::WeakImplHelper<css::ui::XPanel>
 
 public:
 
-    SfxUnoPanel(const css::uno::Reference<css::frame::XFrame>& , const 
OUString&, const OUString&);
+    SfxUnoPanel(css::uno::Reference<css::frame::XFrame>, OUString, OUString );
 
     virtual OUString SAL_CALL getId() override;
 
diff --git a/sfx2/inc/sidebar/UnoPanels.hxx b/sfx2/inc/sidebar/UnoPanels.hxx
index 487043dee3f3..36b98c8c50c1 100644
--- a/sfx2/inc/sidebar/UnoPanels.hxx
+++ b/sfx2/inc/sidebar/UnoPanels.hxx
@@ -23,7 +23,7 @@ class SfxUnoPanels final : public 
cppu::WeakImplHelper<css::ui::XPanels>
 
 public:
 
-    SfxUnoPanels(const css::uno::Reference<css::frame::XFrame>& , const 
OUString&);
+    SfxUnoPanels(css::uno::Reference<css::frame::XFrame>, const OUString&);
 
 // XPanels
     virtual OUString SAL_CALL getDeckId() override;
diff --git a/sfx2/inc/sidebar/UnoSidebar.hxx b/sfx2/inc/sidebar/UnoSidebar.hxx
index 20ffa22b19bd..f1b5fffc7136 100644
--- a/sfx2/inc/sidebar/UnoSidebar.hxx
+++ b/sfx2/inc/sidebar/UnoSidebar.hxx
@@ -32,7 +32,7 @@ private:
 
 public:
 
-    SfxUnoSidebar(const css::uno::Reference<css::frame::XFrame>&);
+    SfxUnoSidebar(css::uno::Reference<css::frame::XFrame> );
 
     virtual void SAL_CALL showDecks (const sal_Bool bVisible) override;
 
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index 3d8317477ec0..e5a675e99fdd 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -48,7 +48,7 @@ private:
     DECL_LINK(FindHdl, weld::Button&, void);
 
 public:
-    SearchDialog(weld::Window* pWindow, const OUString& rConfigName);
+    SearchDialog(weld::Window* pWindow, OUString aConfigName);
     static void runAsync(const std::shared_ptr<SearchDialog>& rController);
     virtual ~SearchDialog() override;
 
diff --git a/sfx2/inc/unoctitm.hxx b/sfx2/inc/unoctitm.hxx
index 5dc93943f7d7..812dbce7077d 100644
--- a/sfx2/inc/unoctitm.hxx
+++ b/sfx2/inc/unoctitm.hxx
@@ -129,7 +129,7 @@ public:
                                                     SfxBindings*               
        pBind,
                                                     SfxDispatcher*             
        pDispat,
                                                     const SfxSlot*             
        pSlot,
-                                                    const css::util::URL& rURL 
);
+                                                    css::util::URL aURL );
                         virtual ~SfxDispatchController_Impl() override;
 
     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
diff --git a/sfx2/source/appl/helpdispatch.cxx 
b/sfx2/source/appl/helpdispatch.cxx
index 7b2467a34c80..ec6b5dfea0e5 100644
--- a/sfx2/source/appl/helpdispatch.cxx
+++ b/sfx2/source/appl/helpdispatch.cxx
@@ -21,6 +21,7 @@
 #include "helpdispatch.hxx"
 #include "newhelp.hxx"
 #include <tools/debug.hxx>
+#include <utility>
 
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::frame;
@@ -30,10 +31,10 @@ using namespace ::com::sun::star::util;
 // class HelpInterceptor_Impl --------------------------------------------
 
 HelpDispatch_Impl::HelpDispatch_Impl( HelpInterceptor_Impl& _rInterceptor,
-                                      const css::uno::Reference< 
css::frame::XDispatch >& _xDisp ) :
+                                      css::uno::Reference< 
css::frame::XDispatch > _xDisp ) :
 
     m_rInterceptor  ( _rInterceptor ),
-    m_xRealDispatch ( _xDisp )
+    m_xRealDispatch (std::move( _xDisp ))
 
 {
 }
diff --git a/sfx2/source/appl/helpdispatch.hxx 
b/sfx2/source/appl/helpdispatch.hxx
index b0494c6d0232..c1e6aa8f9858 100644
--- a/sfx2/source/appl/helpdispatch.hxx
+++ b/sfx2/source/appl/helpdispatch.hxx
@@ -33,7 +33,7 @@ private:
 
 public:
     HelpDispatch_Impl( HelpInterceptor_Impl& _rInterceptor,
-                       const css::uno::Reference< css::frame::XDispatch >& 
_xDisp );
+                       css::uno::Reference< css::frame::XDispatch > _xDisp );
     virtual ~HelpDispatch_Impl() override;
 
     // XDispatch
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index fb9ec11431c4..131992c51040 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -22,6 +22,7 @@
 #include <sfx2/lnkbase.hxx>
 #include <com/sun/star/uno/Any.hxx>
 
+#include <utility>
 #include <vcl/timer.hxx>
 #include <memory>
 #include <vector>
@@ -77,9 +78,9 @@ struct SvLinkSource_Entry_Impl
     sal_uInt16                nAdviseModes;
     bool                      bIsDataSink;
 
-    SvLinkSource_Entry_Impl( SvBaseLink* pLink, const OUString& rMimeType,
+    SvLinkSource_Entry_Impl( SvBaseLink* pLink, OUString aMimeType,
                                 sal_uInt16 nAdvMode )
-        : xSink( pLink ), aDataMimeType( rMimeType ),
+        : xSink( pLink ), aDataMimeType(std::move( aMimeType )),
             nAdviseModes( nAdvMode ), bIsDataSink( true )
     {}
 
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 701369f378c7..8cc649675d8b 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -74,6 +74,7 @@
 #include <tools/urlobj.hxx>
 #include <svtools/imagemgr.hxx>
 #include <svtools/miscopt.hxx>
+#include <utility>
 #include <vcl/commandevent.hxx>
 #include <vcl/event.hxx>
 #include <vcl/i18nhelp.hxx>
@@ -194,8 +195,8 @@ struct IndexEntry_Impl
     bool            m_bSubEntry;
     OUString        m_aURL;
 
-    IndexEntry_Impl( const OUString& rURL, bool bSubEntry ) :
-        m_bSubEntry( bSubEntry ), m_aURL( rURL ) {}
+    IndexEntry_Impl( OUString aURL, bool bSubEntry ) :
+        m_bSubEntry( bSubEntry ), m_aURL(std::move( aURL )) {}
 };
 
 // struct ContentEntry_Impl ----------------------------------------------
@@ -205,8 +206,8 @@ struct ContentEntry_Impl
     OUString    aURL;
     bool        bIsFolder;
 
-    ContentEntry_Impl( const OUString& rURL, bool bFolder ) :
-        aURL( rURL ), bIsFolder( bFolder ) {}
+    ContentEntry_Impl( OUString _aURL, bool bFolder ) :
+        aURL(std::move( _aURL )), bIsFolder( bFolder ) {}
 };
 
 }
diff --git a/sfx2/source/appl/preventduplicateinteraction.cxx 
b/sfx2/source/appl/preventduplicateinteraction.cxx
index 31dcd113b66b..c7d6341fa8f0 100644
--- a/sfx2/source/appl/preventduplicateinteraction.cxx
+++ b/sfx2/source/appl/preventduplicateinteraction.cxx
@@ -24,11 +24,12 @@
 
 #include <com/sun/star/task/InteractionHandler.hpp>
 #include <com/sun/star/task/XInteractionAbort.hpp>
+#include <utility>
 
 namespace sfx2 {
 
-PreventDuplicateInteraction::PreventDuplicateInteraction(const 
css::uno::Reference< css::uno::XComponentContext >& rxContext)
-    : m_xContext(rxContext)
+PreventDuplicateInteraction::PreventDuplicateInteraction(css::uno::Reference< 
css::uno::XComponentContext > xContext)
+    : m_xContext(std::move(xContext))
 {
 }
 
diff --git a/sfx2/source/appl/shutdownicon.cxx 
b/sfx2/source/appl/shutdownicon.cxx
index 8c28c4fa1888..0dd218004154 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -55,6 +55,7 @@
 #include <osl/file.hxx>
 #include <osl/module.hxx>
 #include <rtl/ref.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 
 #include <sfx2/sfxresid.hxx>
@@ -138,11 +139,11 @@ void ShutdownIcon::deInitSystray()
 }
 
 
-ShutdownIcon::ShutdownIcon( const css::uno::Reference< XComponentContext > & 
rxContext ) :
+ShutdownIcon::ShutdownIcon( css::uno::Reference< XComponentContext > xContext 
) :
     m_bVeto ( false ),
     m_bListenForTermination ( false ),
     m_bSystemDialogs( false ),
-    m_xContext( rxContext ),
+    m_xContext(std::move( xContext )),
     m_bInitialized( false )
 {
     m_bSystemDialogs = 
officecfg::Office::Common::Misc::UseSystemFileDialog::get();
diff --git a/sfx2/source/appl/shutdownicon.hxx 
b/sfx2/source/appl/shutdownicon.hxx
index 51c778e1dd53..cc1af1367550 100644
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
@@ -80,7 +80,7 @@ class ShutdownIcon : public ShutdownIconServiceBase
         friend class SfxNotificationListener_Impl;
 
     public:
-        explicit ShutdownIcon( const css::uno::Reference< 
css::uno::XComponentContext > & rxContext );
+        explicit ShutdownIcon( css::uno::Reference< 
css::uno::XComponentContext > xContext );
 
         virtual ~ShutdownIcon() override;
 
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 56638fc1c9d2..11dcbd4051d8 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -32,6 +32,7 @@
 #include <comphelper/sequenceashashmap.hxx>
 
 #include <sot/exchange.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <rtl/ustring.hxx>
@@ -90,8 +91,8 @@ class SfxFilterContainer_Impl
 public:
     OUString            aName;
 
-    explicit SfxFilterContainer_Impl( const OUString& rName )
-        : aName( rName )
+    explicit SfxFilterContainer_Impl( OUString _aName )
+        : aName(std::move( _aName ))
     {
     }
 };
@@ -199,8 +200,8 @@ public:
 
     void InitForIterating() const;
     void Update() const;
-    explicit SfxFilterMatcher_Impl(const OUString &rName)
-        : aName(rName)
+    explicit SfxFilterMatcher_Impl(OUString _aName)
+        : aName(std::move(_aName))
         , pList(nullptr)
     {
     }
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx
index 8d8f0a80ac30..709ad6293c3c 100644
--- a/sfx2/source/control/minfitem.cxx
+++ b/sfx2/source/control/minfitem.cxx
@@ -19,6 +19,7 @@
 
 #include <sfx2/minfitem.hxx>
 #include <sal/log.hxx>
+#include <utility>
 #include <config_features.h>
 
 #if HAVE_FEATURE_SCRIPTING
@@ -29,16 +30,16 @@ SfxPoolItem* SfxMacroInfoItem::CreateDefault() { SAL_WARN( 
"sfx", "No SfxMacroIn
 SfxMacroInfoItem::SfxMacroInfoItem(
     sal_uInt16 nWhichId,        // Slot-ID
     const BasicManager* pMgr,
-    const OUString &rLibName,
-    const OUString &rModuleName,
-    const OUString &rMethodName,
-    const OUString &rComment) :
+    OUString _aLibName,
+    OUString _aModuleName,
+    OUString _aMethodName,
+    OUString _aComment) :
     SfxPoolItem(nWhichId),
     pBasicManager(pMgr),
-    aLibName(rLibName),
-    aModuleName(rModuleName),
-    aMethodName(rMethodName),
-    aCommentText(rComment)
+    aLibName(std::move(_aLibName)),
+    aModuleName(std::move(_aModuleName)),
+    aMethodName(std::move(_aMethodName)),
+    aCommentText(std::move(_aComment))
 {
 }
 
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index ef1eaf1a1508..8e0dd7810f5f 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -41,15 +41,16 @@
 #include <unoctitm.hxx>
 #include <sfx2/msgpool.hxx>
 #include <sfx2/viewfrm.hxx>
+#include <utility>
 #include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 
-BindDispatch_Impl::BindDispatch_Impl( const css::uno::Reference< 
css::frame::XDispatch > & rDisp, const css::util::URL& rURL, SfxStateCache 
*pStateCache, const SfxSlot* pS )
-    : xDisp( rDisp )
-    , aURL( rURL )
+BindDispatch_Impl::BindDispatch_Impl( css::uno::Reference< 
css::frame::XDispatch > _xDisp, css::util::URL _aURL, SfxStateCache 
*pStateCache, const SfxSlot* pS )
+    : xDisp(std::move( _xDisp ))
+    , aURL(std::move( _aURL ))
     , pCache( pStateCache )
     , pSlot( pS )
 {
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 4ee282227107..01eee96f5ddf 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -42,6 +42,7 @@
 #include <com/sun/star/frame/status/Visibility.hpp>
 #include <comphelper/processfactory.hxx>
 #include <uno/current_context.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/uitest/logger.hxx>
 #include <boost/property_tree/json_parser.hpp>
@@ -338,8 +339,8 @@ SfxDispatchController_Impl::SfxDispatchController_Impl(
     SfxBindings*                       pBind,
     SfxDispatcher*                     pDispat,
     const SfxSlot*                     pSlot,
-    const css::util::URL&              rURL )
-    : aDispatchURL( rURL )
+    css::util::URL               aURL )
+    : aDispatchURL(std::move( aURL ))
     , pDispatcher( pDispat )
     , pBindings( pBind )
     , pLastState( nullptr )
diff --git a/sfx2/source/devtools/DocumentModelTreeHandler.cxx 
b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
index c5358c02b48e..bbcb17a3f74c 100644
--- a/sfx2/source/devtools/DocumentModelTreeHandler.cxx
+++ b/sfx2/source/devtools/DocumentModelTreeHandler.cxx
@@ -36,6 +36,7 @@
 #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
 #include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <utility>
 
 using namespace css;
 
@@ -63,10 +64,9 @@ protected:
     css::uno::Reference<css::uno::XInterface> mxObject;
 
 public:
-    DocumentModelTreeEntry(OUString const& rString,
-                           css::uno::Reference<css::uno::XInterface> const& 
xObject)
-        : maString(rString)
-        , mxObject(xObject)
+    DocumentModelTreeEntry(OUString aString, 
css::uno::Reference<css::uno::XInterface> xObject)
+        : maString(std::move(aString))
+        , mxObject(std::move(xObject))
     {
     }
 
@@ -701,9 +701,9 @@ public:
 
 DocumentModelTreeHandler::DocumentModelTreeHandler(
     std::unique_ptr<weld::TreeView>& pDocumentModelTree,
-    css::uno::Reference<css::uno::XInterface> const& xDocument)
+    css::uno::Reference<css::uno::XInterface> xDocument)
     : mpDocumentModelTree(pDocumentModelTree)
-    , mxDocument(xDocument)
+    , mxDocument(std::move(xDocument))
 {
     mpDocumentModelTree->connect_expanding(LINK(this, 
DocumentModelTreeHandler, ExpandingHandler));
 }
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index 18c4206e0730..53d4d8b08bab 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -12,6 +12,7 @@
 
 #include <sfx2/devtools/ObjectInspectorTreeHandler.hxx>
 #include <sfx2/sfxresid.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include "DevToolsStrings.hrc"
 
@@ -392,8 +393,8 @@ protected:
     OUString msName;
 
 public:
-    SimpleStringNode(OUString const& rName)
-        : msName(rName)
+    SimpleStringNode(OUString sName)
+        : msName(std::move(sName))
     {
     }
 
@@ -412,8 +413,8 @@ private:
     uno::Reference<reflection::XIdlMethod> mxMethod;
 
 public:
-    MethodNode(uno::Reference<reflection::XIdlMethod> const& xMethod)
-        : mxMethod(xMethod)
+    MethodNode(uno::Reference<reflection::XIdlMethod> xMethod)
+        : mxMethod(std::move(xMethod))
     {
     }
 
@@ -503,8 +504,8 @@ private:
     }
 
 public:
-    ClassNode(uno::Reference<reflection::XIdlClass> const& xClass)
-        : mxClass(xClass)
+    ClassNode(uno::Reference<reflection::XIdlClass> xClass)
+        : mxClass(std::move(xClass))
     {
     }
 
@@ -542,12 +543,12 @@ protected:
     createNodeObjectForAny(OUString const& rName, const uno::Any& rAny, 
OUString const& mrInfo);
 
 public:
-    BasicValueNode(OUString const& rName, uno::Any const& rAny, OUString 
const& rInfo,
-                   uno::Reference<uno::XComponentContext> const& xContext)
+    BasicValueNode(OUString const& rName, uno::Any aAny, OUString aInfo,
+                   uno::Reference<uno::XComponentContext> xContext)
         : SimpleStringNode(rName)
-        , maAny(rAny)
-        , mrInfo(rInfo)
-        , mxContext(xContext)
+        , maAny(std::move(aAny))
+        , mrInfo(std::move(aInfo))
+        , mxContext(std::move(xContext))
     {
     }
 
diff --git a/sfx2/source/devtools/SelectionChangeHandler.hxx 
b/sfx2/source/devtools/SelectionChangeHandler.hxx
index 15a2b35963e2..57224e056a52 100644
--- a/sfx2/source/devtools/SelectionChangeHandler.hxx
+++ b/sfx2/source/devtools/SelectionChangeHandler.hxx
@@ -16,6 +16,7 @@
 #include <com/sun/star/view/XSelectionSupplier.hpp>
 
 #include <comphelper/compbase.hxx>
+#include <utility>
 
 typedef 
comphelper::WeakComponentImplHelper<css::view::XSelectionChangeListener>
     SelectionChangeHandlerInterfaceBase;
@@ -32,9 +33,9 @@ private:
     VclPtr<DevelopmentToolDockingWindow> mpDockingWindow;
 
 public:
-    SelectionChangeHandler(const css::uno::Reference<css::frame::XController>& 
rxController,
+    SelectionChangeHandler(css::uno::Reference<css::frame::XController> 
xController,
                            DevelopmentToolDockingWindow* pDockingWindow)
-        : mxController(rxController)
+        : mxController(std::move(xController))
         , mpDockingWindow(pDockingWindow)
     {
         css::uno::Reference<css::view::XSelectionSupplier> 
xSupplier(mxController,
diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx
index a25050ead918..aeccc1f99d3c 100644
--- a/sfx2/source/dialog/StyleList.cxx
+++ b/sfx2/source/dialog/StyleList.cxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
+#include <utility>
 #include <vcl/commandevent.hxx>
 #include <vcl/commandinfoprovider.hxx>
 #include <vcl/event.hxx>
@@ -583,9 +584,9 @@ private:
 public:
     bool HasParent() const { return !aParent.isEmpty(); }
 
-    StyleTree_Impl(const OUString& rName, const OUString& rParent)
-        : aName(rName)
-        , aParent(rParent)
+    StyleTree_Impl(OUString _aName, OUString _aParent)
+        : aName(std::move(_aName))
+        , aParent(std::move(_aParent))
         , pChildren(0)
     {
     }
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index cde9a7532d9f..a09404043bd5 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "backingwindow.hxx"
+#include <utility>
 #include <vcl/event.hxx>
 #include <vcl/help.hxx>
 #include <vcl/ptrstyle.hxx>
@@ -699,10 +700,10 @@ struct ImplDelayedDispatch
     Sequence< PropertyValue >   aArgs;
 
     ImplDelayedDispatch( const Reference< XDispatch >& i_xDispatch,
-                         const css::util::URL& i_rURL,
+                         css::util::URL i_aURL,
                          const Sequence< PropertyValue >& i_rArgs )
     : xDispatch( i_xDispatch ),
-      aDispatchURL( i_rURL ),
+      aDispatchURL(std::move( i_aURL )),
       aArgs( i_rArgs )
     {
     }
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index ddc272907306..b58ac753b1c9 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -21,6 +21,7 @@
 #include <tools/datetime.hxx>
 #include <tools/debug.hxx>
 #include <tools/urlobj.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <vcl/weldutils.hxx>
@@ -86,8 +87,8 @@ struct CustomProperty
     OUString         m_sName;
     css::uno::Any    m_aValue;
 
-    CustomProperty( const OUString& sName, const css::uno::Any& rValue ) :
-        m_sName( sName ), m_aValue( rValue ) {}
+    CustomProperty( OUString sName, css::uno::Any aValue ) :
+        m_sName(std::move( sName )), m_aValue(std::move( aValue )) {}
 
     bool operator==(const CustomProperty& rProp) const
     {
diff --git a/sfx2/source/dialog/filtergrouping.cxx 
b/sfx2/source/dialog/filtergrouping.cxx
index ef1a4fef3035..d8866813fcfe 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -37,6 +37,7 @@
 #include <tools/debug.hxx>
 
 #include <list>
+#include <utility>
 #include <vector>
 #include <map>
 #include <algorithm>
@@ -197,8 +198,8 @@ namespace sfx2
         FilterClassReferrer&    m_aClassReferrer;
 
     public:
-        ReadGlobalFilter( const OConfigurationNode& _rClassesNode, 
FilterClassReferrer& _rClassesReferrer )
-            :m_aClassesNode     ( _rClassesNode )
+        ReadGlobalFilter( OConfigurationNode _aClassesNode, 
FilterClassReferrer& _rClassesReferrer )
+            :m_aClassesNode     (std::move( _aClassesNode ))
             ,m_aClassReferrer   ( _rClassesReferrer )
         {
         }
@@ -271,8 +272,8 @@ namespace sfx2
         FilterClassList&        m_rClasses;
 
     public:
-        ReadLocalFilter( const OConfigurationNode& _rClassesNode, 
FilterClassList& _rClasses )
-            :m_aClassesNode ( _rClassesNode )
+        ReadLocalFilter( OConfigurationNode _aClassesNode, FilterClassList& 
_rClasses )
+            :m_aClassesNode (std::move( _aClassesNode ))
             ,m_rClasses     ( _rClasses )
         {
         }
@@ -342,9 +343,9 @@ namespace sfx2
         FilterGroup::iterator       m_aClassPos;
 
     public:
-        ReferToFilterEntry( FilterGroupEntryReferrer& _rEntryReferrer, const 
FilterGroup::iterator& _rClassPos )
+        ReferToFilterEntry( FilterGroupEntryReferrer& _rEntryReferrer, 
FilterGroup::iterator  _aClassPos )
             :m_rEntryReferrer( _rEntryReferrer )
-            ,m_aClassPos( _rClassPos )
+            ,m_aClassPos(std::move( _aClassPos ))
         {
         }
 
@@ -534,7 +535,7 @@ namespace sfx2
     struct FindGroupEntry
     {
         FilterGroupEntryReferrer::mapped_type aLookingFor;
-        explicit FindGroupEntry( FilterGroupEntryReferrer::mapped_type const & 
_rLookingFor ) : aLookingFor( _rLookingFor ) { }
+        explicit FindGroupEntry( FilterGroupEntryReferrer::mapped_type 
_aLookingFor ) : aLookingFor(std::move( _aLookingFor )) { }
 
         bool operator() ( const MapGroupEntry2GroupEntry::value_type& 
_rMapEntry )
         {
@@ -948,8 +949,8 @@ namespace sfx2
 
     struct ExportFilter
     {
-        ExportFilter( const OUString& _aUIName, const OUString& _aWildcard ) :
-            aUIName( _aUIName ), aWildcard( _aWildcard ) {}
+        ExportFilter( OUString _aUIName, OUString _aWildcard ) :
+            aUIName(std::move( _aUIName )), aWildcard(std::move( _aWildcard )) 
{}
 
         OUString aUIName;
         OUString aWildcard;
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 79e33a9317b6..144a3cd85c6a 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -21,6 +21,7 @@
 #include <sfx2/objface.hxx>
 #include <sfx2/sfxsids.hrc>
 #include <sfx2/viewfrm.hxx>
+#include <utility>
 #include <vcl/image.hxx>
 #include <vcl/settings.hxx>
 #include <vcl/svapp.hxx>
@@ -187,12 +188,12 @@ IMPL_LINK_NOARG(ExtraButton, CommandHdl, weld::Button&, 
void)
     comphelper::dispatchCommand(m_aCommand, 
css::uno::Sequence<css::beans::PropertyValue>());
 }
 
-SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, const OUString& sId,
+SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, OUString sId,
                                    const OUString& sPrimaryMessage,
                                    const OUString& sSecondaryMessage, 
InfobarType ibType,
                                    bool bShowCloseButton)
     : InterimItemWindow(pParent, "sfx/ui/infobar.ui", "InfoBar")
-    , m_sId(sId)
+    , m_sId(std::move(sId))
     , m_eType(ibType)
     , m_bLayingOut(false)
     , m_xImage(m_xBuilder->weld_image("image"))
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index fdd42e7e6c0c..9c7b364ffa34 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -24,6 +24,7 @@
 #include <tools/debug.hxx>
 #include <unotools/viewoptions.hxx>
 #include <o3tl/string_view.hxx>
+#include <utility>
 
 using namespace ::com::sun::star::uno;
 
@@ -36,9 +37,9 @@ namespace sfx2 {
 // SearchDialog
 
 
-SearchDialog::SearchDialog(weld::Window* pWindow, const OUString& rConfigName)
+SearchDialog::SearchDialog(weld::Window* pWindow, OUString aConfigName)
     : GenericDialogController(pWindow, "sfx/ui/searchdialog.ui", 
"SearchDialog")
-    , m_sConfigName(rConfigName)
+    , m_sConfigName(std::move(aConfigName))
     , m_xSearchEdit(m_xBuilder->weld_combo_box("searchterm"))
     , m_xWholeWordsBox(m_xBuilder->weld_check_button("wholewords"))
     , m_xMatchCaseBox(m_xBuilder->weld_check_button("matchcase"))
diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx
index 489c4d2df5e5..240e30c887f8 100644
--- a/sfx2/source/dialog/styfitem.cxx
+++ b/sfx2/source/dialog/styfitem.cxx
@@ -19,13 +19,14 @@
 
 #include <sfx2/styfitem.hxx>
 #include <unotools/resmgr.hxx>
+#include <utility>
 
 SfxStyleFamilyItem::SfxStyleFamilyItem(
-    SfxStyleFamily nFamily_, const OUString& rName, const OUString& rImage,
+    SfxStyleFamily nFamily_, OUString _aName, OUString _aImage,
     const std::pair<TranslateId, SfxStyleSearchBits>* pStringArray, const 
std::locale& rResLocale)
     : nFamily(nFamily_)
-    , aText(rName)
-    , aImage(rImage)
+    , aText(std::move(_aName))
+    , aImage(std::move(_aImage))
 {
     for (const std::pair<TranslateId, SfxStyleSearchBits>* pItem = 
pStringArray; pItem->first;
          ++pItem)
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 11a43a498f9f..fb025ac21b6e 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -28,6 +28,7 @@
 #include <sfx2/sfxdlg.hxx>
 #include <sfx2/viewsh.hxx>
 #include <unotools/viewoptions.hxx>
+#include <utility>
 #include <vcl/virdev.hxx>
 #include <sal/log.hxx>
 #include <tools/debug.hxx>
diff --git a/sfx2/source/dialog/tplpitem.cxx b/sfx2/source/dialog/tplpitem.cxx
index 1662634440bd..a453323bbb80 100644
--- a/sfx2/source/dialog/tplpitem.cxx
+++ b/sfx2/source/dialog/tplpitem.cxx
@@ -19,6 +19,7 @@
 
 #include <sfx2/tplpitem.hxx>
 #include <com/sun/star/frame/status/Template.hpp>
+#include <utility>
 
 SfxPoolItem* SfxTemplateItem::CreateDefault() { return new SfxTemplateItem; }
 
@@ -30,11 +31,11 @@ SfxTemplateItem::SfxTemplateItem()
 SfxTemplateItem::SfxTemplateItem
 (
     sal_uInt16 nWhichId,      // Slot-ID
-    const OUString& rStyle,    // Name of the current Styles
-    const OUString& rStyleIdentifier     // Prog Name of current Style
+    OUString _aStyle,    // Name of the current Styles
+    OUString _aStyleIdentifier     // Prog Name of current Style
 ) : SfxFlagItem( nWhichId, static_cast<sal_uInt16>(SfxStyleSearchBits::All) ),
-    aStyle( rStyle ),
-    aStyleIdentifier( rStyleIdentifier )
+    aStyle(std::move( _aStyle )),
+    aStyleIdentifier(std::move( _aStyleIdentifier ))
 {
 }
 
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx 
b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 3bb670c7b1dd..1994c53bd51e 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -55,6 +55,7 @@
 
 #include <libxml/tree.h>
 
+#include <utility>
 #include <vector>
 #include <set>
 #include <string_view>
@@ -221,9 +222,9 @@ struct DocumentMetadataAccess_Impl
     uno::Reference<rdf::XRepository> m_xRepository;
     uno::Reference<rdf::XNamedGraph> m_xManifest;
     DocumentMetadataAccess_Impl(
-            uno::Reference<uno::XComponentContext> const& i_xContext,
+            uno::Reference<uno::XComponentContext> i_xContext,
             SfxObjectShell const & i_rRegistrySupplier)
-      : m_xContext(i_xContext)
+      : m_xContext(std::move(i_xContext))
       , m_rXmlIdRegistrySupplier(i_rRegistrySupplier)
     {
         OSL_ENSURE(m_xContext.is(), "context null");
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 1906967cabe0..ebb34f153ea1 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -24,6 +24,7 @@
 #include <sfx2/Metadatable.hxx>
 #include <sfx2/XmlIdRegistry.hxx>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <com/sun/star/frame/XModel.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -892,11 +893,11 @@ namespace {
 struct RMapEntry
 {
     RMapEntry() {}
-    RMapEntry(OUString const& i_rStream,
-            OUString const& i_rXmlId,
-            std::shared_ptr<MetadatableClipboard> const& i_pLink
+    RMapEntry(OUString i_aStream,
+            OUString i_aXmlId,
+            std::shared_ptr<MetadatableClipboard>  i_pLink
                 = std::shared_ptr<MetadatableClipboard>())
-        :   m_Stream(i_rStream), m_XmlId(i_rXmlId), m_xLink(i_pLink)
+        :   m_Stream(std::move(i_aStream)), m_XmlId(std::move(i_aXmlId)), 
m_xLink(std::move(i_pLink))
         {}
     OUString m_Stream;
     OUString m_XmlId;
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index a222ef7e4d49..b1df5ad2c7cd 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -44,6 +44,7 @@
 #include <tools/globname.hxx>
 
 #include <memory>
+#include <utility>
 
 using namespace ::com::sun::star;
 
@@ -70,8 +71,8 @@ SfxFilterContainer* SfxObjectFactory::GetFilterContainer() 
const
 SfxObjectFactory::SfxObjectFactory
 (
     const SvGlobalName&     rName,
-    const OUString&         sName
-) :    m_sFactoryName( sName ),
+    OUString          sName
+) :    m_sFactoryName(std::move( sName )),
        pImpl( new SfxObjectFactory_Impl )
 {
     pImpl->pFilterContainer = new SfxFilterContainer( m_sFactoryName );
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index aae5a8710bb8..81d8f9f9238b 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -149,8 +149,8 @@ struct ReadOnlyMediumEntry
 {
     ReadOnlyMediumEntry(std::shared_ptr<std::recursive_mutex> pMutex,
                         std::shared_ptr<bool> pIsDestructed)
-        : _pMutex(pMutex)
-        , _pIsDestructed(pIsDestructed)
+        : _pMutex(std::move(pMutex))
+        , _pIsDestructed(std::move(pIsDestructed))
     {
     }
     std::shared_ptr<std::recursive_mutex> _pMutex;
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 7a23a2842346..a5c29faee0bf 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -29,12 +29,13 @@
 #include <sfx2/docfilt.hxx>
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/objsh.hxx>
+#include <utility>
 
 using namespace ::com::sun::star;
 
-SfxFilter::SfxFilter( const OUString& rProvider, const OUString &rFilterName ) 
:
-    maFilterName(rFilterName),
-    maProvider(rProvider),
+SfxFilter::SfxFilter( OUString aProvider, OUString aFilterName ) :
+    maFilterName(std::move(aFilterName)),
+    maProvider(std::move(aProvider)),
     nFormatType(SfxFilterFlags::NONE),
     nVersion(0),
     lFormat(SotClipboardFormatId::NONE),
@@ -42,21 +43,21 @@ SfxFilter::SfxFilter( const OUString& rProvider, const 
OUString &rFilterName ) :
 {
 }
 
-SfxFilter::SfxFilter( const OUString &rName,
+SfxFilter::SfxFilter( OUString aName,
                       std::u16string_view rWildCard,
                       SfxFilterFlags nType,
                       SotClipboardFormatId lFmt,
-                      const OUString &rTypNm,
-                      const OUString &rMimeType,
-                      const OUString &rUsrDat,
-                      const OUString &rServiceName,
+                      OUString aTypNm,
+                      OUString _aMimeType,
+                      OUString aUsrDat,
+                      OUString _aServiceName,
                       bool bEnabled ):
     aWildCard(rWildCard, ';'),
-    aTypeName(rTypNm),
-    aUserData(rUsrDat),
-    aServiceName(rServiceName),
-    aMimeType(rMimeType),
-    maFilterName(rName),
+    aTypeName(std::move(aTypNm)),
+    aUserData(std::move(aUsrDat)),
+    aServiceName(std::move(_aServiceName)),
+    aMimeType(std::move(_aMimeType)),
+    maFilterName(std::move(aName)),
     aUIName(maFilterName),
     nFormatType(nType),
     nVersion(SOFFICE_FILEFORMAT_50),
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index d8fe42621a2a..0498f0c44f44 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -39,6 +39,7 @@
 #include <svl/intitem.hxx>
 #include <svl/stritem.hxx>
 #include <memory>
+#include <utility>
 #include <tools/diagnose_ex.h>
 
 using namespace ::com::sun::star;
@@ -74,9 +75,9 @@ FileDialogFlags lcl_map_mode_to_flags(const 
sfx2::DocumentInserter::Mode mode)
 
 namespace sfx2 {
 
-DocumentInserter::DocumentInserter(weld::Window* pParent, const OUString& 
rFactory, const Mode mode)
+DocumentInserter::DocumentInserter(weld::Window* pParent, OUString sFactory, 
const Mode mode)
     : m_pParent                 ( pParent )
-    , m_sDocFactory             ( rFactory )
+    , m_sDocFactory             (std::move( sFactory ))
     , m_nDlgFlags               ( lcl_map_mode_to_flags(mode) )
     , m_nError                  ( ERRCODE_NONE )
 {
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index f464ab66f4a3..53c8b1c5cc38 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -78,6 +78,7 @@ using namespace ::ucbhelper;
 #include <svtools/templatefoldercache.hxx>
 
 #include <memory>
+#include <utility>
 #include <vector>
 
 
@@ -144,7 +145,7 @@ private:
 
 public:
                         RegionData_Impl( const SfxDocTemplate_Impl* pParent,
-                                         const OUString& rTitle );
+                                         OUString aTitle );
 
     void                SetHierarchyURL( const OUString& rURL) { maOwnURL = 
rURL; }
 
@@ -1294,8 +1295,8 @@ const OUString& DocTempl_EntryData_Impl::GetTargetURL()
 
 
 RegionData_Impl::RegionData_Impl( const SfxDocTemplate_Impl* pParent,
-                                  const OUString& rTitle )
-                                  : mpParent(pParent), maTitle(rTitle)
+                                  OUString aTitle )
+                                  : mpParent(pParent), 
maTitle(std::move(aTitle))
 {
 }
 
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 6005aa5fdd8e..41f194b3b63f 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -22,6 +22,7 @@
 #include <tools/urlobj.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/log.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/wrkwin.hxx>
 #include <unotools/pathoptions.hxx>
@@ -164,8 +165,8 @@ class TplTaskEnvironment : public ::cppu::WeakImplHelper< 
ucb::XCommandEnvironme
     uno::Reference< task::XInteractionHandler >               
m_xInteractionHandler;
 
 public:
-    explicit TplTaskEnvironment( const uno::Reference< 
task::XInteractionHandler>& rxInteractionHandler )
-                                : m_xInteractionHandler( rxInteractionHandler )
+    explicit TplTaskEnvironment( uno::Reference< task::XInteractionHandler> 
xInteractionHandler )
+                                : m_xInteractionHandler(std::move( 
xInteractionHandler ))
                             {}
 
     virtual uno::Reference<task::XInteractionHandler> SAL_CALL 
getInteractionHandler() override
@@ -322,7 +323,7 @@ class DocTemplates_EntryData_Impl
     bool            mbUpdateLink    : 1;
 
 public:
-   explicit             DocTemplates_EntryData_Impl( const OUString& rTitle );
+   explicit             DocTemplates_EntryData_Impl( OUString aTitle );
 
     void                setInUse() { mbInUse = true; }
     void                setHierarchy( bool bInHierarchy ) { mbInHierarchy = 
bInHierarchy; }
@@ -355,7 +356,7 @@ class GroupData_Impl
     bool            mbInHierarchy   : 1;
 
 public:
-    explicit            GroupData_Impl( const OUString& rTitle );
+    explicit            GroupData_Impl( OUString aTitle );
 
     void                setInUse() { mbInUse = true; }
     void                setHierarchy( bool bInHierarchy ) { mbInHierarchy = 
bInHierarchy; }
@@ -2564,8 +2565,8 @@ void SfxDocTplService_Impl::removeFromHierarchy( 
GroupData_Impl const *pGroup )
 }
 
 
-GroupData_Impl::GroupData_Impl( const OUString& rTitle )
-     : maTitle(rTitle), mbInUse(false), mbInHierarchy(false)
+GroupData_Impl::GroupData_Impl( OUString aTitle )
+     : maTitle(std::move(aTitle)), mbInUse(false), mbInHierarchy(false)
 {
 }
 
@@ -2622,8 +2623,8 @@ DocTemplates_EntryData_Impl* GroupData_Impl::addEntry( 
const OUString& rTitle,
 }
 
 
-DocTemplates_EntryData_Impl::DocTemplates_EntryData_Impl( const OUString& 
rTitle )
-     : maTitle(rTitle), mbInHierarchy(false), mbInUse(false), 
mbUpdateType(false), mbUpdateLink(false)
+DocTemplates_EntryData_Impl::DocTemplates_EntryData_Impl( OUString aTitle )
+     : maTitle(std::move(aTitle)), mbInHierarchy(false), mbInUse(false), 
mbUpdateType(false), mbUpdateLink(false)
 {
 }
 
@@ -2641,8 +2642,8 @@ bool SfxURLRelocator_Impl::propertyCanContainOfficeDir(
 }
 
 
-SfxURLRelocator_Impl::SfxURLRelocator_Impl( const uno::Reference< 
XComponentContext > & xContext )
-: mxContext( xContext )
+SfxURLRelocator_Impl::SfxURLRelocator_Impl( uno::Reference< XComponentContext 
> xContext )
+: mxContext(std::move( xContext ))
 {
 }
 
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 23c75f29653a..dfb14afda100 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -61,6 +61,7 @@
 #include <comphelper/sequenceashashmap.hxx>
 #include <comphelper/mimeconfighelper.hxx>
 #include <comphelper/lok.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <o3tl/char16_t2wchar_t.hxx>
@@ -266,7 +267,7 @@ class ModelData_Impl
 
 public:
     ModelData_Impl( SfxStoringHelper& aOwner,
-                    const uno::Reference< frame::XModel >& xModel,
+                    uno::Reference< frame::XModel > xModel,
                     const uno::Sequence< beans::PropertyValue >& aMediaDescr );
 
     ~ModelData_Impl();
@@ -326,10 +327,10 @@ public:
 
 
 ModelData_Impl::ModelData_Impl( SfxStoringHelper& aOwner,
-                                const uno::Reference< frame::XModel >& xModel,
+                                uno::Reference< frame::XModel > xModel,
                                 const uno::Sequence< beans::PropertyValue >& 
aMediaDescr )
 : m_pOwner( &aOwner )
-, m_xModel( xModel )
+, m_xModel(std::move( xModel ))
 , m_aMediaDescrHM( aMediaDescr )
 , m_bRecommendReadOnly( false )
 {
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 58a387527e4a..1b1e39594287 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -41,6 +41,7 @@
 #include <sfx2/frmdescr.hxx>
 #include <sfx2/sfxdlg.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
+#include <utility>
 #include <vcl/window.hxx>
 #include <tools/debug.hxx>
 
@@ -65,7 +66,7 @@ class IFrameObject : public ::cppu::WeakImplHelper <
 public:
     /// @throws css::uno::Exception
     /// @throws css::uno::RuntimeException
-    IFrameObject(const css::uno::Reference < css::uno::XComponentContext>& 
rxContext, const css::uno::Sequence< css::uno::Any >& aArguments);
+    IFrameObject(css::uno::Reference < css::uno::XComponentContext> xContext, 
const css::uno::Sequence< css::uno::Any >& aArguments);
 
     virtual OUString SAL_CALL getImplementationName() override
     {
@@ -144,8 +145,8 @@ const SfxItemPropertyMapEntry* 
lcl_GetIFramePropertyMap_Impl()
     return aIFramePropertyMap_Impl;
 }
 
-IFrameObject::IFrameObject(const uno::Reference < uno::XComponentContext >& 
rxContext, const css::uno::Sequence< css::uno::Any >& aArguments)
-    : mxContext( rxContext )
+IFrameObject::IFrameObject(uno::Reference < uno::XComponentContext > xContext, 
const css::uno::Sequence< css::uno::Any >& aArguments)
+    : mxContext(std::move( xContext ))
     , maPropMap( lcl_GetIFramePropertyMap_Impl() )
 {
     if ( aArguments.hasElements() )
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 873ab8b9ba26..eca032983af9 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -61,6 +61,7 @@
 
 #include <basic/basmgr.hxx>
 #include <basic/sberrors.hxx>
+#include <utility>
 #include <vcl/weld.hxx>
 #include <basic/sbx.hxx>
 #include <svtools/sfxecode.hxx>
@@ -1272,8 +1273,8 @@ void SfxObjectShell::CancelTransfers()
 
 
 AutoReloadTimer_Impl::AutoReloadTimer_Impl(
-    const OUString& rURL, sal_uInt32 nTime, SfxObjectShell* pSh )
-    : Timer("sfx2 AutoReloadTimer_Impl"), aUrl( rURL ), pObjSh( pSh )
+    OUString _aURL, sal_uInt32 nTime, SfxObjectShell* pSh )
+    : Timer("sfx2 AutoReloadTimer_Impl"), aUrl(std::move( _aURL )), pObjSh( 
pSh )
 {
     SetTimeout( nTime );
 }
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 6de4aace5c99..a79ac984222e 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -25,6 +25,7 @@
 #include <tools/datetime.hxx>
 #include <rtl/tencinfo.h>
 #include <sal/log.hxx>
+#include <utility>
 
 
 #define STREAM_BUFFER_SIZE 2048
@@ -102,7 +103,7 @@ public:
                             const SfxOleTextEncoding& rTextEnc );
     explicit            SfxOleStringPropertyBase(
                             sal_Int32 nPropId, sal_Int32 nPropType,
-                            const SfxOleTextEncoding& rTextEnc, const 
OUString& rValue );
+                            const SfxOleTextEncoding& rTextEnc, OUString 
aValue );
     explicit            SfxOleStringPropertyBase(
                             sal_Int32 nPropId, sal_Int32 nPropType,
                             rtl_TextEncoding eTextEnc );
@@ -442,10 +443,10 @@ SfxOleStringPropertyBase::SfxOleStringPropertyBase(
 }
 
 SfxOleStringPropertyBase::SfxOleStringPropertyBase(
-        sal_Int32 nPropId, sal_Int32 nPropType, const SfxOleTextEncoding& 
rTextEnc, const OUString& rValue ) :
+        sal_Int32 nPropId, sal_Int32 nPropType, const SfxOleTextEncoding& 
rTextEnc, OUString aValue ) :
     SfxOlePropertyBase( nPropId, nPropType ),
     SfxOleStringHelper( rTextEnc ),
-    maValue( rValue )
+    maValue(std::move( aValue ))
 {
 }
 
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 7a18910379d2..64f17e15bd37 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -39,6 +39,7 @@
 #include <ucbhelper/content.hxx>
 #include <comphelper/interfacecontainer4.hxx>
 #include <cppuhelper/implbase.hxx>
+#include <utility>
 #include <vcl/settings.hxx>
 #include <vcl/svapp.hxx>
 
@@ -464,9 +465,9 @@ class ImplUCBPrintWatcher : public ::osl::Thread
 
     public:
         /* initialize this watcher but don't start it */
-        ImplUCBPrintWatcher( SfxPrinter* pPrinter, ::utl::TempFile* pTempFile, 
const OUString& sTargetURL )
+        ImplUCBPrintWatcher( SfxPrinter* pPrinter, ::utl::TempFile* pTempFile, 
OUString sTargetURL )
                 : m_pPrinter  ( pPrinter   )
-                , m_sTargetURL( sTargetURL )
+                , m_sTargetURL(std::move( sTargetURL ))
                 , m_pTempFile ( pTempFile  )
         {}
 
diff --git a/sfx2/source/doc/saveastemplatedlg.cxx 
b/sfx2/source/doc/saveastemplatedlg.cxx
index 6f9fd1b4757f..0cc9c2fef594 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -16,6 +16,7 @@
 #include <sfx2/docfac.hxx>
 #include <sfx2/doctempl.hxx>
 #include <sfx2/docfilt.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <sot/storage.hxx>
@@ -32,14 +33,14 @@ using namespace ::com::sun::star::frame;
 
 // Class SfxSaveAsTemplateDialog 
--------------------------------------------------
 
-SfxSaveAsTemplateDialog::SfxSaveAsTemplateDialog(weld::Window* pParent, const 
uno::Reference<frame::XModel> &rModel)
+SfxSaveAsTemplateDialog::SfxSaveAsTemplateDialog(weld::Window* pParent, 
uno::Reference<frame::XModel> xModel)
     : GenericDialogController(pParent, "sfx/ui/saveastemplatedlg.ui", 
"SaveAsTemplateDialog")
     , m_xLBCategory(m_xBuilder->weld_tree_view("categorylb"))
     , m_xCBXDefault(m_xBuilder->weld_check_button("defaultcb"))
     , m_xTemplateNameEdit(m_xBuilder->weld_entry("name_entry"))
     , m_xOKButton(m_xBuilder->weld_button("ok"))
     , mnRegionPos(0)
-    , m_xModel(rModel)
+    , m_xModel(std::move(xModel))
 {
     m_xLBCategory->append_text(SfxResId(STR_CATEGORY_NONE));
     initialize();
diff --git a/sfx2/source/inc/hintpost.hxx b/sfx2/source/inc/hintpost.hxx
index 0a72aa661446..ac37fde446ed 100644
--- a/sfx2/source/inc/hintpost.hxx
+++ b/sfx2/source/inc/hintpost.hxx
@@ -48,7 +48,7 @@ private:
     virtual         ~SfxHintPoster() override;
 
 public:
-                    SfxHintPoster(const std::function<void 
(std::unique_ptr<SfxRequest>)>& rLink);
+                    SfxHintPoster(std::function<void 
(std::unique_ptr<SfxRequest>)> aLink);
 
     void            Post( std::unique_ptr<SfxRequest> pHint );
     void            SetEventHdl(const std::function<void 
(std::unique_ptr<SfxRequest>)>& rLink);
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 46db158984ac..192470e5542d 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -43,7 +43,7 @@ class AutoReloadTimer_Impl final : public Timer
     SfxObjectShell*   pObjSh;
 
 public:
-    AutoReloadTimer_Impl( const OUString& rURL, sal_uInt32 nTime,
+    AutoReloadTimer_Impl( OUString aURL, sal_uInt32 nTime,
                           SfxObjectShell* pSh );
     virtual void Invoke() override;
 };
diff --git a/sfx2/source/inc/openurlhint.hxx b/sfx2/source/inc/openurlhint.hxx
index ea52a44e45f3..abe41cd698d9 100644
--- a/sfx2/source/inc/openurlhint.hxx
+++ b/sfx2/source/inc/openurlhint.hxx
@@ -28,7 +28,7 @@ class SfxOpenUrlHint final : public SfxHint
     OUString msDocumentURL;
 
 public:
-    SfxOpenUrlHint(const OUString& sDocumentURL);
+    SfxOpenUrlHint(OUString sDocumentURL);
     const OUString& GetDocumentURL() const;
     virtual ~SfxOpenUrlHint() override;
 };
diff --git a/sfx2/source/inc/sfxurlrelocator.hxx 
b/sfx2/source/inc/sfxurlrelocator.hxx
index 3a1fa7729445..e93e79a182d8 100644
--- a/sfx2/source/inc/sfxurlrelocator.hxx
+++ b/sfx2/source/inc/sfxurlrelocator.hxx
@@ -40,7 +40,7 @@ public:
     void                        makeRelocatableURL( OUString & rURL );
     void                        makeAbsoluteURL( OUString & rURL );
 
-    SfxURLRelocator_Impl( const css::uno::Reference< 
css::uno::XComponentContext > & xContext );
+    SfxURLRelocator_Impl( css::uno::Reference< css::uno::XComponentContext > 
xContext );
     ~SfxURLRelocator_Impl();
 
 private:
diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx
index 4247037e20c4..388e184f6653 100644
--- a/sfx2/source/inc/statcach.hxx
+++ b/sfx2/source/inc/statcach.hxx
@@ -45,8 +45,8 @@ friend class SfxStateCache;
 
 public:
                             BindDispatch_Impl(
-                                const css::uno::Reference< 
css::frame::XDispatch > & rDisp,
-                                const css::util::URL& rURL,
+                                css::uno::Reference< css::frame::XDispatch > 
xDisp,
+                                css::util::URL aURL,
                                 SfxStateCache* pStateCache, const SfxSlot* 
pSlot );
 
     virtual void SAL_CALL   statusChanged( const 
css::frame::FeatureStateEvent& Event ) override;
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 350901910554..684459ff326e 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_SFX2_SOURCE_INC_WORKWIN_HXX
 #define INCLUDED_SFX2_SOURCE_INC_WORKWIN_HXX
 
+#include <utility>
 #include <vector>
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/task/XStatusIndicator.hpp>
@@ -96,9 +97,9 @@ struct SfxChild_Impl
         nVisible = bIsVisible ? SfxChildVisibility::VISIBLE : 
SfxChildVisibility::NOT_VISIBLE;
     }
 
-    SfxChild_Impl(const std::shared_ptr<SfxDialogController>& rChild,
+    SfxChild_Impl(std::shared_ptr<SfxDialogController> xChild,
                   SfxChildAlignment eAlignment):
-        pWin(nullptr), xController(rChild), eAlign(eAlignment), bResize(false),
+        pWin(nullptr), xController(std::move(xChild)), eAlign(eAlignment), 
bResize(false),
         bSetFocus( false )
     {
         nVisible = xController->getDialog()->get_visible() ? 
SfxChildVisibility::VISIBLE : SfxChildVisibility::NOT_VISIBLE;
diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
index 446c7a954ba9..aa125d212943 100644
--- a/sfx2/source/notify/hintpost.cxx
+++ b/sfx2/source/notify/hintpost.cxx
@@ -20,10 +20,11 @@
 #include <hintpost.hxx>
 
 #include <sfx2/request.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 
-SfxHintPoster::SfxHintPoster(const 
std::function<void(std::unique_ptr<SfxRequest>)>& rLink)
-    : m_Link(rLink)
+SfxHintPoster::SfxHintPoster(std::function<void(std::unique_ptr<SfxRequest>)> 
aLink)
+    : m_Link(std::move(aLink))
 {
 }
 
diff --git a/sfx2/source/notify/openurlhint.cxx 
b/sfx2/source/notify/openurlhint.cxx
index ca831a6f45bc..539d28b899e1 100644
--- a/sfx2/source/notify/openurlhint.cxx
+++ b/sfx2/source/notify/openurlhint.cxx
@@ -18,9 +18,10 @@
  */
 
 #include <openurlhint.hxx>
+#include <utility>
 
-SfxOpenUrlHint::SfxOpenUrlHint( const OUString& sDocumentURL ) :
-    msDocumentURL(sDocumentURL) { }
+SfxOpenUrlHint::SfxOpenUrlHint( OUString sDocumentURL ) :
+    msDocumentURL(std::move(sDocumentURL)) { }
 
 const OUString& SfxOpenUrlHint::GetDocumentURL() const
 {
diff --git a/sfx2/source/sidebar/AsynchronousCall.cxx 
b/sfx2/source/sidebar/AsynchronousCall.cxx
index 5a3ce8db240d..fdb76d63d1ef 100644
--- a/sfx2/source/sidebar/AsynchronousCall.cxx
+++ b/sfx2/source/sidebar/AsynchronousCall.cxx
@@ -18,12 +18,13 @@
  */
 
 #include <sfx2/sidebar/AsynchronousCall.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 
 namespace sfx2::sidebar {
 
-AsynchronousCall::AsynchronousCall (const Action& rAction)
-    : maAction(rAction),
+AsynchronousCall::AsynchronousCall (Action aAction)
+    : maAction(std::move(aAction)),
       mnCallId(nullptr)
 {
 }
diff --git a/sfx2/source/sidebar/Context.cxx b/sfx2/source/sidebar/Context.cxx
index 2065fbd0473b..5666c4cb574e 100644
--- a/sfx2/source/sidebar/Context.cxx
+++ b/sfx2/source/sidebar/Context.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #include <sfx2/sidebar/Context.hxx>
+#include <utility>
 
 
 constexpr OUStringLiteral AnyApplicationName = u"any";
@@ -36,10 +37,10 @@ Context::Context()
 }
 
 Context::Context (
-    const OUString& rsApplication,
-    const OUString& rsContext)
-    : msApplication(rsApplication),
-      msContext(rsContext)
+    OUString sApplication,
+    OUString sContext)
+    : msApplication(std::move(sApplication)),
+      msContext(std::move(sContext))
 {
 }
 
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx 
b/sfx2/source/sidebar/DeckLayouter.cxx
index c24c93a511f9..5473aa95f001 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -36,6 +36,7 @@
 #include <com/sun/star/frame/XFrame.hpp>
 #include <com/sun/star/ui/XSidebarPanel.hpp>
 
+#include <utility>
 #include <vcl/jsdialog/executor.hxx>
 
 using namespace css;
@@ -61,8 +62,8 @@ namespace {
         sal_Int32 mnWeight;
         bool mbShowTitleBar;
 
-        LayoutItem(const std::shared_ptr<Panel>& pPanel)
-            : mpPanel(pPanel)
+        LayoutItem(std::shared_ptr<Panel> pPanel)
+            : mpPanel(std::move(pPanel))
             , maLayoutSize(0, 0, 0)
             , mnDistributedHeight(0)
             , mnWeight(0)
diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx 
b/sfx2/source/sidebar/DeckTitleBar.cxx
index 2a9bbb287261..44b9387dc14d 100644
--- a/sfx2/source/sidebar/DeckTitleBar.cxx
+++ b/sfx2/source/sidebar/DeckTitleBar.cxx
@@ -20,6 +20,7 @@
 #include <sidebar/DeckTitleBar.hxx>
 #include <sfx2/sidebar/Theme.hxx>
 
+#include <utility>
 #include <vcl/bitmapex.hxx>
 #include <vcl/customweld.hxx>
 #include <vcl/outdev.hxx>
@@ -60,12 +61,12 @@ public:
 
 DeckTitleBar::DeckTitleBar (const OUString& rsTitle,
                             weld::Builder& rBuilder,
-                            const std::function<void()>& rCloserAction)
+                            std::function<void()> aCloserAction)
     : TitleBar(rBuilder, Theme::Color_DeckTitleBarBackground)
     , mxGripWidget(new GripWidget)
     , mxGripWeld(new weld::CustomWeld(rBuilder, "grip", *mxGripWidget))
     , mxLabel(rBuilder.weld_label("label"))
-    , maCloserAction(rCloserAction)
+    , maCloserAction(std::move(aCloserAction))
     , mbIsCloserVisible(false)
 {
     mxLabel->set_label(rsTitle);
diff --git a/sfx2/source/sidebar/FocusManager.cxx 
b/sfx2/source/sidebar/FocusManager.cxx
index 0b8755810c42..d0c38461b9ae 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -24,6 +24,7 @@
 #include <sidebar/DeckTitleBar.hxx>
 #include <sidebar/PanelTitleBar.hxx>
 #include <sidebar/TitleBar.hxx>
+#include <utility>
 #include <vcl/event.hxx>
 #include <vcl/weld.hxx>
 
@@ -35,9 +36,9 @@ FocusManager::FocusLocation::FocusLocation (const 
PanelComponent eComponent, con
 {
 }
 
-FocusManager::FocusManager(const std::function<void(const Panel&)>& 
rShowPanelFunctor)
+FocusManager::FocusManager(std::function<void(const Panel&)> aShowPanelFunctor)
     : mpDeckTitleBar(nullptr),
-      maShowPanelFunctor(rShowPanelFunctor)
+      maShowPanelFunctor(std::move(aShowPanelFunctor))
 {
 }
 
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index 3f85c8ae522a..5998cb2ee94c 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -36,6 +36,7 @@
 #include <com/sun/star/ui/XSidebarPanel.hpp>
 #include <com/sun/star/ui/XUIElement.hpp>
 
+#include <utility>
 #include <vcl/weldutils.hxx>
 
 using namespace css;
@@ -47,7 +48,7 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor,
              weld::Widget* pParentWindow,
              const bool bIsInitiallyExpanded,
              Deck* pDeck,
-             const std::function<Context()>& rContextAccess,
+             std::function<Context()> aContextAccess,
              const css::uno::Reference<css::frame::XFrame>& rxFrame)
     : mxBuilder(Application::CreateBuilder(pParentWindow, "sfx/ui/panel.ui", 
false, reinterpret_cast<sal_uInt64>(SfxViewShell::Current())))
     , msPanelId(rPanelDescriptor.msId)
@@ -56,7 +57,7 @@ Panel::Panel(const PanelDescriptor& rPanelDescriptor,
     , mbWantsAWT(rPanelDescriptor.mbWantsAWT)
     , mbIsExpanded(bIsInitiallyExpanded)
     , mbLurking(false)
-    , maContextAccess(rContextAccess)
+    , maContextAccess(std::move(aContextAccess))
     , mxFrame(rxFrame)
     , mpParentWindow(pParentWindow)
     , mxDeck(pDeck)
diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx 
b/sfx2/source/sidebar/SidebarPanelBase.cxx
index 5f72192f13f6..a662dffa5174 100644
--- a/sfx2/source/sidebar/SidebarPanelBase.cxx
+++ b/sfx2/source/sidebar/SidebarPanelBase.cxx
@@ -21,6 +21,7 @@
 #include <sfx2/sidebar/IContextChangeReceiver.hxx>
 #include <sfx2/sidebar/PanelLayout.hxx>
 #include <sfx2/sidebar/SidebarModelUpdate.hxx>
+#include <utility>
 #include <vcl/EnumContext.hxx>
 #include <vcl/svapp.hxx>
 #include <comphelper/processfactory.hxx>
@@ -49,13 +50,13 @@ Reference<ui::XUIElement> SidebarPanelBase::Create (
 }
 
 SidebarPanelBase::SidebarPanelBase (
-    const OUString& rsResourceURL,
-    const css::uno::Reference<css::frame::XFrame>& rxFrame,
+    OUString sResourceURL,
+    css::uno::Reference<css::frame::XFrame> xFrame,
     std::unique_ptr<PanelLayout> xControl,
     const css::ui::LayoutSize& rLayoutSize)
-    : mxFrame(rxFrame),
+    : mxFrame(std::move(xFrame)),
       mxControl(std::move(xControl)),
-      msResourceURL(rsResourceURL),
+      msResourceURL(std::move(sResourceURL)),
       maLayoutSize(rLayoutSize)
 {
     if (mxFrame.is())
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 59649ec152d3..218a6de74ade 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -27,6 +27,7 @@
 #include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
 #include <o3tl/safeint.hxx>
+#include <utility>
 #include <vcl/commandevent.hxx>
 #include <vcl/commandinfoprovider.hxx>
 #include <vcl/event.hxx>
@@ -43,8 +44,8 @@ namespace sfx2::sidebar {
 
 TabBar::TabBar(vcl::Window* pParentWindow,
                const Reference<frame::XFrame>& rxFrame,
-               const std::function<void (const OUString&)>& 
rDeckActivationFunctor,
-               const PopupMenuProvider& rPopupMenuProvider,
+               std::function<void (const OUString&)> aDeckActivationFunctor,
+               PopupMenuProvider  aPopupMenuProvider,
                SidebarController* rParentSidebarController
               )
     : InterimItemWindow(pParentWindow, "sfx/ui/tabbar.ui", "TabBar")
@@ -56,8 +57,8 @@ TabBar::TabBar(vcl::Window* pParentWindow,
     , mxMainMenu(mxAuxBuilder->weld_menu("mainmenu"))
     , mxSubMenu(mxAuxBuilder->weld_menu("submenu"))
     , mxMeasureBox(mxAuxBuilder->weld_widget("measure"))
-    , maDeckActivationFunctor(rDeckActivationFunctor)
-    , maPopupMenuProvider(rPopupMenuProvider)
+    , maDeckActivationFunctor(std::move(aDeckActivationFunctor))
+    , maPopupMenuProvider(std::move(aPopupMenuProvider))
     , pParentSidebarController(rParentSidebarController)
 {
     InitControlBase(mxMenuButton.get());
diff --git a/sfx2/source/sidebar/UnoDeck.cxx b/sfx2/source/sidebar/UnoDeck.cxx
index deb4552b4cdf..a7c9ff00d8fd 100644
--- a/sfx2/source/sidebar/UnoDeck.cxx
+++ b/sfx2/source/sidebar/UnoDeck.cxx
@@ -18,14 +18,15 @@
 #include <sfx2/sidebar/Deck.hxx>
 #include <sidebar/DeckDescriptor.hxx>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 
 using namespace css;
 using namespace ::sfx2::sidebar;
 
-SfxUnoDeck::SfxUnoDeck(const uno::Reference<frame::XFrame>& rFrame, const 
OUString& deckId):
-xFrame(rFrame),
-mDeckId(deckId)
+SfxUnoDeck::SfxUnoDeck(uno::Reference<frame::XFrame> _xFrame, OUString deckId):
+xFrame(std::move(_xFrame)),
+mDeckId(std::move(deckId))
 {
 
 }
diff --git a/sfx2/source/sidebar/UnoDecks.cxx b/sfx2/source/sidebar/UnoDecks.cxx
index 2d07ea1a7a5b..6ae5e6948582 100644
--- a/sfx2/source/sidebar/UnoDecks.cxx
+++ b/sfx2/source/sidebar/UnoDecks.cxx
@@ -17,6 +17,7 @@
 #include <sfx2/sidebar/ResourceManager.hxx>
 #include <sfx2/sidebar/SidebarController.hxx>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 
 #include <algorithm>
@@ -24,8 +25,8 @@
 using namespace css;
 using namespace ::sfx2::sidebar;
 
-SfxUnoDecks::SfxUnoDecks(const uno::Reference<frame::XFrame>& rFrame):
-xFrame(rFrame)
+SfxUnoDecks::SfxUnoDecks(uno::Reference<frame::XFrame> _xFrame):
+xFrame(std::move(_xFrame))
 {
 }
 
diff --git a/sfx2/source/sidebar/UnoPanel.cxx b/sfx2/source/sidebar/UnoPanel.cxx
index 4af0b0b89264..275672f04e73 100644
--- a/sfx2/source/sidebar/UnoPanel.cxx
+++ b/sfx2/source/sidebar/UnoPanel.cxx
@@ -19,15 +19,16 @@
 #include <sfx2/sidebar/Deck.hxx>
 #include <sidebar/DeckDescriptor.hxx>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 
 using namespace css;
 using namespace ::sfx2::sidebar;
 
-SfxUnoPanel::SfxUnoPanel(const uno::Reference<frame::XFrame>& rFrame, const 
OUString& panelId, const OUString& deckId):
-xFrame(rFrame),
-mPanelId(panelId),
-mDeckId(deckId)
+SfxUnoPanel::SfxUnoPanel(uno::Reference<frame::XFrame> _xFrame, OUString 
panelId, OUString deckId):
+xFrame(std::move(_xFrame)),
+mPanelId(std::move(panelId)),
+mDeckId(std::move(deckId))
 {
     SidebarController* pSidebarController = getSidebarController();
 
diff --git a/sfx2/source/sidebar/UnoPanels.cxx 
b/sfx2/source/sidebar/UnoPanels.cxx
index 4ef48eb5c587..de1823d00cc2 100644
--- a/sfx2/source/sidebar/UnoPanels.cxx
+++ b/sfx2/source/sidebar/UnoPanels.cxx
@@ -17,6 +17,7 @@
 #include <com/sun/star/ui/XPanel.hpp>
 #include <sidebar/UnoPanel.hxx>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 
 #include <algorithm>
@@ -24,8 +25,8 @@
 using namespace css;
 using namespace ::sfx2::sidebar;
 
-SfxUnoPanels::SfxUnoPanels(const uno::Reference<frame::XFrame>& rFrame, const 
OUString& deckId):
-xFrame(rFrame),
+SfxUnoPanels::SfxUnoPanels(uno::Reference<frame::XFrame> _xFrame, const 
OUString& deckId):
+xFrame(std::move(_xFrame)),
 mDeckId(deckId)
 {
 }
diff --git a/sfx2/source/sidebar/UnoSidebar.cxx 
b/sfx2/source/sidebar/UnoSidebar.cxx
index b39a8519b343..5142d8a4fc50 100644
--- a/sfx2/source/sidebar/UnoSidebar.cxx
+++ b/sfx2/source/sidebar/UnoSidebar.cxx
@@ -16,6 +16,7 @@
 
 #include <com/sun/star/frame/XDispatch.hpp>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 
 using namespace css;
@@ -23,8 +24,8 @@ using namespace ::sfx2::sidebar;
 
 using ::com::sun::star::uno::RuntimeException;
 
-SfxUnoSidebar::SfxUnoSidebar(const uno::Reference<frame::XFrame>& rFrame)
-    : xFrame(rFrame)
+SfxUnoSidebar::SfxUnoSidebar(uno::Reference<frame::XFrame> _xFrame)
+    : xFrame(std::move(_xFrame))
 {
 }
 
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx
index ee9ed9a4bd3e..0d5906a3e7ae 100644
--- a/sfx2/source/view/frame.cxx
+++ b/sfx2/source/view/frame.cxx
@@ -44,6 +44,7 @@
 #include <sfx2/viewsh.hxx>
 #include <sfx2/viewfrm.hxx>
 #include "impframe.hxx"
+#include <utility>
 #include <workwin.hxx>
 #include <sfx2/ipclient.hxx>
 #include <vector>
@@ -472,9 +473,9 @@ SfxUnoFrameItem::SfxUnoFrameItem()
 {
 }
 
-SfxUnoFrameItem::SfxUnoFrameItem( sal_uInt16 nWhichId, const 
css::uno::Reference< css::frame::XFrame >& i_rFrame )
+SfxUnoFrameItem::SfxUnoFrameItem( sal_uInt16 nWhichId, css::uno::Reference< 
css::frame::XFrame > i_xFrame )
     : SfxPoolItem( nWhichId )
-    , m_xFrame( i_rFrame )
+    , m_xFrame(std::move( i_xFrame ))
 {
 }
 
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 975dad2a6f2b..bdc85c81a8ee 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -26,6 +26,7 @@
 #include <comphelper/propertyvalue.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <sal/log.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <svtools/prnsetup.hxx>
@@ -79,8 +80,8 @@ class SfxPrinterController : public vcl::PrinterController, 
public SfxListener
 
 public:
     SfxPrinterController( const VclPtr<Printer>& i_rPrinter,
-                          const Any& i_rComplete,
-                          const Any& i_rSelection,
+                          Any i_Complete,
+                          Any i_Selection,
                           const Any& i_rViewProp,
                           const Reference< view::XRenderable >& i_xRender,
                           bool i_bApi, bool i_bDirect,
@@ -98,8 +99,8 @@ public:
 };
 
 SfxPrinterController::SfxPrinterController( const VclPtr<Printer>& i_rPrinter,
-                                            const Any& i_rComplete,
-                                            const Any& i_rSelection,
+                                            Any i_Complete,
+                                            Any i_Selection,
                                             const Any& i_rViewProp,
                                             const Reference< view::XRenderable 
>& i_xRender,
                                             bool i_bApi, bool i_bDirect,
@@ -107,8 +108,8 @@ SfxPrinterController::SfxPrinterController( const 
VclPtr<Printer>& i_rPrinter,
                                             const uno::Sequence< 
beans::PropertyValue >& rProps
                                           )
     : PrinterController(i_rPrinter, pView ? pView->GetFrameWeld() : nullptr)
-    , maCompleteSelection( i_rComplete )
-    , maSelection( i_rSelection )
+    , maCompleteSelection(std::move( i_Complete ))
+    , maSelection(std::move( i_Selection ))
     , mxRenderable( i_xRender )
     , mpLastPrinter( nullptr )
     , mpViewShell( pView )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 8bbdfa61f412..c14b31ce9862 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -23,6 +23,7 @@
 #include <svl/stritem.hxx>
 #include <svl/eitem.hxx>
 #include <svl/whiter.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/weld.hxx>
@@ -104,7 +105,7 @@ class SfxClipboardChangeListener : public 
::cppu::WeakImplHelper<
     datatransfer::clipboard::XClipboardListener >
 {
 public:
-    SfxClipboardChangeListener( SfxViewShell* pView, const uno::Reference< 
datatransfer::clipboard::XClipboardNotifier >& xClpbrdNtfr );
+    SfxClipboardChangeListener( SfxViewShell* pView, uno::Reference< 
datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr );
 
     // XEventListener
     virtual void SAL_CALL disposing( const lang::EventObject& rEventObject ) 
override;
@@ -138,8 +139,8 @@ private:
     DECL_STATIC_LINK( SfxClipboardChangeListener, AsyncExecuteHdl_Impl, void*, 
void );
 };
 
-SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView, 
const uno::Reference< datatransfer::clipboard::XClipboardNotifier >& 
xClpbrdNtfr )
-  : m_pViewShell( nullptr ), m_xClpbrdNtfr( xClpbrdNtfr ), 
m_xCtrl(pView->GetController())
+SfxClipboardChangeListener::SfxClipboardChangeListener( SfxViewShell* pView, 
uno::Reference< datatransfer::clipboard::XClipboardNotifier > xClpbrdNtfr )
+  : m_pViewShell( nullptr ), m_xClpbrdNtfr(std::move( xClpbrdNtfr )), 
m_xCtrl(pView->GetController())
 {
     if ( m_xCtrl.is() )
     {

Reply via email to