cui/source/customize/cfg.cxx              |   25 ++++++++++++------------
 cui/source/customize/macropg.cxx          |    5 ++--
 cui/source/customize/macropg_impl.hxx     |    2 -
 cui/source/dialogs/FontFeaturesDialog.cxx |    5 ++--
 cui/source/dialogs/SpellAttrib.hxx        |   13 ++++++------
 cui/source/dialogs/cuicharmap.cxx         |    5 ++--
 cui/source/dialogs/cuigaldlg.cxx          |    9 ++++----
 cui/source/dialogs/hldocntp.cxx           |    3 +-
 cui/source/dialogs/hyphen.cxx             |    5 ++--
 cui/source/dialogs/insdlg.cxx             |    5 ++--
 cui/source/dialogs/scriptdlg.cxx          |    4 +--
 cui/source/inc/FontFeaturesDialog.hxx     |    2 -
 cui/source/inc/autocdlg.hxx               |    7 +++---
 cui/source/inc/cfg.hxx                    |   12 +++++------
 cui/source/inc/cuigaldlg.hxx              |    4 +--
 cui/source/inc/dbregister.hxx             |    2 -
 cui/source/inc/hyphen.hxx                 |    2 -
 cui/source/inc/iconcdlg.hxx               |    5 ++--
 cui/source/inc/insdlg.hxx                 |    2 -
 cui/source/inc/scriptdlg.hxx              |    2 -
 cui/source/inc/treeopt.hxx                |   31 +++++++++++++++---------------
 cui/source/options/cfgchart.cxx           |    5 ++--
 cui/source/options/cfgchart.hxx           |    2 -
 cui/source/options/connpoolsettings.cxx   |   10 +++++----
 cui/source/options/connpoolsettings.hxx   |    4 +--
 cui/source/options/dbregister.cxx         |    5 ++--
 cui/source/options/dbregistersettings.hxx |    5 ++--
 cui/source/options/optaboutconfig.cxx     |   13 ++++++------
 cui/source/options/optlingu.cxx           |    5 ++--
 cui/source/options/treeopt.cxx            |    9 ++++----
 cui/source/tabpages/autocdlg.cxx          |    9 ++++----
 include/cui/cuicharmap.hxx                |    2 -
 32 files changed, 120 insertions(+), 99 deletions(-)

New commits:
commit 613467237fa2e9fe7c816d00127db9951c869c13
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jun 3 11:46:44 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Jun 3 15:04:41 2022 +0200

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

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 546d66522140..4c8192b61283 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -24,6 +24,7 @@
 #include <stdlib.h>
 #include <typeinfo>
 
+#include <utility>
 #include <vcl/stdtext.hxx>
 #include <vcl/commandinfoprovider.hxx>
 #include <vcl/event.hxx>
@@ -272,16 +273,16 @@ void SvxConfigDialog::PageCreated(const OString &rId, 
SfxTabPage& rPage)
 uno::Reference< css::ui::XImageManager>* SaveInData::xDefaultImgMgr = nullptr;
 
 SaveInData::SaveInData(
-    const uno::Reference< css::ui::XUIConfigurationManager >& xCfgMgr,
-    const uno::Reference< css::ui::XUIConfigurationManager >& xParentCfgMgr,
+    uno::Reference< css::ui::XUIConfigurationManager > xCfgMgr,
+    uno::Reference< css::ui::XUIConfigurationManager > xParentCfgMgr,
     const OUString& aModuleId,
     bool isDocConfig )
         :
             bModified( false ),
             bDocConfig( isDocConfig ),
             bReadOnly( false ),
-            m_xCfgMgr( xCfgMgr ),
-            m_xParentCfgMgr( xParentCfgMgr ),
+            m_xCfgMgr(std::move( xCfgMgr )),
+            m_xParentCfgMgr(std::move( xParentCfgMgr )),
             m_aSeparatorSeq{ 
comphelper::makePropertyValue(ITEM_DESCRIPTOR_TYPE,
                                                            
css::ui::ItemType::SEPARATOR_LINE) }
 {
@@ -1888,11 +1889,11 @@ SvxConfigEntry* 
SvxMainMenuOrganizerDialog::GetSelectedEntry()
     return weld::fromId<SvxConfigEntry*>(m_xMenuListBox->get_id(nSelected));
 }
 
-SvxConfigEntry::SvxConfigEntry( const OUString& rDisplayName,
-                                const OUString& rCommandURL, bool bPopup, bool 
bParentData )
+SvxConfigEntry::SvxConfigEntry( OUString aDisplayName,
+                                OUString aCommandURL, bool bPopup, bool 
bParentData )
     : nId( 1 )
-    , aLabel(rDisplayName)
-    , aCommand(rCommandURL)
+    , aLabel(std::move(aDisplayName))
+    , aCommand(std::move(aCommandURL))
     , bPopUp(bPopup)
     , bStrEdited( false )
     , bIsUserDefined( false )
@@ -2680,11 +2681,11 @@ SvxNewToolbarDialog::~SvxNewToolbarDialog()
 *
 
*******************************************************************************/
 SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow,
-    const uno::Reference< css::ui::XImageManager >& rXImageManager,
-    const uno::Reference< css::ui::XImageManager >& rXParentImageManager)
+    uno::Reference< css::ui::XImageManager > xImageManager,
+    uno::Reference< css::ui::XImageManager > xParentImageManager)
     : GenericDialogController(pWindow, "cui/ui/iconselectordialog.ui", 
"IconSelector")
-    , m_xImageManager(rXImageManager)
-    , m_xParentImageManager(rXParentImageManager)
+    , m_xImageManager(std::move(xImageManager))
+    , m_xParentImageManager(std::move(xParentImageManager))
     , m_xTbSymbol(new ValueSet(m_xBuilder->weld_scrolled_window("symbolswin", 
true)))
     , m_xTbSymbolWin(new weld::CustomWeld(*m_xBuilder, "symbolsToolbar", 
*m_xTbSymbol))
     , m_xFtNote(m_xBuilder->weld_label("noteLabel"))
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index ed9e4f6c0c4d..7e3ff8bc3128 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -33,6 +33,7 @@
 #include <strings.hrc>
 #include <comphelper/namedvaluecollection.hxx>
 #include <o3tl/string_view.hxx>
+#include <utility>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -625,9 +626,9 @@ IMPL_LINK_NOARG(AssignComponentDialog, ButtonHandler, 
weld::Button&, void)
     m_xDialog->response(RET_OK);
 }
 
-AssignComponentDialog::AssignComponentDialog(weld::Window* pParent, const 
OUString& rURL)
+AssignComponentDialog::AssignComponentDialog(weld::Window* pParent, OUString 
aURL)
     : GenericDialogController(pParent, "cui/ui/assigncomponentdialog.ui", 
"AssignComponent")
-    , maURL( rURL )
+    , maURL(std::move( aURL ))
     , mxMethodEdit(m_xBuilder->weld_entry("methodEntry"))
     , mxOKButton(m_xBuilder->weld_button("ok"))
 {
diff --git a/cui/source/customize/macropg_impl.hxx 
b/cui/source/customize/macropg_impl.hxx
index 2a36d0f5cada..63d2f2ae28e6 100644
--- a/cui/source/customize/macropg_impl.hxx
+++ b/cui/source/customize/macropg_impl.hxx
@@ -46,7 +46,7 @@ private:
     DECL_LINK(ButtonHandler, weld::Button&, void);
 
 public:
-    AssignComponentDialog(weld::Window* pParent, const OUString& rURL);
+    AssignComponentDialog(weld::Window* pParent, OUString aURL);
     virtual ~AssignComponentDialog() override;
 
     const OUString& getURL() const { return maURL; }
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx 
b/cui/source/dialogs/FontFeaturesDialog.cxx
index c1be0f7fb3df..a129191b3721 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -10,6 +10,7 @@
 
 #include <FontFeaturesDialog.hxx>
 #include <rtl/ustrbuf.hxx>
+#include <utility>
 #include <vcl/font/FeatureParser.hxx>
 #include <FontFeatures.hxx>
 #include <unordered_set>
@@ -18,9 +19,9 @@ using namespace css;
 
 namespace cui
 {
-FontFeaturesDialog::FontFeaturesDialog(weld::Window* pParent, OUString const& 
rFontName)
+FontFeaturesDialog::FontFeaturesDialog(weld::Window* pParent, OUString 
aFontName)
     : GenericDialogController(pParent, "cui/ui/fontfeaturesdialog.ui", 
"FontFeaturesDialog")
-    , m_sFontName(rFontName)
+    , m_sFontName(std::move(aFontName))
     , m_xContentWindow(m_xBuilder->weld_scrolled_window("contentWindow"))
     , m_xContentGrid(m_xBuilder->weld_container("contentGrid"))
     , m_xPreviewWindow(new weld::CustomWeld(*m_xBuilder, "preview", 
m_aPreviewWindow))
diff --git a/cui/source/dialogs/SpellAttrib.hxx 
b/cui/source/dialogs/SpellAttrib.hxx
index d732aad69ba1..cdc0cf26661e 100644
--- a/cui/source/dialogs/SpellAttrib.hxx
+++ b/cui/source/dialogs/SpellAttrib.hxx
@@ -22,6 +22,7 @@
 #include <com/sun/star/uno/Sequence.h>
 #include <com/sun/star/lang/Locale.hpp>
 #include <com/sun/star/linguistic2/XProofreader.hpp>
+#include <utility>
 
 namespace svx{
 struct SpellErrorDescription
@@ -37,21 +38,21 @@ struct SpellErrorDescription
     OUString                                     sRuleId;
 
     SpellErrorDescription( bool bGrammar,
-                      const OUString& rText,
-                      const css::lang::Locale& rLocale,
+                      OUString aText,
+                      css::lang::Locale _aLocale,
                       const css::uno::Sequence< OUString >& rSuggestions,
-                      css::uno::Reference< css::linguistic2::XProofreader > 
const & rxGrammarChecker,
+                      css::uno::Reference< css::linguistic2::XProofreader > 
_xGrammarChecker,
                       const OUString* pDialogTitle = nullptr,
                       const OUString* pExplanation = nullptr,
                       const OUString* pRuleId = nullptr,
                       const OUString* pExplanationURL = nullptr ) :
         bIsGrammarError( bGrammar ),
-        sErrorText( rText ),
+        sErrorText(std::move( aText )),
         sDialogTitle( ),
         sExplanation( ),
         sExplanationURL( ),
-        aLocale( rLocale ),
-        xGrammarChecker( rxGrammarChecker ),
+        aLocale(std::move( _aLocale )),
+        xGrammarChecker(std::move( _xGrammarChecker )),
         aSuggestions( rSuggestions )
     {
         if( pDialogTitle )
diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 42c12c5e3ce9..7effeb4462cf 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -21,6 +21,7 @@
 
 #include <stdio.h>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <svl/eitem.hxx>
 #include <svl/intitem.hxx>
@@ -52,11 +53,11 @@
 using namespace css;
 
 SvxCharacterMap::SvxCharacterMap(weld::Widget* pParent, const SfxItemSet* pSet,
-                                 const 
css::uno::Reference<css::frame::XFrame>& rFrame)
+                                 css::uno::Reference<css::frame::XFrame> 
xFrame)
     : SfxDialogController(pParent, "cui/ui/specialcharacters.ui", 
"SpecialCharactersDialog")
     , m_xVirDev(VclPtr<VirtualDevice>::Create())
     , isSearchMode(true)
-    , m_xFrame(rFrame)
+    , m_xFrame(std::move(xFrame))
     , m_aRecentCharView{SvxCharView(m_xVirDev),
                         SvxCharView(m_xVirDev),
                         SvxCharView(m_xVirDev),
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 08c34ccc0884..e432b4fce85b 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -24,6 +24,7 @@
 #include <algorithm>
 #include <cassert>
 
+#include <utility>
 #include <vcl/errinf.hxx>
 #include <ucbhelper/content.hxx>
 #include <vcl/svapp.hxx>
@@ -65,11 +66,11 @@ using namespace ::com::sun::star::uno;
 
 SearchThread::SearchThread(SearchProgress* pProgress,
                            TPGalleryThemeProperties* pBrowser,
-                           const INetURLObject& rStartURL)
+                           INetURLObject aStartURL)
     : Thread("cuiSearchThread")
     , mpProgress(pProgress)
     , mpBrowser(pBrowser)
-    , maStartURL(rStartURL)
+    , maStartURL(std::move(aStartURL))
 {
 }
 
@@ -188,9 +189,9 @@ void SearchThread::ImplSearch( const INetURLObject& 
rStartURL,
     }
 }
 
-SearchProgress::SearchProgress(weld::Window* pParent, 
TPGalleryThemeProperties* pTabPage, const INetURLObject& rStartURL)
+SearchProgress::SearchProgress(weld::Window* pParent, 
TPGalleryThemeProperties* pTabPage, INetURLObject aStartURL)
     : GenericDialogController(pParent, "cui/ui/gallerysearchprogress.ui", 
"GallerySearchProgress")
-    , startUrl_(rStartURL)
+    , startUrl_(std::move(aStartURL))
     , m_pTabPage(pTabPage)
     , m_xFtSearchDir(m_xBuilder->weld_label("dir"))
     , m_xFtSearchType(m_xBuilder->weld_label("file"))
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 882d15b0cdf0..1c3b850b4033 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/awt/XTopWindow.hpp>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/uno/Exception.hpp>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <tools/urlobj.hxx>
@@ -60,7 +61,7 @@ struct DocumentTypeData
 {
     OUString aStrURL;
     OUString aStrExt;
-    DocumentTypeData (const OUString& aURL, const OUString& aExt) : 
aStrURL(aURL), aStrExt(aExt)
+    DocumentTypeData (OUString aURL, OUString aExt) : 
aStrURL(std::move(aURL)), aStrExt(std::move(aExt))
     {}
 };
 
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index 7d7274612c3c..cc6666d7de8c 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -27,6 +27,7 @@
 #include <sal/log.hxx>
 #include <i18nlangtag/languagetag.hxx>
 #include <tools/debug.hxx>
+#include <utility>
 
 #define HYPH_POS_CHAR       '='
 
@@ -402,13 +403,13 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, GetFocusHdl_Impl, 
weld::Widget&, void)
 // class SvxHyphenWordDialog ---------------------------------------------
 
 SvxHyphenWordDialog::SvxHyphenWordDialog(
-    const OUString &rWord, LanguageType nLang,
+    OUString aWord, LanguageType nLang,
     weld::Widget* pParent,
     uno::Reference< linguistic2::XHyphenator > const &xHyphen,
     SvxSpellWrapper* pWrapper)
     : SfxDialogController(pParent, "cui/ui/hyphenate.ui", "HyphenateDialog")
     , m_pHyphWrapper(pWrapper)
-    , m_aActWord(rWord)
+    , m_aActWord(std::move(aWord))
     , m_nActLanguage(nLang)
     , m_nMaxHyphenationPos(0)
     , m_nOldPos(0)
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index c576118764e6..3806c4dc2aff 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -42,6 +42,7 @@
 #include <tools/debug.hxx>
 #include <tools/stream.hxx>
 #include <tools/diagnose_ex.h>
+#include <utility>
 #include <vcl/image.hxx>
 #include <vcl/weld.hxx>
 #include <vcl/svapp.hxx>
@@ -72,9 +73,9 @@ uno::Reference< io::XInputStream > 
InsertObjectDialog_Impl::GetIconIfIconified(
 
 InsertObjectDialog_Impl::InsertObjectDialog_Impl(weld::Window* pParent,
     const OUString& rUIXMLDescription, const OString& rID,
-    const css::uno::Reference < css::embed::XStorage >& xStorage)
+    css::uno::Reference < css::embed::XStorage > xStorage)
     : GenericDialogController(pParent, rUIXMLDescription, rID)
-    , m_xStorage( xStorage )
+    , m_xStorage(std::move( xStorage ))
     , aCnt( m_xStorage )
 {
 }
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index eacae26399aa..8e787e8d1f91 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -371,10 +371,10 @@ CuiInputDialog::CuiInputDialog(weld::Window * pParent, 
InputDialogMode nMode)
 
 // ScriptOrgDialog ------------------------------------------------------------
 
-SvxScriptOrgDialog::SvxScriptOrgDialog(weld::Window* pParent, const OUString& 
language)
+SvxScriptOrgDialog::SvxScriptOrgDialog(weld::Window* pParent, OUString 
language)
     : SfxDialogController(pParent, "cui/ui/scriptorganizer.ui", 
"ScriptOrganizerDialog")
     , m_pParent(pParent)
-    , m_sLanguage(language)
+    , m_sLanguage(std::move(language))
     , m_delErrStr(CuiResId(RID_CUISTR_DELFAILED))
     , m_delErrTitleStr(CuiResId(RID_CUISTR_DELFAILED_TITLE))
     , m_delQueryStr(CuiResId(RID_CUISTR_DELQUERY))
diff --git a/cui/source/inc/FontFeaturesDialog.hxx 
b/cui/source/inc/FontFeaturesDialog.hxx
index aee4da9f3c72..f542566ae2f5 100644
--- a/cui/source/inc/FontFeaturesDialog.hxx
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -62,7 +62,7 @@ private:
     DECL_LINK(CheckBoxToggledHdl, weld::Toggleable&, void);
 
 public:
-    FontFeaturesDialog(weld::Window* pParent, OUString const& rFontName);
+    FontFeaturesDialog(weld::Window* pParent, OUString aFontName);
     ~FontFeaturesDialog() override;
     virtual short run() override;
 
diff --git a/cui/source/inc/autocdlg.hxx b/cui/source/inc/autocdlg.hxx
index ca7d778830ea..a1a6146fa1bb 100644
--- a/cui/source/inc/autocdlg.hxx
+++ b/cui/source/inc/autocdlg.hxx
@@ -23,6 +23,7 @@
 
 #include <map>
 #include <set>
+#include <utility>
 
 class CharClass;
 class CollatorWrapper;
@@ -135,9 +136,9 @@ struct DoubleString
     OUString  sShort;
     OUString  sLong;
     void*   pUserData; ///< CheckBox -> form. Text Bool -> selection text
-    DoubleString(const OUString& rShort, const OUString& rLong)
-        : sShort(rShort)
-        , sLong(rLong)
+    DoubleString(OUString aShort, OUString aLong)
+        : sShort(std::move(aShort))
+        , sLong(std::move(aLong))
         , pUserData(nullptr)
     {
     }
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index a382a9c103bf..12dbae01751e 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -113,8 +113,8 @@ protected:
 public:
 
     SaveInData(
-        const css::uno::Reference < css::ui::XUIConfigurationManager >& 
xCfgMgr,
-        const css::uno::Reference < css::ui::XUIConfigurationManager >& 
xParentCfgMgr,
+        css::uno::Reference < css::ui::XUIConfigurationManager > xCfgMgr,
+        css::uno::Reference < css::ui::XUIConfigurationManager > xParentCfgMgr,
         const OUString& aModuleId,
         bool docConfig );
 
@@ -253,8 +253,8 @@ private:
 
 public:
 
-    SvxConfigEntry( const OUString& rDisplayName,
-                    const OUString& rCommandURL,
+    SvxConfigEntry( OUString aDisplayName,
+                    OUString aCommandURL,
                     bool bPopup,
                     bool bParentData );
 
@@ -647,8 +647,8 @@ public:
 
     SvxIconSelectorDialog(
         weld::Window *pWindow,
-        const css::uno::Reference< css::ui::XImageManager >& rXImageManager,
-        const css::uno::Reference< css::ui::XImageManager >& 
rXParentImageManager);
+        css::uno::Reference< css::ui::XImageManager > xImageManager,
+        css::uno::Reference< css::ui::XImageManager > xParentImageManager);
 
     virtual ~SvxIconSelectorDialog() override;
 
diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx
index b3e02da89d38..8e88b84a64e8 100644
--- a/cui/source/inc/cuigaldlg.hxx
+++ b/cui/source/inc/cuigaldlg.hxx
@@ -65,7 +65,7 @@ public:
 
                                 SearchThread(SearchProgress* pProgress,
                                              TPGalleryThemeProperties* 
pBrowser,
-                                             const INetURLObject& rStartURL);
+                                             INetURLObject aStartURL);
 };
 
 class SearchProgress : public weld::GenericDialogController
@@ -81,7 +81,7 @@ private:
     DECL_LINK(ClickCancelBtn, weld::Button&, void);
 
 public:
-    SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, 
const INetURLObject& rStartURL);
+    SearchProgress(weld::Window* pParent, TPGalleryThemeProperties* pTabPage, 
INetURLObject aStartURL);
     void LaunchThread();
     virtual ~SearchProgress() override;
 
diff --git a/cui/source/inc/dbregister.hxx b/cui/source/inc/dbregister.hxx
index b9455507c3a4..56c63b4c4307 100644
--- a/cui/source/inc/dbregister.hxx
+++ b/cui/source/inc/dbregister.hxx
@@ -89,7 +89,7 @@ namespace svx
         SfxItemSet  m_aRegistrationItems;
 
     protected:
-        RegistrationItemSetHolder( const SfxItemSet& _rMasterSet );
+        RegistrationItemSetHolder( SfxItemSet _aMasterSet );
         ~RegistrationItemSetHolder();
 
     protected:
diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx
index cb8104c70315..0b304e9439f9 100644
--- a/cui/source/inc/hyphen.hxx
+++ b/cui/source/inc/hyphen.hxx
@@ -71,7 +71,7 @@ class SvxHyphenWordDialog : public SfxDialogController
     DECL_LINK(CursorChangeHdl_Impl, weld::Entry&, void);
 
 public:
-    SvxHyphenWordDialog(const OUString &rWord, LanguageType nLang,
+    SvxHyphenWordDialog(OUString aWord, LanguageType nLang,
                         weld::Widget* pParent,
                         css::uno::Reference<css::linguistic2::XHyphenator> 
const &xHyphen,
                         SvxSpellWrapper* pWrapper);
diff --git a/cui/source/inc/iconcdlg.hxx b/cui/source/inc/iconcdlg.hxx
index 5cf1ab54f6d7..1803a9a633e2 100644
--- a/cui/source/inc/iconcdlg.hxx
+++ b/cui/source/inc/iconcdlg.hxx
@@ -20,6 +20,7 @@
 
 #include <rtl/ustring.hxx>
 #include <sfx2/tabdlg.hxx>
+#include <utility>
 
 // forward-declarations
 struct IconChoicePageData;
@@ -39,8 +40,8 @@ struct IconChoicePageData
     bool bRefresh;          ///< Flag: page has to be newly initialized
 
     // constructor
-    IconChoicePageData(const OString& rId, std::unique_ptr<IconChoicePage> 
xInPage)
-        : sId(rId)
+    IconChoicePageData(OString aId, std::unique_ptr<IconChoicePage> xInPage)
+        : sId(std::move(aId))
         , xPage(std::move(xInPage))
         , bRefresh(false)
     {}
diff --git a/cui/source/inc/insdlg.hxx b/cui/source/inc/insdlg.hxx
index c76658470450..4938314a3cd3 100644
--- a/cui/source/inc/insdlg.hxx
+++ b/cui/source/inc/insdlg.hxx
@@ -37,7 +37,7 @@ protected:
 
     InsertObjectDialog_Impl(weld::Window * pParent,
         const OUString& rUIXMLDescription, const OString& rID,
-        const css::uno::Reference < css::embed::XStorage >& xStorage);
+        css::uno::Reference < css::embed::XStorage > xStorage);
 public:
     const css::uno::Reference<css::embed::XEmbeddedObject>& GetObject() const 
{ return m_xObj; }
     virtual css::uno::Reference<css::io::XInputStream> 
GetIconIfIconified(OUString* pGraphicMediaType);
diff --git a/cui/source/inc/scriptdlg.hxx b/cui/source/inc/scriptdlg.hxx
index f184f70a73cb..0644ea4425e4 100644
--- a/cui/source/inc/scriptdlg.hxx
+++ b/cui/source/inc/scriptdlg.hxx
@@ -143,7 +143,7 @@ protected:
 public:
     // prob need another arg in the ctor
     // to specify the language or provider
-    SvxScriptOrgDialog(weld::Window* pParent, const OUString& language);
+    SvxScriptOrgDialog(weld::Window* pParent, OUString language);
     virtual ~SvxScriptOrgDialog() override;
 
     virtual short run() override;
diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 541726b27a90..a4d90e6e912d 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -25,6 +25,7 @@
 
 #include <sfx2/basedlgs.hxx>
 #include <svtools/restartdialog.hxx>
+#include <utility>
 
 class SfxModule;
 class SfxShell;
@@ -36,8 +37,8 @@ struct OrderedEntry
     sal_Int32       m_nIndex;
     OUString   m_sId;
 
-    OrderedEntry( sal_Int32 nIndex, const OUString& rId ) :
-        m_nIndex( nIndex ), m_sId( rId ) {}
+    OrderedEntry( sal_Int32 nIndex, OUString aId ) :
+        m_nIndex( nIndex ), m_sId(std::move( aId )) {}
 };
 
 
@@ -61,15 +62,15 @@ struct OptionsLeaf
     OUString   m_sGroupId;
     sal_Int32       m_nGroupIndex;
 
-    OptionsLeaf(    const OUString& rLabel,
-                    const OUString& rPageURL,
-                    const OUString& rEventHdl,
-                    const OUString& rGroupId,
+    OptionsLeaf(    OUString aLabel,
+                    OUString aPageURL,
+                    OUString aEventHdl,
+                    OUString aGroupId,
                     sal_Int32 nGroupIndex ) :
-        m_sLabel( rLabel ),
-        m_sPageURL( rPageURL ),
-        m_sEventHdl( rEventHdl ),
-        m_sGroupId( rGroupId ),
+        m_sLabel(std::move( aLabel )),
+        m_sPageURL(std::move( aPageURL )),
+        m_sEventHdl(std::move( aEventHdl )),
+        m_sGroupId(std::move( aGroupId )),
         m_nGroupIndex( nGroupIndex ) {}
 };
 
@@ -84,11 +85,11 @@ struct OptionsNode
     std::vector< std::vector< std::unique_ptr<OptionsLeaf> > >
                             m_aGroupedLeaves;
 
-    OptionsNode(    const OUString& rId,
-                    const OUString& rLabel,
+    OptionsNode(    OUString aId,
+                    OUString aLabel,
                     bool bAllModules ) :
-        m_sId( rId ),
-        m_sLabel( rLabel ),
+        m_sId(std::move( aId )),
+        m_sLabel(std::move( aLabel )),
         m_bAllModules( bAllModules ) {}
 };
 
@@ -219,7 +220,7 @@ private:
 public:
     ExtensionsTabPage(
         weld::Container* pParent,
-        const OUString& rPageURL, const OUString& rEvtHdl,
+        OUString  rPageURL, OUString aEvtHdl,
         const css::uno::Reference<
             css::awt::XContainerWindowProvider >& rProvider );
 
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index ab12dfabd647..13ed520d0306 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -23,6 +23,7 @@
 #include "cfgchart.hxx"
 #include <dialmgr.hxx>
 #include <strings.hrc>
+#include <utility>
 
 #define ROW_COLOR_COUNT 12
 
@@ -258,9 +259,9 @@ void SvxChartOptions::Notify( const css::uno::Sequence< 
OUString >& )
 
 
 
-SvxChartColorTableItem::SvxChartColorTableItem( sal_uInt16 nWhich_, const 
SvxChartColorTable& aTable ) :
+SvxChartColorTableItem::SvxChartColorTableItem( sal_uInt16 nWhich_, 
SvxChartColorTable aTable ) :
     SfxPoolItem( nWhich_ ),
-    m_aColorTable( aTable )
+    m_aColorTable(std::move( aTable ))
 {
 }
 
diff --git a/cui/source/options/cfgchart.hxx b/cui/source/options/cfgchart.hxx
index acbe41a9b41e..8e49e190d00c 100644
--- a/cui/source/options/cfgchart.hxx
+++ b/cui/source/options/cfgchart.hxx
@@ -86,7 +86,7 @@ public:
 class SvxChartColorTableItem : public SfxPoolItem
 {
 public:
-    SvxChartColorTableItem( sal_uInt16 nWhich, const SvxChartColorTable& );
+    SvxChartColorTableItem( sal_uInt16 nWhich, SvxChartColorTable );
 
     virtual SvxChartColorTableItem* Clone( SfxItemPool *pPool = nullptr ) 
const override;
     virtual bool            operator==( const SfxPoolItem& ) const override;
diff --git a/cui/source/options/connpoolsettings.cxx 
b/cui/source/options/connpoolsettings.cxx
index 46742d826aa5..e92b26da555f 100644
--- a/cui/source/options/connpoolsettings.cxx
+++ b/cui/source/options/connpoolsettings.cxx
@@ -17,14 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <utility>
+
 #include "connpoolsettings.hxx"
 
 
 namespace offapp
 {
 
-    DriverPooling::DriverPooling( const OUString& _rName )
-        :sName(_rName)
+    DriverPooling::DriverPooling( OUString _aName )
+        :sName(std::move(_aName))
         ,bEnabled(false)
         ,nTimeoutSeconds(120)
     {
@@ -43,9 +45,9 @@ namespace offapp
     }
 
 
-    DriverPoolingSettingsItem::DriverPoolingSettingsItem( sal_uInt16 _nId, 
const DriverPoolingSettings &_rSettings )
+    DriverPoolingSettingsItem::DriverPoolingSettingsItem( sal_uInt16 _nId, 
DriverPoolingSettings _aSettings )
         :SfxPoolItem(_nId)
-        ,m_aSettings(_rSettings)
+        ,m_aSettings(std::move(_aSettings))
     {
     }
 
diff --git a/cui/source/options/connpoolsettings.hxx 
b/cui/source/options/connpoolsettings.hxx
index 8f8c6bc3b361..1e2404b88583 100644
--- a/cui/source/options/connpoolsettings.hxx
+++ b/cui/source/options/connpoolsettings.hxx
@@ -36,7 +36,7 @@ namespace offapp
         bool                bEnabled;
         sal_Int32           nTimeoutSeconds;
 
-        explicit DriverPooling( const OUString& _rName );
+        explicit DriverPooling( OUString  _aName );
 
         bool operator == (const DriverPooling& _rR) const;
         bool operator != (const DriverPooling& _rR) const { return !operator 
==(_rR); }
@@ -72,7 +72,7 @@ namespace offapp
 
     public:
 
-        DriverPoolingSettingsItem( sal_uInt16 _nId, const 
DriverPoolingSettings &_rSettings );
+        DriverPoolingSettingsItem( sal_uInt16 _nId, DriverPoolingSettings 
_aSettings );
 
         virtual bool             operator==( const SfxPoolItem& ) const 
override;
         virtual DriverPoolingSettingsItem* Clone( SfxItemPool *pPool = nullptr 
) const override;
diff --git a/cui/source/options/dbregister.cxx 
b/cui/source/options/dbregister.cxx
index 73f54d317e6f..143112c58724 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -29,6 +29,7 @@
 #include <tools/debug.hxx>
 #include <strings.hrc>
 #include <bitmaps.hlst>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <svl/itemset.hxx>
@@ -51,8 +52,8 @@ using namespace ::svt;
 
 // class RegistrationItemSetHolder  
-------------------------------------------------
 
-RegistrationItemSetHolder::RegistrationItemSetHolder( const SfxItemSet& 
_rMasterSet )
-    :m_aRegistrationItems( _rMasterSet )
+RegistrationItemSetHolder::RegistrationItemSetHolder( SfxItemSet _aMasterSet )
+    :m_aRegistrationItems(std::move( _aMasterSet ))
 {
     DbRegisteredNamesConfig::GetOptions( m_aRegistrationItems );
 }
diff --git a/cui/source/options/dbregistersettings.hxx 
b/cui/source/options/dbregistersettings.hxx
index 2f86392bc9cf..b1db16542f02 100644
--- a/cui/source/options/dbregistersettings.hxx
+++ b/cui/source/options/dbregistersettings.hxx
@@ -24,6 +24,7 @@
 #include <map>
 
 #include <svl/poolitem.hxx>
+#include <utility>
 
 
 namespace svx
@@ -41,8 +42,8 @@ namespace svx
         {
         }
 
-        DatabaseRegistration( const OUString& _rLocation, const bool 
_bReadOnly )
-            :sLocation( _rLocation )
+        DatabaseRegistration( OUString _aLocation, const bool _bReadOnly )
+            :sLocation(std::move( _aLocation ))
             ,bReadOnly( _bReadOnly )
         {
         }
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 3402818adf3f..c4dafaf5c199 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -30,6 +30,7 @@
 #include <cppu/unotype.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <unotools/textsearch.hxx>
+#include <utility>
 #include <vcl/event.hxx>
 #include <sal/log.hxx>
 #include <tools/diagnose_ex.h>
@@ -52,10 +53,10 @@ struct Prop_Impl
     OUString    Property;
     Any         Value;
 
-    Prop_Impl( const OUString& sName, const OUString& sProperty, const Any& 
aValue )
-        : Name( sName )
-        , Property( sProperty )
-        , Value( aValue )
+    Prop_Impl( OUString sName, OUString sProperty, Any aValue )
+        : Name(std::move( sName ))
+        , Property(std::move( sProperty ))
+        , Value(std::move( aValue ))
     {}
 };
 
@@ -66,9 +67,9 @@ struct UserData
     int aLineage;
     Reference<XNameAccess> aXNameAccess;
 
-    explicit UserData( OUString const & rPropertyPath )
+    explicit UserData( OUString aPropertyPath )
         : bIsPropertyPath( true )
-        , sPropertyPath(rPropertyPath)
+        , sPropertyPath(std::move(aPropertyPath))
         , aLineage(0)
     {}
 
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 21f91debc8fd..be2b891eb9ef 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <utility>
 #include <vcl/settings.hxx>
 #include <vcl/weld.hxx>
 #include <i18nlangtag/languagetag.hxx>
@@ -127,12 +128,12 @@ class ModuleUserData_Impl
     OUString  sImplName;
 
 public:
-    ModuleUserData_Impl( const OUString& sImpName, bool bIsParent, bool 
bChecked, sal_uInt8 nSetType, sal_uInt8 nSetIndex ) :
+    ModuleUserData_Impl( OUString sImpName, bool bIsParent, bool bChecked, 
sal_uInt8 nSetType, sal_uInt8 nSetIndex ) :
         bParent(bIsParent),
         bIsChecked(bChecked),
         nType(nSetType),
         nIndex(nSetIndex),
-        sImplName(sImpName)
+        sImplName(std::move(sImpName))
         {
         }
     bool IsParent() const {return bParent;}
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 1c6eca7f5ee1..812d24511a5a 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -99,6 +99,7 @@
 #include <unotools/moduleoptions.hxx>
 #include <unotools/optionsdlg.hxx>
 #include <unotools/viewoptions.hxx>
+#include <utility>
 #include <vcl/help.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/weldutils.hxx>
@@ -1954,11 +1955,11 @@ short OfaTreeOptionsDialog::run()
 
 // class ExtensionsTabPage -----------------------------------------------
 ExtensionsTabPage::ExtensionsTabPage(
-    weld::Container* pParent, const OUString& rPageURL,
-    const OUString& rEvtHdl, const Reference< awt::XContainerWindowProvider >& 
rProvider )
+    weld::Container* pParent, OUString aPageURL,
+    OUString aEvtHdl, const Reference< awt::XContainerWindowProvider >& 
rProvider )
     : m_pContainer(pParent)
-    , m_sPageURL(rPageURL)
-    , m_sEventHdl(rEvtHdl)
+    , m_sPageURL(std::move(aPageURL))
+    , m_sEventHdl(std::move(aEvtHdl))
     , m_xWinProvider(rProvider)
 {
 }
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 86c86d5c6eb8..3892fba34e2f 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -19,6 +19,7 @@
 
 #include <i18nutil/unicode.hxx>
 #include <o3tl/safeint.hxx>
+#include <utility>
 #include <vcl/event.hxx>
 #include <vcl/keycodes.hxx>
 #include <vcl/settings.hxx>
@@ -2184,11 +2185,11 @@ struct ImplSmartTagLBUserData
     uno::Reference< smarttags::XSmartTagRecognizer > mxRec;
     sal_Int32 mnSmartTagIdx;
 
-    ImplSmartTagLBUserData( const OUString& rSmartTagType,
-                            uno::Reference< smarttags::XSmartTagRecognizer > 
const & xRec,
+    ImplSmartTagLBUserData( OUString aSmartTagType,
+                            uno::Reference< smarttags::XSmartTagRecognizer >  
xRec,
                             sal_Int32 nSmartTagIdx ) :
-        maSmartTagType( rSmartTagType ),
-        mxRec( xRec ),
+        maSmartTagType(std::move( aSmartTagType )),
+        mxRec(std::move( xRec )),
         mnSmartTagIdx( nSmartTagIdx ) {}
 };
 
diff --git a/include/cui/cuicharmap.hxx b/include/cui/cuicharmap.hxx
index 5b16dca75339..688fb570eff0 100644
--- a/include/cui/cuicharmap.hxx
+++ b/include/cui/cuicharmap.hxx
@@ -148,7 +148,7 @@ private:
 
 public:
     SvxCharacterMap(weld::Widget* pParent, const SfxItemSet* pSet,
-                    const css::uno::Reference<css::frame::XFrame>& rFrame);
+                    css::uno::Reference<css::frame::XFrame> xFrame);
     virtual short run() override;
 
     void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }

Reply via email to