sc/inc/PivotTableDataSequence.hxx                      |    7 -
 sc/inc/Sparkline.hxx                                   |    5 
 sc/inc/SparklineCell.hxx                               |    5 
 sc/inc/SparklineGroup.hxx                              |    2 
 sc/inc/TablePivotChart.hxx                             |    2 
 sc/inc/addincol.hxx                                    |   13 +-
 sc/inc/arealink.hxx                                    |    6 -
 sc/inc/callform.hxx                                    |    4 
 sc/inc/cellsuno.hxx                                    |    6 -
 sc/inc/chartlis.hxx                                    |    4 
 sc/inc/chartpos.hxx                                    |    2 
 sc/inc/chartuno.hxx                                    |    2 
 sc/inc/chgtrack.hxx                                    |   14 +-
 sc/inc/conditio.hxx                                    |    4 
 sc/inc/dapiuno.hxx                                     |   15 +-
 sc/inc/datamapper.hxx                                  |    2 
 sc/inc/datauno.hxx                                     |    2 
 sc/inc/defaultsoptions.hxx                             |    2 
 sc/inc/dpdimsave.hxx                                   |   10 -
 sc/inc/dpgroup.hxx                                     |    2 
 sc/inc/dpobject.hxx                                    |    6 -
 sc/inc/dpoutput.hxx                                    |    2 
 sc/inc/dpresfilter.hxx                                 |    2 
 sc/inc/dpsave.hxx                                      |    4 
 sc/inc/drwlayer.hxx                                    |    2 
 sc/inc/externalrefmgr.hxx                              |    2 
 sc/inc/fielduno.hxx                                    |    4 
 sc/inc/fmtuno.hxx                                      |    2 
 sc/inc/formulaopt.hxx                                  |    2 
 sc/inc/formularesult.hxx                               |    2 
 sc/inc/hints.hxx                                       |    6 -
 sc/inc/linkuno.hxx                                     |    8 -
 sc/inc/listenercalls.hxx                               |    9 -
 sc/inc/listenercontext.hxx                             |    4 
 sc/inc/matrixoperators.hxx                             |    3 
 sc/inc/miscuno.hxx                                     |    6 -
 sc/inc/nameuno.hxx                                     |    4 
 sc/inc/orcusxml.hxx                                    |    2 
 sc/inc/pivot.hxx                                       |    2 
 sc/inc/postit.hxx                                      |    2 
 sc/inc/reffind.hxx                                     |    2 
 sc/inc/sheetdata.hxx                                   |   21 +--
 sc/inc/styleuno.hxx                                    |    2 
 sc/inc/tablink.hxx                                     |    8 -
 sc/inc/targuno.hxx                                     |    2 
 sc/inc/textuno.hxx                                     |    4 
 sc/inc/token.hxx                                       |   12 +-
 sc/inc/typedstrdata.hxx                                |    2 
 sc/inc/unoreflist.hxx                                  |    7 -
 sc/inc/userlist.hxx                                    |    4 
 sc/inc/xmlwrap.hxx                                     |    2 
 sc/source/core/data/column2.cxx                        |    3 
 sc/source/core/data/conditio.cxx                       |    9 -
 sc/source/core/data/dpdimsave.cxx                      |   29 ++---
 sc/source/core/data/dpgroup.cxx                        |    5 
 sc/source/core/data/dpobject.cxx                       |   27 ++--
 sc/source/core/data/dpoutput.cxx                       |    9 -
 sc/source/core/data/dpresfilter.cxx                    |    5 
 sc/source/core/data/dpsave.cxx                         |    9 -
 sc/source/core/data/drwlayer.cxx                       |    5 
 sc/source/core/data/listenercontext.cxx                |    9 -
 sc/source/core/data/pivot2.cxx                         |    5 
 sc/source/core/data/postit.cxx                         |   11 +
 sc/source/core/inc/addinlis.hxx                        |    2 
 sc/source/core/inc/ddelink.hxx                         |    2 
 sc/source/core/inc/doubleref.hxx                       |    2 
 sc/source/core/inc/webservicelink.hxx                  |    2 
 sc/source/core/opencl/formulagroupcl.cxx               |   17 +--
 sc/source/core/opencl/opbase.cxx                       |   23 ++--
 sc/source/core/opencl/opbase.hxx                       |   10 -
 sc/source/core/tool/addincol.cxx                       |   17 +--
 sc/source/core/tool/addinlis.cxx                       |    5 
 sc/source/core/tool/callform.cxx                       |   11 +
 sc/source/core/tool/chartlis.cxx                       |   15 +-
 sc/source/core/tool/chartpos.cxx                       |    5 
 sc/source/core/tool/chgtrack.cxx                       |   27 ++--
 sc/source/core/tool/dbdata.cxx                         |    4 
 sc/source/core/tool/ddelink.cxx                        |    9 -
 sc/source/core/tool/defaultsoptions.cxx                |    5 
 sc/source/core/tool/doubleref.cxx                      |    4 
 sc/source/core/tool/formulalogger.cxx                  |    5 
 sc/source/core/tool/formulaopt.cxx                     |    5 
 sc/source/core/tool/formularesult.cxx                  |    3 
 sc/source/core/tool/hints.cxx                          |   13 +-
 sc/source/core/tool/orcusxml.cxx                       |    5 
 sc/source/core/tool/reffind.cxx                        |    5 
 sc/source/core/tool/scmatrix.cxx                       |   29 ++---
 sc/source/core/tool/token.cxx                          |   24 ++--
 sc/source/core/tool/typedstrdata.cxx                   |    5 
 sc/source/core/tool/userlist.cxx                       |    9 -
 sc/source/core/tool/webservicelink.cxx                 |    5 
 sc/source/filter/excel/xecontent.cxx                   |    5 
 sc/source/filter/excel/xeescher.cxx                    |   17 +--
 sc/source/filter/excel/xeextlst.cxx                    |    9 -
 sc/source/filter/excel/xeformula.cxx                   |    7 -
 sc/source/filter/excel/xelink.cxx                      |    7 -
 sc/source/filter/excel/xepage.cxx                      |    5 
 sc/source/filter/excel/xeroot.cxx                      |    1 
 sc/source/filter/excel/xestyle.cxx                     |    5 
 sc/source/filter/excel/xicontent.cxx                   |    5 
 sc/source/filter/excel/xilink.cxx                      |    7 -
 sc/source/filter/excel/xiroot.cxx                      |    1 
 sc/source/filter/excel/xistring.cxx                    |    5 
 sc/source/filter/excel/xlchart.cxx                     |   11 +
 sc/source/filter/excel/xlroot.cxx                      |    5 
 sc/source/filter/ftools/fprogressbar.cxx               |    5 
 sc/source/filter/html/htmlexp.cxx                      |    9 -
 sc/source/filter/html/htmlpars.cxx                     |    5 
 sc/source/filter/inc/XclExpChangeTrack.hxx             |    2 
 sc/source/filter/inc/condformatbuffer.hxx              |    2 
 sc/source/filter/inc/condformatcontext.hxx             |    4 
 sc/source/filter/inc/eeparser.hxx                      |    5 
 sc/source/filter/inc/formulabuffer.hxx                 |    9 -
 sc/source/filter/inc/fprogressbar.hxx                  |    2 
 sc/source/filter/inc/htmlexp.hxx                       |    4 
 sc/source/filter/inc/htmlpars.hxx                      |    9 -
 sc/source/filter/inc/namebuff.hxx                      |    7 -
 sc/source/filter/inc/orcusfiltersimpl.hxx              |    2 
 sc/source/filter/inc/orcusinterface.hxx                |    2 
 sc/source/filter/inc/richstringcontext.hxx             |    4 
 sc/source/filter/inc/stylesbuffer.hxx                  |    2 
 sc/source/filter/inc/stylesfragment.hxx                |   18 +--
 sc/source/filter/inc/tokstack.hxx                      |    5 
 sc/source/filter/inc/xcl97rec.hxx                      |    4 
 sc/source/filter/inc/xecontent.hxx                     |    2 
 sc/source/filter/inc/xeescher.hxx                      |    4 
 sc/source/filter/inc/xeextlst.hxx                      |    4 
 sc/source/filter/inc/xepage.hxx                        |    2 
 sc/source/filter/inc/xestyle.hxx                       |    7 -
 sc/source/filter/inc/xicontent.hxx                     |    2 
 sc/source/filter/inc/xistring.hxx                      |    2 
 sc/source/filter/inc/xlchart.hxx                       |    4 
 sc/source/filter/inc/xlroot.hxx                        |    2 
 sc/source/filter/oox/condformatbuffer.cxx              |    5 
 sc/source/filter/oox/condformatcontext.cxx             |    9 -
 sc/source/filter/oox/excelvbaproject.cxx               |    5 
 sc/source/filter/oox/formulabuffer.cxx                 |    9 -
 sc/source/filter/oox/stylesbuffer.cxx                  |    5 
 sc/source/filter/oox/workbookfragment.cxx              |    9 -
 sc/source/filter/oox/worksheethelper.cxx               |    7 -
 sc/source/filter/orcus/interface.cxx                   |    5 
 sc/source/filter/orcus/xmlcontext.cxx                  |    5 
 sc/source/filter/xcl97/XclExpChangeTrack.cxx           |    5 
 sc/source/filter/xcl97/xcl97rec.cxx                    |    9 -
 sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx |   13 +-
 sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx |   11 +
 sc/source/filter/xml/XMLStylesImportHelper.hxx         |    9 -
 sc/source/filter/xml/XMLTrackedChangesContext.cxx      |    7 -
 sc/source/filter/xml/pivotsource.cxx                   |   12 +-
 sc/source/filter/xml/pivotsource.hxx                   |    6 -
 sc/source/filter/xml/xmlannoi.hxx                      |    5 
 sc/source/filter/xml/xmlwrap.cxx                       |    5 
 sc/source/ui/Accessibility/AccessibleContextBase.cxx   |    5 
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx    |    4 
 sc/source/ui/Accessibility/AccessibleDocument.cxx      |    3 
 sc/source/ui/Accessibility/AccessibleText.cxx          |   13 +-
 sc/source/ui/app/drwtrans.cxx                          |    5 
 sc/source/ui/app/inputhdl.cxx                          |    5 
 sc/source/ui/app/rfindlst.cxx                          |    5 
 sc/source/ui/app/transobj.cxx                          |    5 
 sc/source/ui/app/uiitems.cxx                           |    5 
 sc/source/ui/cctrl/tbzoomsliderctrl.cxx                |    5 
 sc/source/ui/dataprovider/csvdataprovider.cxx          |    5 
 sc/source/ui/dataprovider/dataprovider.cxx             |   13 +-
 sc/source/ui/dataprovider/datatransformation.cxx       |   19 +--
 sc/source/ui/dataprovider/htmldataprovider.cxx         |    1 
 sc/source/ui/dataprovider/sqldataprovider.cxx          |    1 
 sc/source/ui/dataprovider/xmldataprovider.cxx          |    1 
 sc/source/ui/dbgui/PivotLayoutDialog.cxx               |    5 
 sc/source/ui/dbgui/pvfundlg.cxx                        |    5 
 sc/source/ui/dbgui/scuiimoptdlg.cxx                    |    5 
 sc/source/ui/docshell/arealink.cxx                     |   15 +-
 sc/source/ui/docshell/docfunc.cxx                      |    5 
 sc/source/ui/docshell/externalrefmgr.cxx               |    5 
 sc/source/ui/docshell/tablink.cxx                      |   21 +--
 sc/source/ui/inc/AccessibleContextBase.hxx             |    2 
 sc/source/ui/inc/AccessibleCsvControl.hxx              |    2 
 sc/source/ui/inc/AccessibleText.hxx                    |    6 -
 sc/source/ui/inc/PivotLayoutDialog.hxx                 |    2 
 sc/source/ui/inc/autostyl.hxx                          |    9 -
 sc/source/ui/inc/condformatuno.hxx                     |   16 +-
 sc/source/ui/inc/dataprovider.hxx                      |    4 
 sc/source/ui/inc/datatransformation.hxx                |    8 -
 sc/source/ui/inc/drwtrans.hxx                          |    2 
 sc/source/ui/inc/filldlg.hxx                           |    2 
 sc/source/ui/inc/inputhdl.hxx                          |    2 
 sc/source/ui/inc/mvtabdlg.hxx                          |    2 
 sc/source/ui/inc/notemark.hxx                          |    2 
 sc/source/ui/inc/optsolver.hxx                         |    6 -
 sc/source/ui/inc/overlayobject.hxx                     |    2 
 sc/source/ui/inc/pfuncache.hxx                         |    2 
 sc/source/ui/inc/pvfundlg.hxx                          |    2 
 sc/source/ui/inc/rfindlst.hxx                          |    2 
 sc/source/ui/inc/solveroptions.hxx                     |    7 -
 sc/source/ui/inc/spelleng.hxx                          |    2 
 sc/source/ui/inc/spellparam.hxx                        |    2 
 sc/source/ui/inc/tbzoomsliderctrl.hxx                  |    2 
 sc/source/ui/inc/transobj.hxx                          |    2 
 sc/source/ui/inc/uiitems.hxx                           |    2 
 sc/source/ui/inc/undo/UndoDeleteSparklineGroup.hxx     |    2 
 sc/source/ui/inc/undo/UndoEditSparkline.hxx            |    4 
 sc/source/ui/inc/undo/UndoEditSparklineGroup.hxx       |    2 
 sc/source/ui/inc/undo/UndoGroupSparklines.hxx          |   11 +
 sc/source/ui/inc/undo/UndoInsertSparkline.hxx          |    3 
 sc/source/ui/inc/undo/UndoUngroupSparklines.hxx        |    9 -
 sc/source/ui/inc/undobase.hxx                          |    2 
 sc/source/ui/inc/undoblk.hxx                           |   62 +++++------
 sc/source/ui/inc/undocell.hxx                          |   12 +-
 sc/source/ui/inc/undodat.hxx                           |    6 -
 sc/source/ui/inc/undosort.hxx                          |    2 
 sc/source/ui/inc/undostyl.hxx                          |    4 
 sc/source/ui/inc/undotab.hxx                           |   14 +-
 sc/source/ui/miscdlgs/dataproviderdlg.cxx              |    5 
 sc/source/ui/miscdlgs/filldlg.cxx                      |    5 
 sc/source/ui/miscdlgs/mvtabdlg.cxx                     |    5 
 sc/source/ui/miscdlgs/optsolver.cxx                    |   15 +-
 sc/source/ui/miscdlgs/solveroptions.cxx                |    5 
 sc/source/ui/sparklines/SparklineGroup.cxx             |    5 
 sc/source/ui/undo/UndoDeleteSparklineGroup.cxx         |    5 
 sc/source/ui/undo/UndoEditSparkline.cxx                |    9 -
 sc/source/ui/undo/UndoEditSparklineGroup.cxx           |    5 
 sc/source/ui/undo/UndoGroupSparklines.cxx              |    8 -
 sc/source/ui/undo/UndoInsertSparkline.cxx              |    7 -
 sc/source/ui/undo/undobase.cxx                         |    5 
 sc/source/ui/undo/undoblk.cxx                          |   29 ++---
 sc/source/ui/undo/undoblk2.cxx                         |    5 
 sc/source/ui/undo/undoblk3.cxx                         |   95 ++++++++---------
 sc/source/ui/undo/undocell.cxx                         |   25 ++--
 sc/source/ui/undo/undodat.cxx                          |   17 +--
 sc/source/ui/undo/undosort.cxx                         |    5 
 sc/source/ui/undo/undostyl.cxx                         |    9 -
 sc/source/ui/undo/undotab.cxx                          |   35 +++---
 sc/source/ui/unoobj/PivotTableDataSequence.cxx         |    5 
 sc/source/ui/unoobj/TablePivotChart.cxx                |    5 
 sc/source/ui/unoobj/cellsuno.cxx                       |   13 +-
 sc/source/ui/unoobj/chartuno.cxx                       |    5 
 sc/source/ui/unoobj/condformatuno.cxx                  |   33 +++--
 sc/source/ui/unoobj/dapiuno.cxx                        |   21 +--
 sc/source/ui/unoobj/datauno.cxx                        |    5 
 sc/source/ui/unoobj/fielduno.cxx                       |    9 -
 sc/source/ui/unoobj/fmtuno.cxx                         |    5 
 sc/source/ui/unoobj/linkuno.cxx                        |   19 +--
 sc/source/ui/unoobj/miscuno.cxx                        |   15 +-
 sc/source/ui/unoobj/nameuno.cxx                        |   11 +
 sc/source/ui/unoobj/styleuno.cxx                       |    5 
 sc/source/ui/unoobj/targuno.cxx                        |    5 
 sc/source/ui/unoobj/textuno.cxx                        |    9 -
 sc/source/ui/unoobj/unoreflist.cxx                     |    5 
 sc/source/ui/vba/vbaaxes.cxx                           |    5 
 sc/source/ui/vba/vbaaxis.cxx                           |    3 
 sc/source/ui/vba/vbaaxis.hxx                           |    2 
 sc/source/ui/vba/vbaborders.cxx                        |    5 
 sc/source/ui/vba/vbacharacters.cxx                     |    5 
 sc/source/ui/vba/vbacharacters.hxx                     |    2 
 sc/source/ui/vba/vbachart.cxx                          |    3 
 sc/source/ui/vba/vbachart.hxx                          |    2 
 sc/source/ui/vba/vbachartobject.cxx                    |    3 
 sc/source/ui/vba/vbachartobject.hxx                    |    2 
 sc/source/ui/vba/vbachartobjects.cxx                   |    5 
 sc/source/ui/vba/vbachartobjects.hxx                   |    2 
 sc/source/ui/vba/vbacondition.cxx                      |   10 -
 sc/source/ui/vba/vbacondition.hxx                      |    2 
 sc/source/ui/vba/vbaformat.cxx                         |    9 -
 sc/source/ui/vba/vbaformat.hxx                         |    2 
 sc/source/ui/vba/vbaformatcondition.cxx                |    9 -
 sc/source/ui/vba/vbaformatcondition.hxx                |    6 -
 sc/source/ui/vba/vbaformatconditions.cxx               |    3 
 sc/source/ui/vba/vbainterior.cxx                       |    3 
 sc/source/ui/vba/vbainterior.hxx                       |    2 
 sc/source/ui/vba/vbamenu.cxx                           |    3 
 sc/source/ui/vba/vbamenu.hxx                           |    2 
 sc/source/ui/vba/vbamenubar.cxx                        |    3 
 sc/source/ui/vba/vbamenubar.hxx                        |    2 
 sc/source/ui/vba/vbamenubars.cxx                       |    5 
 sc/source/ui/vba/vbamenubars.hxx                       |    2 
 sc/source/ui/vba/vbamenuitem.cxx                       |    4 
 sc/source/ui/vba/vbamenuitem.hxx                       |    2 
 sc/source/ui/vba/vbamenuitems.cxx                      |    5 
 sc/source/ui/vba/vbamenuitems.hxx                      |    2 
 sc/source/ui/vba/vbamenus.cxx                          |    5 
 sc/source/ui/vba/vbamenus.hxx                          |    2 
 sc/source/ui/vba/vbaname.cxx                           |   13 +-
 sc/source/ui/vba/vbaname.hxx                           |    2 
 sc/source/ui/vba/vbanames.cxx                          |    7 -
 sc/source/ui/vba/vbanames.hxx                          |    2 
 sc/source/ui/vba/vbaoleobjects.cxx                     |    9 -
 sc/source/ui/vba/vbaoutline.hxx                        |    3 
 sc/source/ui/vba/vbapagebreak.cxx                      |    5 
 sc/source/ui/vba/vbapagebreak.hxx                      |    2 
 sc/source/ui/vba/vbapagebreaks.cxx                     |   11 +
 sc/source/ui/vba/vbapagesetup.cxx                      |    5 
 sc/source/ui/vba/vbapagesetup.hxx                      |    2 
 sc/source/ui/vba/vbapane.cxx                           |    5 
 sc/source/ui/vba/vbapane.hxx                           |    2 
 sc/source/ui/vba/vbapivotcache.cxx                     |    4 
 sc/source/ui/vba/vbapivotcache.hxx                     |    2 
 sc/source/ui/vba/vbapivottable.cxx                     |    4 
 sc/source/ui/vba/vbapivottable.hxx                     |    2 
 sc/source/ui/vba/vbarange.cxx                          |   17 +--
 sc/source/ui/vba/vbasheetobjects.cxx                   |   19 +--
 sc/source/ui/vba/vbastyles.cxx                         |    3 
 sc/source/ui/vba/vbatitle.hxx                          |    5 
 sc/source/ui/vba/vbavalidation.hxx                     |    3 
 sc/source/ui/vba/vbawindow.cxx                         |    7 -
 sc/source/ui/vba/vbawindows.cxx                        |   11 +
 sc/source/ui/vba/vbaworksheet.cxx                      |    5 
 sc/source/ui/vba/vbaworksheet.hxx                      |    4 
 sc/source/ui/vba/vbaworksheets.cxx                     |    7 -
 sc/source/ui/vba/vbaworksheets.hxx                     |    4 
 sc/source/ui/view/cellsh2.cxx                          |    5 
 sc/source/ui/view/hintwin.cxx                          |    7 -
 sc/source/ui/view/notemark.cxx                         |    5 
 sc/source/ui/view/pfuncache.cxx                        |    5 
 sc/source/ui/view/spelleng.cxx                         |    9 -
 314 files changed, 1179 insertions(+), 990 deletions(-)

New commits:
commit 5b112c8f8843613873181fce50990a8feef837ca
Author:     Noel Grandin <[email protected]>
AuthorDate: Fri Aug 5 11:21:44 2022 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Sun Aug 7 13:32:30 2022 +0200

    clang-tidy modernize-pass-by-value in sc
    
    Change-Id: Ia7ff651d1cbc119b36a9f8052594d03650988f59
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137848
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sc/inc/PivotTableDataSequence.hxx 
b/sc/inc/PivotTableDataSequence.hxx
index a5723725297e..b92d736545b7 100644
--- a/sc/inc/PivotTableDataSequence.hxx
+++ b/sc/inc/PivotTableDataSequence.hxx
@@ -24,6 +24,7 @@
 #include <cppuhelper/implbase.hxx>
 
 #include <limits>
+#include <utility>
 
 class ScDocument;
 
@@ -59,9 +60,9 @@ struct ValueAndFormat
         , m_nNumberFormat(nNumberFormat)
     {}
 
-    explicit ValueAndFormat(OUString const & rString)
+    explicit ValueAndFormat(OUString aString)
         : m_fValue(std::numeric_limits<double>::quiet_NaN())
-        , m_aString(rString)
+        , m_aString(std::move(aString))
         , m_eType(ValueType::String)
         , m_nNumberFormat(0)
     {
@@ -81,7 +82,7 @@ class PivotTableDataSequence final : public 
PivotTableDataSequence_Base, public
 {
 public:
     explicit PivotTableDataSequence(ScDocument* pDocument,
-                                    OUString const & sID, 
std::vector<ValueAndFormat>&& rData);
+                                    OUString sID, 
std::vector<ValueAndFormat>&& rData);
 
     virtual ~PivotTableDataSequence() override;
     PivotTableDataSequence(const PivotTableDataSequence&) = delete;
diff --git a/sc/inc/Sparkline.hxx b/sc/inc/Sparkline.hxx
index 77f249428288..236c4dc3657e 100644
--- a/sc/inc/Sparkline.hxx
+++ b/sc/inc/Sparkline.hxx
@@ -13,6 +13,7 @@
 #include "scdllapi.h"
 #include "rangelst.hxx"
 #include <memory>
+#include <utility>
 
 namespace sc
 {
@@ -33,10 +34,10 @@ class SC_DLLPUBLIC Sparkline
     std::shared_ptr<SparklineGroup> m_pSparklineGroup;
 
 public:
-    Sparkline(SCCOL nColumn, SCROW nRow, std::shared_ptr<SparklineGroup> 
const& pSparklineGroup)
+    Sparkline(SCCOL nColumn, SCROW nRow, std::shared_ptr<SparklineGroup> 
pSparklineGroup)
         : m_nColumn(nColumn)
         , m_nRow(nRow)
-        , m_pSparklineGroup(pSparklineGroup)
+        , m_pSparklineGroup(std::move(pSparklineGroup))
     {
     }
 
diff --git a/sc/inc/SparklineCell.hxx b/sc/inc/SparklineCell.hxx
index be0ff9b5a9fd..28a7b4249808 100644
--- a/sc/inc/SparklineCell.hxx
+++ b/sc/inc/SparklineCell.hxx
@@ -13,6 +13,7 @@
 #include "scdllapi.h"
 #include "Sparkline.hxx"
 #include <memory>
+#include <utility>
 
 namespace sc
 {
@@ -23,8 +24,8 @@ private:
     std::shared_ptr<Sparkline> m_pSparkline;
 
 public:
-    SparklineCell(std::shared_ptr<Sparkline> const& pSparkline)
-        : m_pSparkline(pSparkline)
+    SparklineCell(std::shared_ptr<Sparkline> pSparkline)
+        : m_pSparkline(std::move(pSparkline))
     {
     }
 
diff --git a/sc/inc/SparklineGroup.hxx b/sc/inc/SparklineGroup.hxx
index 7d2e75e6e9e3..c79067c1250c 100644
--- a/sc/inc/SparklineGroup.hxx
+++ b/sc/inc/SparklineGroup.hxx
@@ -37,7 +37,7 @@ public:
 
     SparklineGroup();
     SparklineGroup(SparklineGroup const& pOtherSparkline);
-    SparklineGroup(SparklineAttributes const& rSparklineAttributes);
+    SparklineGroup(SparklineAttributes aSparklineAttributes);
 
     SparklineGroup& operator=(const SparklineGroup&) = delete;
 };
diff --git a/sc/inc/TablePivotChart.hxx b/sc/inc/TablePivotChart.hxx
index 8dc61d2582f8..0012ed1d984d 100644
--- a/sc/inc/TablePivotChart.hxx
+++ b/sc/inc/TablePivotChart.hxx
@@ -39,7 +39,7 @@ private:
     OUString m_aChartName;
 
 public:
-    TablePivotChart(ScDocShell* pDocShell, SCTAB nTab, OUString const & rName);
+    TablePivotChart(ScDocShell* pDocShell, SCTAB nTab, OUString aName);
     virtual ~TablePivotChart() override;
 
     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index bb89f8d3c87a..ee5ecb44e300 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -32,6 +32,7 @@
 #include "types.hxx"
 
 #include <string_view>
+#include <utility>
 #include <vector>
 #include <unordered_map>
 
@@ -79,8 +80,8 @@ public:
         OUString    maLocale;
         OUString    maName;
 
-                    LocalizedName( const OUString& rLocale, const OUString& 
rName )
-                        : maLocale( rLocale), maName( rName) { }
+                    LocalizedName( OUString aLocale, OUString aName )
+                        : maLocale(std::move(aLocale)), 
maName(std::move(aName)) { }
     };
 private:
     OUString            aOriginalName;      ///< kept in formula
@@ -102,10 +103,10 @@ private:
 
 public:
                 ScUnoAddInFuncData( const OUString& rNam, const OUString& rLoc,
-                                    const OUString& rDesc,
-                                    sal_uInt16 nCat, const OString&,
-                                    const css::uno::Reference< 
css::reflection::XIdlMethod>& rFunc,
-                                    const css::uno::Any& rO,
+                                    OUString aDesc,
+                                    sal_uInt16 nCat, OString ,
+                                    css::uno::Reference< 
css::reflection::XIdlMethod> aFunc,
+                                    css::uno::Any aO,
                                     tools::Long nAC, const ScAddInArgDesc* pAD,
                                     tools::Long nCP );
                 ~ScUnoAddInFuncData();
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx
index 897ace164aea..81e884e093d3 100644
--- a/sc/inc/arealink.hxx
+++ b/sc/inc/arealink.hxx
@@ -42,9 +42,9 @@ private:
     static bool FindExtRange( ScRange& rRange, const ScDocument& rSrcDoc, 
const OUString& rAreaName );
 
 public:
-    ScAreaLink( SfxObjectShell* pShell, const OUString& rFile,
-                    const OUString& rFilter, const OUString& rOpt,
-                    const OUString& rArea, const ScRange& rDest, sal_Int32 
nRefreshDelaySeconds );
+    ScAreaLink( SfxObjectShell* pShell, OUString aFile,
+                    OUString aFilter, OUString aOpt,
+                    OUString aArea, const ScRange& rDest, sal_Int32 
nRefreshDelaySeconds );
     virtual ~ScAreaLink() override;
 
     virtual void Closed() override;
diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx
index 59f7ae4e6c59..dd4c4f15291b 100644
--- a/sc/inc/callform.hxx
+++ b/sc/inc/callform.hxx
@@ -62,8 +62,8 @@ class LegacyFuncData
     ParamType   eParamType[MAXFUNCPARAM];
 public:
     LegacyFuncData(const ModuleData*pModule,
-             const OUString& rIName,
-             const OUString& rFName,
+             OUString aIName,
+             OUString aFName,
                    sal_uInt16     nNo,
                    sal_uInt16     nCount,
              const ParamType* peType,
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 5e3e1f69f7c7..65784be7ee3d 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -231,7 +231,7 @@ protected:
 
 public:
                             ScCellRangesBase(ScDocShell* pDocSh, const 
ScRange& rR);
-                            ScCellRangesBase(ScDocShell* pDocSh, const 
ScRangeList& rR);
+                            ScCellRangesBase(ScDocShell* pDocSh, ScRangeList 
aR);
     virtual                 ~ScCellRangesBase() override;
 
     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint 
) override;
@@ -1041,7 +1041,7 @@ private:
     ScRangeList             aRanges;
 
 public:
-                            ScCellsObj(ScDocShell* pDocSh, const ScRangeList& 
rR);
+                            ScCellsObj(ScDocShell* pDocSh, ScRangeList aR);
     virtual                 ~ScCellsObj() override;
 
     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint 
) override;
@@ -1077,7 +1077,7 @@ private:
     void                    CheckPos_Impl();
 
 public:
-                            ScCellsEnumeration(ScDocShell* pDocSh, const 
ScRangeList& rR);
+                            ScCellsEnumeration(ScDocShell* pDocSh, ScRangeList 
aR);
     virtual                 ~ScCellsEnumeration() override;
 
     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint 
) override;
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index d140531a9451..5617dc482af9 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -73,9 +73,9 @@ private:
     ScChartListener& operator=( const ScChartListener& ) = delete;
 
 public:
-    ScChartListener( const OUString& rName, ScDocument& rDoc,
+    ScChartListener( OUString aName, ScDocument& rDoc,
                      const ScRangeListRef& rRangeListRef );
-    ScChartListener( const OUString& rName, ScDocument& rDoc,
+    ScChartListener( OUString aName, ScDocument& rDoc,
                      ::std::vector<ScTokenRef> aTokens );
     ScChartListener( const ScChartListener& ) = delete;
     virtual ~ScChartListener() override;
diff --git a/sc/inc/chartpos.hxx b/sc/inc/chartpos.hxx
index 882810d900a8..685a2d350cd6 100644
--- a/sc/inc/chartpos.hxx
+++ b/sc/inc/chartpos.hxx
@@ -120,7 +120,7 @@ public:
     ScChartPositioner( ScDocument& rDoc, SCTAB nTab,
                     SCCOL nStartColP, SCROW nStartRowP,
                     SCCOL nEndColP, SCROW nEndRowP );
-    ScChartPositioner( ScDocument& rDoc, const ScRangeListRef& rRangeList );
+    ScChartPositioner( ScDocument& rDoc, ScRangeListRef xRangeList );
     ScChartPositioner( const ScChartPositioner& rPositioner );
 
     ~ScChartPositioner();
diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx
index 1a2e3a314ee7..8eba30e630f5 100644
--- a/sc/inc/chartuno.hxx
+++ b/sc/inc/chartuno.hxx
@@ -122,7 +122,7 @@ private:
     virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const override;
 
 public:
-                            ScChartObj(ScDocShell* pDocSh, SCTAB nT, const 
OUString& rN);
+                            ScChartObj(ScDocShell* pDocSh, SCTAB nT, OUString 
aN);
     virtual                 ~ScChartObj() override;
 
     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint 
) override;
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 6cbb7a0d89f5..dde6beb837f6 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -207,16 +207,16 @@ protected:
 
     // only to be used in the XML import
     ScChangeAction( ScChangeActionType,
-                    const ScBigRange&,
+                    ScBigRange ,
                     const sal_uLong nAction,
                     const sal_uLong nRejectAction,
                     const ScChangeActionState eState,
                     const DateTime& aDateTime,
-                    const OUString& aUser,
-                    const OUString& aComment );
+                    OUString aUser,
+                    OUString aComment );
 
     // only to be used in the XML import
-    ScChangeAction( ScChangeActionType, const ScBigRange&, const sal_uLong 
nAction);
+    ScChangeAction( ScChangeActionType, ScBigRange , const sal_uLong nAction);
 
     OUString GetRefString(
         const ScBigRange& rRange, const ScDocument& rDoc, bool bFlag3D = 
false) const;
@@ -549,7 +549,7 @@ public:
                     const OUString& aUser,
                     const DateTime& aDateTime,
                     const OUString &sComment,
-                    const ScBigRange& aFromBigRange,
+                    ScBigRange aFromBigRange,
                     ScChangeTrack* pTrack); // only to use in the XML import
 
     const ScBigRange&   GetFromRange() const { return aFromRange; }
@@ -686,11 +686,11 @@ public:
         const sal_uLong nActionNumber,  const ScChangeActionState eState,
         const sal_uLong nRejectingNumber, const ScBigRange& aBigRange,
         const OUString& aUser, const DateTime& aDateTime,
-        const OUString &sComment, const ScCellValue& rOldCell,
+        const OUString &sComment, ScCellValue aOldCell,
         const ScDocument* pDoc, const OUString& sOldValue ); // to use for XML 
Import
 
     ScChangeActionContent(
-        const sal_uLong nActionNumber, const ScCellValue& rNewCell,
+        const sal_uLong nActionNumber, ScCellValue aNewCell,
         const ScBigRange& aBigRange, const ScDocument* pDoc,
         const OUString& sNewValue ); // to use for XML Import of Generated 
Actions
 
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index d47b841b0880..afd16ba27365 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -453,7 +453,7 @@ public:
             ScCondFormatEntry( ScConditionMode eOper,
                                 const OUString& rExpr1, const OUString& rExpr2,
                                 ScDocument& rDocument, const ScAddress& rPos,
-                                const OUString& rStyle,
+                                OUString aStyle,
                                 const OUString& rExprNmsp1 = OUString(),
                                 const OUString& rExprNmsp2 = OUString(),
                                 formula::FormulaGrammar::Grammar eGrammar1 = 
formula::FormulaGrammar::GRAM_DEFAULT,
@@ -462,7 +462,7 @@ public:
             ScCondFormatEntry( ScConditionMode eOper,
                                 const ScTokenArray* pArr1, const ScTokenArray* 
pArr2,
                                 ScDocument& rDocument, const ScAddress& rPos,
-                                const OUString& rStyle );
+                                OUString aStyle );
             ScCondFormatEntry( const ScCondFormatEntry& r );
             ScCondFormatEntry( ScDocument& rDocument, const ScCondFormatEntry& 
r );
     virtual ~ScCondFormatEntry() override;
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index 07d2740efa98..e10cf45f97e1 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -44,6 +44,7 @@
 #include <cppuhelper/implbase.hxx>
 
 #include <memory>
+#include <utility>
 #include <vector>
 
 namespace com::sun::star::sheet { struct DataPilotFieldAutoShowInfo; }
@@ -237,7 +238,7 @@ private:
     void                    Refreshed_Impl();
 
 public:
-                            ScDataPilotTableObj(ScDocShell& rDocSh, SCTAB nT, 
const OUString& rN);
+                            ScDataPilotTableObj(ScDocShell& rDocSh, SCTAB nT, 
OUString aN);
     virtual                 ~ScDataPilotTableObj() override;
 
     virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & 
rType ) override;
@@ -293,8 +294,8 @@ struct ScFieldIdentifier
     explicit     ScFieldIdentifier() :
                             mnFieldIdx( 0 ), mbDataLayout( false ) {}
 
-    explicit     ScFieldIdentifier( const OUString& rFieldName, bool 
bDataLayout ) :
-                            maFieldName( rFieldName ), mnFieldIdx( 0 ), 
mbDataLayout( bDataLayout ) {}
+    explicit     ScFieldIdentifier( OUString aFieldName, bool bDataLayout ) :
+                            maFieldName(std::move( aFieldName )), mnFieldIdx( 
0 ), mbDataLayout( bDataLayout ) {}
 };
 
 /** Base class of all implementation objects based on a DataPilot descriptor
@@ -303,7 +304,7 @@ class ScDataPilotChildObjBase
 {
 protected:
     explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& 
rParent );
-    explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& 
rParent, const ScFieldIdentifier& rFieldId );
+    explicit            ScDataPilotChildObjBase( ScDataPilotDescriptorBase& 
rParent, ScFieldIdentifier aFieldId );
     virtual             ~ScDataPilotChildObjBase();
 
     /** Returns the wrapped DataPilot object (calls GetDPObject() at parent). 
*/
@@ -401,7 +402,7 @@ public:
                         ScDataPilotFieldObj(
                             ScDataPilotDescriptorBase& rParent,
                             const ScFieldIdentifier& rIdent,
-                            const css::uno::Any& rOrient );
+                            css::uno::Any aOrient );
 
     virtual             ~ScDataPilotFieldObj() override;
 
@@ -560,7 +561,7 @@ ScDataPilotFieldGroupObjImpl;
 class ScDataPilotFieldGroupObj final : public ScDataPilotFieldGroupObjImpl
 {
 public:
-    explicit            ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& 
rParent, const OUString& rGroupName );
+    explicit            ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& 
rParent, OUString aGroupName );
     virtual             ~ScDataPilotFieldGroupObj() override;
 
                             // XNameAccess
@@ -613,7 +614,7 @@ ScDataPilotFieldGroupItemObjImpl;
 class ScDataPilotFieldGroupItemObj final : public 
ScDataPilotFieldGroupItemObjImpl
 {
 public:
-    explicit            ScDataPilotFieldGroupItemObj( 
ScDataPilotFieldGroupObj& rParent, const OUString& rName );
+    explicit            ScDataPilotFieldGroupItemObj( 
ScDataPilotFieldGroupObj& rParent, OUString aName );
     virtual             ~ScDataPilotFieldGroupItemObj() override;
 
                             // XNamed
diff --git a/sc/inc/datamapper.hxx b/sc/inc/datamapper.hxx
index 9188915db544..984e6cc81219 100644
--- a/sc/inc/datamapper.hxx
+++ b/sc/inc/datamapper.hxx
@@ -70,7 +70,7 @@ private:
     ScDocument* mpDoc;
 
 public:
-    ExternalDataSource(const OUString& rURL, const OUString& rProvider, 
ScDocument* pDoc);
+    ExternalDataSource(OUString aURL, OUString aProvider, ScDocument* pDoc);
 
     void setUpdateFrequency(double nUpdateFrequency);
 
diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx
index 0d692f51c61b..528496380806 100644
--- a/sc/inc/datauno.hxx
+++ b/sc/inc/datauno.hxx
@@ -413,7 +413,7 @@ private:
     void                    Refreshed_Impl();
 
 public:
-    ScDatabaseRangeObj(ScDocShell* pDocSh, const OUString& rNm);
+    ScDatabaseRangeObj(ScDocShell* pDocSh, OUString aNm);
     SC_DLLPUBLIC ScDatabaseRangeObj(ScDocShell* pDocSh, const SCTAB nTab);
     virtual ~ScDatabaseRangeObj() override;
 
diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx
index 21e3cc0f2ed3..6b6ace9523c5 100644
--- a/sc/inc/defaultsoptions.hxx
+++ b/sc/inc/defaultsoptions.hxx
@@ -44,7 +44,7 @@ public:
 class SC_DLLPUBLIC ScTpDefaultsItem final : public SfxPoolItem
 {
 public:
-    ScTpDefaultsItem( const ScDefaultsOptions& rOpt );
+    ScTpDefaultsItem( ScDefaultsOptions aOpt );
     virtual ~ScTpDefaultsItem() override;
 
     ScTpDefaultsItem(ScTpDefaultsItem const &) = default;
diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx
index b79e390016a3..400d53260939 100644
--- a/sc/inc/dpdimsave.hxx
+++ b/sc/inc/dpdimsave.hxx
@@ -50,7 +50,7 @@ class SC_DLLPUBLIC ScDPSaveGroupItem
     mutable std::vector<ScDPItemData> maItems;  ///< items converted from the 
strings.
 
 public:
-    ScDPSaveGroupItem( const OUString& rName );
+    ScDPSaveGroupItem( OUString aName );
     ~ScDPSaveGroupItem();
 
     ScDPSaveGroupItem(ScDPSaveGroupItem const &) = default;
@@ -96,8 +96,8 @@ class SC_DLLPUBLIC ScDPSaveGroupDimension
     sal_Int32               nDatePart;
 
 public:
-                ScDPSaveGroupDimension( const OUString& rSource, const 
OUString& rName );
-                ScDPSaveGroupDimension( const OUString& rSource, const 
OUString& rName, const ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart );
+                ScDPSaveGroupDimension( OUString aSource, OUString aName );
+                ScDPSaveGroupDimension( OUString aSource, OUString aName, 
const ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart );
 
     void    AddToData( ScDPGroupTableData& rData ) const;
     void AddToCache(ScDPCache& rCache) const;
@@ -140,8 +140,8 @@ class SC_DLLPUBLIC ScDPSaveNumGroupDimension
     sal_Int32           nDatePart;
 
 public:
-                ScDPSaveNumGroupDimension( const OUString& rName, const 
ScDPNumGroupInfo& rInfo );
-                ScDPSaveNumGroupDimension( const OUString& rName, const 
ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart );
+                ScDPSaveNumGroupDimension( OUString aName, const 
ScDPNumGroupInfo& rInfo );
+                ScDPSaveNumGroupDimension( OUString aName, const 
ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart );
 
     void        AddToData( ScDPGroupTableData& rData ) const;
     void AddToCache(ScDPCache& rCache) const;
diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx
index f7dd09b0de2f..4f4efdda3924 100644
--- a/sc/inc/dpgroup.hxx
+++ b/sc/inc/dpgroup.hxx
@@ -58,7 +58,7 @@ class ScDPGroupDimension
     mutable std::vector<SCROW> maMemberEntries;
     bool mbDateDimension;
 public:
-                ScDPGroupDimension( tools::Long nSource, const OUString& 
rNewName );
+                ScDPGroupDimension( tools::Long nSource, OUString aNewName );
                 ScDPGroupDimension( const ScDPGroupDimension& rOther );
                 ~ScDPGroupDimension();
 
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 3552f14fb657..68715b1b4f92 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -74,8 +74,8 @@ struct ScDPServiceDesc
     OUString aParUser;
     OUString aParPass;
 
-    ScDPServiceDesc( const OUString& rServ, const OUString& rSrc, const 
OUString& rNam,
-                     const OUString& rUser, const OUString& rPass );
+    ScDPServiceDesc( OUString aServ, OUString aSrc, OUString aNam,
+                     OUString aUser, OUString aPass );
 
     bool operator== ( const ScDPServiceDesc& rOther ) const;
 };
@@ -343,7 +343,7 @@ public:
         sal_Int32 mnSdbType;
         OUString maDBName;
         OUString maCommand;
-        DBType(sal_Int32 nSdbType, const OUString& rDBName, const OUString& 
rCommand);
+        DBType(sal_Int32 nSdbType, OUString aDBName, OUString aCommand);
 
         struct less
         {
diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx
index 30334147a70c..f9ee70ac6536 100644
--- a/sc/inc/dpoutput.hxx
+++ b/sc/inc/dpoutput.hxx
@@ -99,7 +99,7 @@ private:
 
 public:
                     ScDPOutput( ScDocument* pD,
-                                const css::uno::Reference< 
css::sheet::XDimensionsSupplier>& xSrc,
+                                css::uno::Reference< 
css::sheet::XDimensionsSupplier> xSrc,
                                 const ScAddress& rPos, bool bFilter );
                     ~ScDPOutput();
 
diff --git a/sc/inc/dpresfilter.hxx b/sc/inc/dpresfilter.hxx
index 379989788559..ff8d28de939f 100644
--- a/sc/inc/dpresfilter.hxx
+++ b/sc/inc/dpresfilter.hxx
@@ -35,7 +35,7 @@ struct ScDPResultFilter
     bool mbHasValue : 1;
     bool mbDataLayout : 1;
 
-    ScDPResultFilter(const OUString& rDimName, bool bDataLayout);
+    ScDPResultFilter(OUString aDimName, bool bDataLayout);
 };
 
 /**
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index bdf5434b5287..78d31f96643b 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -57,7 +57,7 @@ private:
     sal_uInt16 nShowDetailsMode;
 
 public:
-    ScDPSaveMember(const OUString& rName);
+    ScDPSaveMember(OUString aName);
     ScDPSaveMember(const ScDPSaveMember& r);
     ~ScDPSaveMember();
 
@@ -119,7 +119,7 @@ private:
     MemberList maMemberList;
 
 public:
-    ScDPSaveDimension(const OUString& rName, bool bDataLayout);
+    ScDPSaveDimension(OUString aName, bool bDataLayout);
     ScDPSaveDimension(const ScDPSaveDimension& r);
     ~ScDPSaveDimension();
 
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 3c36115b8ee5..55c1031d099a 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -111,7 +111,7 @@ private:
     void            ResizeLastRectFromAnchor( const SdrObject* pObj, 
ScDrawObjData& rData, bool bNegativePage, bool bCanResize );
 
 public:
-                    ScDrawLayer( ScDocument* pDocument, const OUString& rName 
);
+                    ScDrawLayer( ScDocument* pDocument, OUString aName );
     virtual         ~ScDrawLayer() override;
 
     virtual rtl::Reference<SdrPage> AllocPage(bool bMasterPage) override;
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 92188ecea9d6..02a0b28e11f1 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -88,7 +88,7 @@ public:
         OUString maUpperName;
         OUString maRealName;
 
-        explicit TableName(const OUString& rUpper, const OUString& rReal);
+        explicit TableName(OUString aUpper, OUString aReal);
     };
 
     struct CellFormat
diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index c8e50f3642ca..89160dfa055f 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -70,7 +70,7 @@ private:
 
 public:
     ScCellFieldsObj(
-        const css::uno::Reference<css::text::XTextRange>& xContent,
+        css::uno::Reference<css::text::XTextRange> xContent,
         ScDocShell* pDocSh, const ScAddress& rPos);
     virtual ~ScCellFieldsObj() override;
 
@@ -197,7 +197,7 @@ private:
 
 public:
     ScEditFieldObj(
-        const css::uno::Reference<css::text::XTextRange>& rContent,
+        css::uno::Reference<css::text::XTextRange> xContent,
         std::unique_ptr<ScEditSource> pEditSrc, sal_Int32 eType, const 
ESelection& rSel);
     virtual ~ScEditFieldObj() override;
 
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index d8d26fe0603c..75d4c099ca55 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -126,7 +126,7 @@ private:
 
 public:
                             ScTableConditionalEntry() = delete;
-                            ScTableConditionalEntry(const 
ScCondFormatEntryItem& aItem);
+                            ScTableConditionalEntry(ScCondFormatEntryItem 
aItem);
     virtual                 ~ScTableConditionalEntry() override;
 
     void                    GetData(ScCondFormatEntryItem& rData) const;
diff --git a/sc/inc/formulaopt.hxx b/sc/inc/formulaopt.hxx
index 7b7d173f4716..de46b52643c8 100644
--- a/sc/inc/formulaopt.hxx
+++ b/sc/inc/formulaopt.hxx
@@ -77,7 +77,7 @@ public:
 class SC_DLLPUBLIC ScTpFormulaItem final : public SfxPoolItem
 {
 public:
-    ScTpFormulaItem( const ScFormulaOptions& rOpt );
+    ScTpFormulaItem( ScFormulaOptions aOpt );
     virtual ~ScTpFormulaItem() override;
 
     ScTpFormulaItem(ScTpFormulaItem const &) = default;
diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx
index c2f00c3da422..52be625b7b82 100644
--- a/sc/inc/formularesult.hxx
+++ b/sc/inc/formularesult.hxx
@@ -40,7 +40,7 @@ struct FormulaResultValue
 
     FormulaResultValue();
     FormulaResultValue( double fValue );
-    FormulaResultValue( const svl::SharedString& rStr );
+    FormulaResultValue( svl::SharedString aStr );
     FormulaResultValue( FormulaError nErr );
 };
 
diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx
index 02fcd9c4cfed..d890072c1f81 100644
--- a/sc/inc/hints.hxx
+++ b/sc/inc/hints.hxx
@@ -104,8 +104,8 @@ class ScAutoStyleHint final : public SfxHint
     sal_uLong   nTimeout;
 
 public:
-                    ScAutoStyleHint( const ScRange& rR, const OUString& rSt1,
-                                        sal_uLong nT, const OUString& rSt2 );
+                    ScAutoStyleHint( const ScRange& rR, OUString aSt1,
+                                        sal_uLong nT, OUString aSt2 );
                     virtual ~ScAutoStyleHint() override;
 
     const ScRange&  GetRange() const    { return aRange; }
@@ -130,7 +130,7 @@ class ScDataPilotModifiedHint final : public SfxHint
     OUString        maName;
 
 public:
-                    ScDataPilotModifiedHint( const OUString& rName );
+                    ScDataPilotModifiedHint( OUString aName );
                     virtual ~ScDataPilotModifiedHint() override;
 
     const OUString&   GetName() const { return maName; }
diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx
index 00b84ad1efa1..855bb228432d 100644
--- a/sc/inc/linkuno.hxx
+++ b/sc/inc/linkuno.hxx
@@ -65,7 +65,7 @@ private:
     void                    ModifyRefreshDelay_Impl( sal_Int32 nRefresh );
 
 public:
-                            ScSheetLinkObj(ScDocShell* pDocSh, const OUString& 
rName);
+                            ScSheetLinkObj(ScDocShell* pDocSh, OUString aName);
     virtual                 ~ScSheetLinkObj() override;
 
     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint 
) override;
@@ -283,8 +283,8 @@ private:
     void                    Refreshed_Impl();
 
 public:
-                            ScDDELinkObj(ScDocShell* pDocSh, const OUString& 
rA,
-                                            const OUString& rT, const 
OUString& rI);
+                            ScDDELinkObj(ScDocShell* pDocSh, OUString aA,
+                                            OUString aT, OUString aI);
     virtual                 ~ScDDELinkObj() override;
 
     virtual void            Notify( SfxBroadcaster& rBC, const SfxHint& rHint 
) override;
@@ -365,7 +365,7 @@ public:
 class ScExternalSheetCacheObj final : public cppu::WeakImplHelper< 
css::sheet::XExternalSheetCache >
 {
 public:
-    explicit ScExternalSheetCacheObj(ScDocShell* pDocShell, 
ScExternalRefCache::TableTypeRef const & pTable, size_t nIndex);
+    explicit ScExternalSheetCacheObj(ScDocShell* pDocShell, 
ScExternalRefCache::TableTypeRef pTable, size_t nIndex);
     virtual ~ScExternalSheetCacheObj() override;
 
                             // XExternalSheetCache
diff --git a/sc/inc/listenercalls.hxx b/sc/inc/listenercalls.hxx
index acb009937fa1..70bc9e14878e 100644
--- a/sc/inc/listenercalls.hxx
+++ b/sc/inc/listenercalls.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include <list>
+#include <utility>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/lang/EventObject.hpp>
 
@@ -35,10 +36,10 @@ struct ScUnoListenerEntry
         css::util::XModifyListener >   xListener;
     css::lang::EventObject             aEvent;
 
-    ScUnoListenerEntry( const css::uno::Reference< css::util::XModifyListener 
>& rL,
-                        const css::lang::EventObject& rE ) :
-        xListener( rL ),
-        aEvent( rE )
+    ScUnoListenerEntry( css::uno::Reference< css::util::XModifyListener > xL,
+                        css::lang::EventObject aE ) :
+        xListener(std::move( xL )),
+        aEvent(std::move( aE ))
     {}
 };
 
diff --git a/sc/inc/listenercontext.hxx b/sc/inc/listenercontext.hxx
index e97eb9d89aae..964f62a5c1cc 100644
--- a/sc/inc/listenercontext.hxx
+++ b/sc/inc/listenercontext.hxx
@@ -32,7 +32,7 @@ public:
     StartListeningContext(const StartListeningContext&) = delete;
     const StartListeningContext& operator=(const StartListeningContext&) = 
delete;
     StartListeningContext(ScDocument& rDoc);
-    StartListeningContext(ScDocument& rDoc, const 
std::shared_ptr<ColumnBlockPositionSet>& pSet);
+    StartListeningContext(ScDocument& rDoc, 
std::shared_ptr<ColumnBlockPositionSet> pSet);
     void setColumnSet(const std::shared_ptr<const ColumnSet>& pColSet);
     const std::shared_ptr<const ColumnSet>& getColumnSet() const;
     ScDocument& getDoc() { return mrDoc; }
@@ -52,7 +52,7 @@ public:
     EndListeningContext(const EndListeningContext&) = delete;
     const EndListeningContext& operator=(const EndListeningContext&) = delete;
     EndListeningContext(ScDocument& rDoc, ScTokenArray* pOldCode = nullptr);
-    EndListeningContext(ScDocument& rDoc, const 
std::shared_ptr<ColumnBlockPositionSet>& pSet,
+    EndListeningContext(ScDocument& rDoc, 
std::shared_ptr<ColumnBlockPositionSet> pSet,
                         ScTokenArray* pOldCode = nullptr);
 
     void setPositionDelta(const ScAddress& rDelta);
diff --git a/sc/inc/matrixoperators.hxx b/sc/inc/matrixoperators.hxx
index b5771a290faf..cd0295bb20df 100644
--- a/sc/inc/matrixoperators.hxx
+++ b/sc/inc/matrixoperators.hxx
@@ -11,6 +11,7 @@
 
 
 #include <functional>
+#include <utility>
 #include <vector>
 #include "kahan.hxx"
 
@@ -23,7 +24,7 @@ struct Op_
     const double mInitVal;
     const T maOp;
     Op_(double InitVal, T aOp):
-        mInitVal(InitVal), maOp(aOp)
+        mInitVal(InitVal), maOp(std::move(aOp))
     {
     }
     void operator()(tRes& rAccum, double fVal) const
diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx
index b0e28cf66aa4..1a17e7afe7ea 100644
--- a/sc/inc/miscuno.hxx
+++ b/sc/inc/miscuno.hxx
@@ -104,8 +104,8 @@ private:
     sal_Int32               nPos;
 
 public:
-                            ScIndexEnumeration(const css::uno::Reference<
-                                css::container::XIndexAccess>& rInd, const 
OUString& rServiceName);
+                            ScIndexEnumeration(css::uno::Reference<
+                                css::container::XIndexAccess> xInd, OUString 
aServiceName);
     virtual                 ~ScIndexEnumeration() override;
 
                             // XEnumeration
@@ -129,7 +129,7 @@ private:
 
 public:
                             ScNameToIndexAccess(
-                                const css::uno::Reference< 
css::container::XNameAccess>& rNameObj );
+                                css::uno::Reference< 
css::container::XNameAccess> xNameObj );
     virtual                 ~ScNameToIndexAccess() override;
 
                             // XIndexAccess
diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx
index a286266cd2ed..4cd5423cfc0b 100644
--- a/sc/inc/nameuno.hxx
+++ b/sc/inc/nameuno.hxx
@@ -67,7 +67,7 @@ friend class ScVbaName;
     SCTAB                   GetTab_Impl();
 
 public:
-                            ScNamedRangeObj( rtl::Reference< ScNamedRangesObj 
> const & xParent, ScDocShell* pDocSh, const OUString& rNm,
+                            ScNamedRangeObj( rtl::Reference< ScNamedRangesObj 
> xParent, ScDocShell* pDocSh, OUString aNm,
                                     css::uno::Reference< 
css::container::XNamed > const & xSheet = css::uno::Reference< 
css::container::XNamed > ());
     virtual                 ~ScNamedRangeObj() override;
 
@@ -241,7 +241,7 @@ private:
 
     css::uno::Reference< css::container::XNamed > mxSheet;
 public:
-                            ScLocalNamedRangesObj(ScDocShell* pDocSh, 
css::uno::Reference< css::container::XNamed > const & xNamed );
+                            ScLocalNamedRangesObj(ScDocShell* pDocSh, 
css::uno::Reference< css::container::XNamed > xNamed );
     virtual                 ~ScLocalNamedRangesObj() override;
 };
 
diff --git a/sc/inc/orcusxml.hxx b/sc/inc/orcusxml.hxx
index 3cb2981e70b2..c59bf100b32e 100644
--- a/sc/inc/orcusxml.hxx
+++ b/sc/inc/orcusxml.hxx
@@ -61,7 +61,7 @@ struct ScOrcusImportXMLParam
         ScAddress maPos;
         OString maPath;
 
-        CellLink(const ScAddress& rPos, const OString& rPath);
+        CellLink(const ScAddress& rPos, OString aPath);
     };
 
     struct RangeLink
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index a0d1883ada60..10f3f7161473 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -60,7 +60,7 @@ struct SC_DLLPUBLIC ScDPName
     sal_uInt8    mnDupCount;
 
     ScDPName();
-    explicit ScDPName(const OUString& rName, const OUString& rLayoutName, 
sal_uInt8 nDupCount);
+    explicit ScDPName(OUString aName, OUString aLayoutName, sal_uInt8 
nDupCount);
 };
 
 struct ScDPLabelData
diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index dd3475ebb9f9..8a94402b88ad 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -181,7 +181,7 @@ public:
      */
     explicit            ScPostIt(
                             ScDocument& rDoc, const ScAddress& rPos,
-                            const ScNoteData& rNoteData, bool 
bAlwaysCreateCaption, sal_uInt32 nPostItId = 0  );
+                            ScNoteData aNoteData, bool bAlwaysCreateCaption, 
sal_uInt32 nPostItId = 0  );
 
     /** Removes the caption object from drawing layer, if this note is its 
owner. */
                         ~ScPostIt();
diff --git a/sc/inc/reffind.hxx b/sc/inc/reffind.hxx
index c7e30c4c0730..419bf56a6976 100644
--- a/sc/inc/reffind.hxx
+++ b/sc/inc/reffind.hxx
@@ -34,7 +34,7 @@ class ScRefFinder
     sal_Int32 mnSelEnd;
 
 public:
-    ScRefFinder(const OUString& rFormula, const ScAddress& rPos, ScDocument& 
rDoc,
+    ScRefFinder(OUString aFormula, const ScAddress& rPos, ScDocument& rDoc,
                 formula::FormulaGrammar::AddressConvention eConvP
                 = formula::FormulaGrammar::CONV_OOO);
     ~ScRefFinder();
diff --git a/sc/inc/sheetdata.hxx b/sc/inc/sheetdata.hxx
index 2e975e663938..55dba5a28234 100644
--- a/sc/inc/sheetdata.hxx
+++ b/sc/inc/sheetdata.hxx
@@ -22,6 +22,7 @@
 #include <editeng/editdata.hxx>
 #include <map>
 #include <unordered_set>
+#include <utility>
 #include <vector>
 
 #include "address.hxx"
@@ -52,8 +53,8 @@ struct ScCellStyleEntry
     OUString   maName;
     ScAddress       maCellPos;
 
-                ScCellStyleEntry( const OUString& rName, const ScAddress& rPos 
) :
-                    maName(rName),
+                ScCellStyleEntry( OUString aName, const ScAddress& rPos ) :
+                    maName(std::move(aName)),
                     maCellPos(rPos)
                 {
                 }
@@ -65,9 +66,9 @@ struct ScNoteStyleEntry
     OUString   maTextStyle;
     ScAddress       maCellPos;
 
-                ScNoteStyleEntry( const OUString& rStyle, const OUString& 
rText, const ScAddress& rPos ) :
-                    maStyleName(rStyle),
-                    maTextStyle(rText),
+                ScNoteStyleEntry( OUString aStyle, OUString aText, const 
ScAddress& rPos ) :
+                    maStyleName(std::move(aStyle)),
+                    maTextStyle(std::move(aText)),
                     maCellPos(rPos)
                 {
                 }
@@ -79,8 +80,8 @@ struct ScTextStyleEntry
     ScAddress       maCellPos;
     ESelection      maSelection;
 
-                ScTextStyleEntry( const OUString& rName, const ScAddress& 
rPos, const ESelection& rSel ) :
-                    maName(rName),
+                ScTextStyleEntry( OUString aName, const ScAddress& rPos, const 
ESelection& rSel ) :
+                    maName(std::move(aName)),
                     maCellPos(rPos),
                     maSelection(rSel)
                 {
@@ -93,9 +94,9 @@ struct ScLoadedNamespaceEntry
     OUString   maName;
     sal_uInt16      mnKey;
 
-                ScLoadedNamespaceEntry( const OUString& rPrefix, const 
OUString& rName, sal_uInt16 nKey ) :
-                    maPrefix(rPrefix),
-                    maName(rName),
+                ScLoadedNamespaceEntry( OUString aPrefix, OUString aName, 
sal_uInt16 nKey ) :
+                    maPrefix(std::move(aPrefix)),
+                    maName(std::move(aName)),
                     mnKey(nKey)
                 {
                 }
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx
index 8fdb9f94dbdb..b09a95b71960 100644
--- a/sc/inc/styleuno.hxx
+++ b/sc/inc/styleuno.hxx
@@ -193,7 +193,7 @@ private:
 
 public:
                             ScStyleObj() = delete;
-                            ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily 
eFam, const OUString& rName);
+                            ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily 
eFam, OUString aName);
     virtual                 ~ScStyleObj() override;
 
                             // created by getImplementation:
diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx
index b429fd0b9b84..6233ddc912fd 100644
--- a/sc/inc/tablink.hxx
+++ b/sc/inc/tablink.hxx
@@ -43,10 +43,10 @@ private:
     bool bAddUndo:1;
 
 public:
-    ScTableLink( ScDocShell* pDocSh, const OUString& rFile,
-                    const OUString& rFilter, const OUString& rOpt, sal_Int32 
nRefreshDelaySeconds );
-    ScTableLink( SfxObjectShell* pShell, const OUString& rFile,
-                    const OUString& rFilter, const OUString& rOpt, sal_Int32 
nRefreshDelaySeconds );
+    ScTableLink( ScDocShell* pDocSh, OUString aFile,
+                    OUString aFilter, OUString aOpt, sal_Int32 
nRefreshDelaySeconds );
+    ScTableLink( SfxObjectShell* pShell, OUString aFile,
+                    OUString aFilter, OUString aOpt, sal_Int32 
nRefreshDelaySeconds );
     virtual ~ScTableLink() override;
     virtual void Closed() override;
     virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
diff --git a/sc/inc/targuno.hxx b/sc/inc/targuno.hxx
index 884cfd310c6f..db62333db1c7 100644
--- a/sc/inc/targuno.hxx
+++ b/sc/inc/targuno.hxx
@@ -122,7 +122,7 @@ private:
     css::uno::Reference< css::container::XNameAccess >            xCollection;
 
 public:
-                            ScLinkTargetsObj( const css::uno::Reference< 
css::container::XNameAccess > & rColl );
+                            ScLinkTargetsObj( css::uno::Reference< 
css::container::XNameAccess > xColl );
     virtual                 ~ScLinkTargetsObj() override;
 
                             // css::container::XNameAccess
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx
index bb37c431bc14..55136ef2348c 100644
--- a/sc/inc/textuno.hxx
+++ b/sc/inc/textuno.hxx
@@ -113,7 +113,7 @@ public:
     ScHeaderFooterTextData(const ScHeaderFooterTextData&) = delete;
     const ScHeaderFooterTextData& operator=(const ScHeaderFooterTextData&) = 
delete;
     ScHeaderFooterTextData(
-        css::uno::WeakReference<css::sheet::XHeaderFooterContent> const & 
xContent, ScHeaderFooterPart nP, const EditTextObject* pTextObj);
+        css::uno::WeakReference<css::sheet::XHeaderFooterContent> xContent, 
ScHeaderFooterPart nP, const EditTextObject* pTextObj);
     ~ScHeaderFooterTextData();
 
                             // helper functions
@@ -271,7 +271,7 @@ private:
     css::uno::Reference< css::text::XText > xParentText;
 
 public:
-                            ScDrawTextCursor( const css::uno::Reference< 
css::text::XText >& xParent,
+                            ScDrawTextCursor( css::uno::Reference< 
css::text::XText > xParent,
                                             const SvxUnoTextBase& rText );
     virtual                  ~ScDrawTextCursor() noexcept override;
 
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index 8916ee3e4d3e..996915818445 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -95,7 +95,7 @@ class ScMatrixToken final : public formula::FormulaToken
 private:
             ScMatrixRef         pMatrix;
 public:
-    ScMatrixToken( const ScMatrixRef& p );
+    ScMatrixToken( ScMatrixRef p );
     ScMatrixToken( const ScMatrixToken& );
 
     virtual const ScMatrix*     GetMatrix() const override;
@@ -133,7 +133,7 @@ class ScExternalSingleRefToken final : public 
formula::FormulaToken
     ScSingleRefData             maSingleRef;
 
 public:
-    ScExternalSingleRefToken( sal_uInt16 nFileId, const svl::SharedString& 
rTabName, const ScSingleRefData& r );
+    ScExternalSingleRefToken( sal_uInt16 nFileId, svl::SharedString aTabName, 
const ScSingleRefData& r );
     ScExternalSingleRefToken() = delete;
     virtual ~ScExternalSingleRefToken() override;
 
@@ -158,7 +158,7 @@ class ScExternalDoubleRefToken final : public 
formula::FormulaToken
 
 public:
     ScExternalDoubleRefToken() = delete;
-    ScExternalDoubleRefToken( sal_uInt16 nFileId, const svl::SharedString& 
rTabName, const ScComplexRefData& r );
+    ScExternalDoubleRefToken( sal_uInt16 nFileId, svl::SharedString aTabName, 
const ScComplexRefData& r );
     virtual ~ScExternalDoubleRefToken() override;
 
     ScExternalDoubleRefToken(ScExternalDoubleRefToken const &) = default;
@@ -185,7 +185,7 @@ class ScExternalNameToken final : public 
formula::FormulaToken
 
 public:
     ScExternalNameToken() = delete;
-    ScExternalNameToken( sal_uInt16 nFileId, const svl::SharedString& rName );
+    ScExternalNameToken( sal_uInt16 nFileId, svl::SharedString aName );
     virtual ~ScExternalNameToken() override;
 
     ScExternalNameToken(ScExternalNameToken const &) = default;
@@ -301,7 +301,7 @@ protected:
     ScConstMatrixRef xMatrix;
     formula::FormulaConstTokenRef     xUpperLeft;
 public:
-    ScMatrixCellResultToken( const ScConstMatrixRef& pMat, const 
formula::FormulaToken* pUL );
+    ScMatrixCellResultToken( ScConstMatrixRef pMat, const 
formula::FormulaToken* pUL );
     ScMatrixCellResultToken( const ScMatrixCellResultToken& );
     virtual ~ScMatrixCellResultToken() override;
     virtual double              GetDouble() const override;
@@ -384,7 +384,7 @@ private:
     bool mbEmptyDisplayedAsString;
 public:
     ScHybridCellToken(
-        double f, const svl::SharedString & rStr, const OUString & rFormula, 
bool bEmptyDisplayedAsString );
+        double f, const svl::SharedString & rStr, OUString aFormula, bool 
bEmptyDisplayedAsString );
 
     const OUString& GetFormula() const  { return maFormula; }
     bool IsEmptyDisplayedAsString() const   { return mbEmptyDisplayedAsString; 
}
diff --git a/sc/inc/typedstrdata.hxx b/sc/inc/typedstrdata.hxx
index 25406d0e5f52..b4a9bc5d37c6 100644
--- a/sc/inc/typedstrdata.hxx
+++ b/sc/inc/typedstrdata.hxx
@@ -85,7 +85,7 @@ class FindTypedStrData
     ScTypedStrData maVal;
     bool mbCaseSens;
 public:
-    FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens);
+    FindTypedStrData(ScTypedStrData aVal, bool bCaseSens);
     bool operator() (const ScTypedStrData& r) const;
 };
 
diff --git a/sc/inc/unoreflist.hxx b/sc/inc/unoreflist.hxx
index 2ac239be5ed2..fb045c943441 100644
--- a/sc/inc/unoreflist.hxx
+++ b/sc/inc/unoreflist.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#include <utility>
 #include <vector>
 #include <svl/hint.hxx>
 #include "rangelst.hxx"
@@ -28,9 +29,9 @@ struct ScUnoRefEntry
     sal_Int64   nObjectId;
     ScRangeList aRanges;
 
-    ScUnoRefEntry( sal_Int64 nId, const ScRangeList& rOldRanges ) :
+    ScUnoRefEntry( sal_Int64 nId, ScRangeList aOldRanges ) :
         nObjectId( nId ),
-        aRanges( rOldRanges )
+        aRanges(std::move( aOldRanges ))
     {
     }
 };
@@ -61,7 +62,7 @@ class ScUnoRefUndoHint final : public SfxHint
     ScUnoRefEntry   aEntry;
 
 public:
-                ScUnoRefUndoHint( const ScUnoRefEntry& rRefEntry );
+                ScUnoRefUndoHint( ScUnoRefEntry aRefEntry );
                 virtual ~ScUnoRefUndoHint() override;
 
     sal_Int64   GetObjectId() const         { return aEntry.nObjectId; }
diff --git a/sc/inc/userlist.hxx b/sc/inc/userlist.hxx
index dbefe744498d..e91fbcc0164e 100644
--- a/sc/inc/userlist.hxx
+++ b/sc/inc/userlist.hxx
@@ -36,7 +36,7 @@ public:
     {
         OUString maReal;
         OUString maUpper;
-        SubStr(const OUString& rReal, const OUString& rUpper);
+        SubStr(OUString aReal, OUString aUpper);
     };
 
 private:
@@ -47,7 +47,7 @@ private:
     SAL_DLLPRIVATE void InitTokens();
 
 public:
-    ScUserListData(const OUString& rStr);
+    ScUserListData(OUString aStr);
     ScUserListData(const ScUserListData& rData);
     ~ScUserListData();
 
diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index 776f49a2af2f..3dc881361f0e 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -83,7 +83,7 @@ class ScXMLImportWrapper
 public:
 
     ScXMLImportWrapper(
-        ScDocShell& rDocSh, SfxMedium* pM, const 
css::uno::Reference<css::embed::XStorage>& xStor );
+        ScDocShell& rDocSh, SfxMedium* pM, 
css::uno::Reference<css::embed::XStorage> xStor );
 
     bool Import( ImportFlags nMode, ErrCode& rError );
     bool Export(bool bStylesOnly);
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 2f99226a208f..9fa08657e328 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -59,6 +59,7 @@
 #include <svl/numformat.hxx>
 #include <svl/zforlist.hxx>
 #include <svl/broadcast.hxx>
+#include <utility>
 #include <vcl/outdev.hxx>
 #include <formula/errorcodes.hxx>
 #include <formula/vectortoken.hxx>
@@ -1134,7 +1135,7 @@ protected:
         SCROW mnRow;
         OUString maStr;
 
-        StrEntry(SCROW nRow, const OUString& rStr) : mnRow(nRow), maStr(rStr) 
{}
+        StrEntry(SCROW nRow, OUString aStr) : mnRow(nRow), 
maStr(std::move(aStr)) {}
     };
 
     std::vector<StrEntry> maStrEntries;
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 61fdf2fc8b87..8022072ee630 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -44,6 +44,7 @@
 #include <svl/sharedstringpool.hxx>
 #include <memory>
 #include <numeric>
+#include <utility>
 
 using namespace formula;
 
@@ -1459,13 +1460,13 @@ bool ScConditionEntry::NeedsRepaint() const
 ScCondFormatEntry::ScCondFormatEntry( ScConditionMode eOper,
                                         const OUString& rExpr1, const 
OUString& rExpr2,
                                         ScDocument& rDocument, const 
ScAddress& rPos,
-                                        const OUString& rStyle,
+                                        OUString aStyle,
                                         const OUString& rExprNmsp1, const 
OUString& rExprNmsp2,
                                         FormulaGrammar::Grammar eGrammar1,
                                         FormulaGrammar::Grammar eGrammar2,
                                         ScFormatEntry::Type eType ) :
     ScConditionEntry( eOper, rExpr1, rExpr2, rDocument, rPos, rExprNmsp1, 
rExprNmsp2, eGrammar1, eGrammar2, eType ),
-    aStyleName( rStyle ),
+    aStyleName(std::move( aStyle )),
     eCondFormatType( eType )
 {
 }
@@ -1473,9 +1474,9 @@ ScCondFormatEntry::ScCondFormatEntry( ScConditionMode 
eOper,
 ScCondFormatEntry::ScCondFormatEntry( ScConditionMode eOper,
                                         const ScTokenArray* pArr1, const 
ScTokenArray* pArr2,
                                         ScDocument& rDocument, const 
ScAddress& rPos,
-                                        const OUString& rStyle ) :
+                                        OUString aStyle ) :
     ScConditionEntry( eOper, pArr1, pArr2, rDocument, rPos ),
-    aStyleName( rStyle )
+    aStyleName(std::move( aStyle ))
 {
 }
 
diff --git a/sc/source/core/data/dpdimsave.cxx 
b/sc/source/core/data/dpdimsave.cxx
index 07ba25f0acef..63811dc1f713 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -33,11 +33,12 @@
 
 #include <globstr.hrc>
 #include <scresid.hxx>
+#include <utility>
 
 using namespace com::sun::star;
 
-ScDPSaveGroupItem::ScDPSaveGroupItem( const OUString& rName ) :
-    aGroupName(rName) {}
+ScDPSaveGroupItem::ScDPSaveGroupItem( OUString aName ) :
+    aGroupName(std::move(aName)) {}
 
 ScDPSaveGroupItem::~ScDPSaveGroupItem() {}
 
@@ -123,16 +124,16 @@ void ScDPSaveGroupItem::AddToData(ScDPGroupDimension& 
rDataDim) const
     rDataDim.AddItem(aGroup);
 }
 
-ScDPSaveGroupDimension::ScDPSaveGroupDimension( const OUString& rSource, const 
OUString& rName ) :
-    aSourceDim( rSource ),
-    aGroupDimName( rName ),
+ScDPSaveGroupDimension::ScDPSaveGroupDimension( OUString aSource, OUString 
aName ) :
+    aSourceDim(std::move( aSource )),
+    aGroupDimName(std::move( aName )),
     nDatePart( 0 )
 {
 }
 
-ScDPSaveGroupDimension::ScDPSaveGroupDimension( const OUString& rSource, const 
OUString& rName, const ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart ) :
-    aSourceDim( rSource ),
-    aGroupDimName( rName ),
+ScDPSaveGroupDimension::ScDPSaveGroupDimension( OUString aSource, OUString 
aName, const ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart ) :
+    aSourceDim(std::move( aSource )),
+    aGroupDimName(std::move( aName )),
     aDateInfo( rDateInfo ),
     nDatePart( nPart )
 {
@@ -390,15 +391,15 @@ void ScDPSaveGroupDimension::AddToCache(ScDPCache& 
rCache) const
     }
 }
 
-ScDPSaveNumGroupDimension::ScDPSaveNumGroupDimension( const OUString& rName, 
const ScDPNumGroupInfo& rInfo ) :
-    aDimensionName( rName ),
+ScDPSaveNumGroupDimension::ScDPSaveNumGroupDimension( OUString aName, const 
ScDPNumGroupInfo& rInfo ) :
+    aDimensionName(std::move( aName )),
     aGroupInfo( rInfo ),
     nDatePart( 0 )
 {
 }
 
-ScDPSaveNumGroupDimension::ScDPSaveNumGroupDimension( const OUString& rName, 
const ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart ) :
-    aDimensionName( rName ),
+ScDPSaveNumGroupDimension::ScDPSaveNumGroupDimension( OUString aName, const 
ScDPNumGroupInfo& rDateInfo, sal_Int32 nPart ) :
+    aDimensionName(std::move( aName )),
     aDateInfo( rDateInfo ),
     nDatePart( nPart )
 {
@@ -537,14 +538,14 @@ namespace {
 struct ScDPSaveGroupDimNameFunc
 {
     OUString       maDimName;
-    explicit     ScDPSaveGroupDimNameFunc( const OUString& rDimName ) : 
maDimName( rDimName ) {}
+    explicit     ScDPSaveGroupDimNameFunc( OUString aDimName ) : 
maDimName(std::move( aDimName )) {}
     bool         operator()( const ScDPSaveGroupDimension& rGroupDim ) const { 
return rGroupDim.GetGroupDimName() == maDimName; }
 };
 
 struct ScDPSaveGroupSourceNameFunc
 {
     OUString       maSrcDimName;
-    explicit     ScDPSaveGroupSourceNameFunc( const OUString& rSrcDimName ) : 
maSrcDimName( rSrcDimName ) {}
+    explicit     ScDPSaveGroupSourceNameFunc( OUString aSrcDimName ) : 
maSrcDimName(std::move( aSrcDimName )) {}
     bool         operator()( const ScDPSaveGroupDimension& rGroupDim ) const { 
return rGroupDim.GetSourceDimName() == maSrcDimName; }
 };
 
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 52bc6476f01a..336388a36daf 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -32,6 +32,7 @@
 
 #include <unordered_map>
 #include <unordered_set>
+#include <utility>
 #include <vector>
 #include <algorithm>
 
@@ -330,10 +331,10 @@ void ScDPGroupItem::FillGroupFilter( 
ScDPFilteredCache::GroupFilter& rFilter ) c
         rFilter.addMatchItem(rElement);
 }
 
-ScDPGroupDimension::ScDPGroupDimension( tools::Long nSource, const OUString& 
rNewName ) :
+ScDPGroupDimension::ScDPGroupDimension( tools::Long nSource, OUString aNewName 
) :
     nSourceDim( nSource ),
     nGroupDim( -1 ),
-    aGroupName( rNewName ),
+    aGroupName(std::move( aNewName )),
     mbDateDimension(false)
 {
 }
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index fc31af3c6e28..e00edf12593f 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -73,6 +73,7 @@
 #include <svl/numformat.hxx>
 #include <tools/diagnose_ex.h>
 #include <svl/zforlist.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 
@@ -120,7 +121,7 @@ class DBConnector : public ScDPCache::DBConnector
     Date maNullDate;
 
 public:
-    DBConnector(ScDPCache& rCache, const uno::Reference<sdbc::XRowSet>& 
xRowSet, const Date& rNullDate);
+    DBConnector(ScDPCache& rCache, uno::Reference<sdbc::XRowSet> xRowSet, 
const Date& rNullDate);
 
     bool isValid() const;
 
@@ -132,8 +133,8 @@ public:
     virtual void finish() override;
 };
 
-DBConnector::DBConnector(ScDPCache& rCache, const 
uno::Reference<sdbc::XRowSet>& xRowSet, const Date& rNullDate) :
-    mrCache(rCache), mxRowSet(xRowSet), maNullDate(rNullDate)
+DBConnector::DBConnector(ScDPCache& rCache, uno::Reference<sdbc::XRowSet> 
xRowSet, const Date& rNullDate) :
+    mrCache(rCache), mxRowSet(std::move(xRowSet)), maNullDate(rNullDate)
 {
     Reference<sdbc::XResultSetMetaDataSupplier> xMetaSupp(mxRowSet, UNO_QUERY);
     if (xMetaSupp.is())
@@ -290,13 +291,13 @@ static sheet::DataPilotFieldOrientation 
lcl_GetDataGetOrientation( const uno::Re
 }
 
 ScDPServiceDesc::ScDPServiceDesc(
-    const OUString& rServ, const OUString& rSrc, const OUString& rNam,
-    const OUString& rUser, const OUString& rPass ) :
-    aServiceName( rServ ),
-    aParSource( rSrc ),
-    aParName( rNam ),
-    aParUser( rUser ),
-    aParPass( rPass ) {}
+    OUString aServ, OUString aSrc, OUString aNam,
+    OUString aUser, OUString aPass ) :
+    aServiceName(std::move( aServ )),
+    aParSource(std::move( aSrc )),
+    aParName(std::move( aNam )),
+    aParUser(std::move( aUser )),
+    aParPass(std::move( aPass )) {}
 
 bool ScDPServiceDesc::operator== ( const ScDPServiceDesc& rOther ) const
 {
@@ -1321,7 +1322,7 @@ class FindByName
 {
     OUString maName; // must be all uppercase.
 public:
-    explicit FindByName(const OUString& rName) : maName(rName) {}
+    explicit FindByName(OUString aName) : maName(std::move(aName)) {}
     bool operator() (const ScDPSaveDimension* pDim) const
     {
         // Layout name takes precedence.
@@ -3170,8 +3171,8 @@ bool ScDPCollection::NameCaches::remove(const ScDPCache* 
p)
     return false;
 }
 
-ScDPCollection::DBType::DBType(sal_Int32 nSdbType, const OUString& rDBName, 
const OUString& rCommand) :
-    mnSdbType(nSdbType), maDBName(rDBName), maCommand(rCommand) {}
+ScDPCollection::DBType::DBType(sal_Int32 nSdbType, OUString aDBName, OUString 
aCommand) :
+    mnSdbType(nSdbType), maDBName(std::move(aDBName)), 
maCommand(std::move(aCommand)) {}
 
 bool ScDPCollection::DBType::less::operator() (const DBType& left, const 
DBType& right) const
 {
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index bf2109b300a3..ce2ccb3a05dd 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -62,6 +62,7 @@
 
 #include <limits>
 #include <string_view>
+#include <utility>
 #include <vector>
 
 using namespace com::sun::star;
@@ -93,9 +94,9 @@ struct ScDPOutLevelData
     bool                                mbPageDim:1;
 
     ScDPOutLevelData(tools::Long nDim, tools::Long nHier, tools::Long nLevel, 
tools::Long nDimPos, sal_uInt32 nSrcNumFmt, const 
uno::Sequence<sheet::MemberResult>  &aResult,
-                       const OUString &aName, const OUString &aCaption, bool 
bHasHiddenMember, bool bDataLayout, bool bPageDim) :
+                       OUString aName, OUString aCaption, bool 
bHasHiddenMember, bool bDataLayout, bool bPageDim) :
         mnDim(nDim), mnHier(nHier), mnLevel(nLevel), mnDimPos(nDimPos), 
mnSrcNumFmt(nSrcNumFmt), maResult(aResult),
-        maName(aName), maCaption(aCaption), 
mbHasHiddenMember(bHasHiddenMember), mbDataLayout(bDataLayout),
+        maName(std::move(aName)), maCaption(std::move(aCaption)), 
mbHasHiddenMember(bHasHiddenMember), mbDataLayout(bDataLayout),
         mbPageDim(bPageDim)
     {
     }
@@ -502,10 +503,10 @@ uno::Sequence<sheet::MemberResult> 
getVisiblePageMembersAsResults( const uno::Re
 
 }
 
-ScDPOutput::ScDPOutput( ScDocument* pD, const 
uno::Reference<sheet::XDimensionsSupplier>& xSrc,
+ScDPOutput::ScDPOutput( ScDocument* pD, 
uno::Reference<sheet::XDimensionsSupplier> xSrc,
                         const ScAddress& rPos, bool bFilter ) :
     pDoc( pD ),
-    xSource( xSrc ),
+    xSource(std::move( xSrc )),
     aStartPos( rPos ),
     nColFmtCount( 0 ),
     nRowFmtCount( 0 ),
diff --git a/sc/source/core/data/dpresfilter.cxx 
b/sc/source/core/data/dpresfilter.cxx
index 4cef11b7695f..50280805714a 100644
--- a/sc/source/core/data/dpresfilter.cxx
+++ b/sc/source/core/data/dpresfilter.cxx
@@ -18,11 +18,12 @@
 #include <com/sun/star/uno/Sequence.hxx>
 
 #include <limits>
+#include <utility>
 
 using namespace com::sun::star;
 
-ScDPResultFilter::ScDPResultFilter(const OUString& rDimName, bool bDataLayout) 
:
-    maDimName(rDimName), mbHasValue(false), mbDataLayout(bDataLayout) {}
+ScDPResultFilter::ScDPResultFilter(OUString aDimName, bool bDataLayout) :
+    maDimName(std::move(aDimName)), mbHasValue(false), 
mbDataLayout(bDataLayout) {}
 
 ScDPResultFilterContext::ScDPResultFilterContext() :
     mnCol(0), mnRow(0) {}
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 0f8bfbf11712..92b4c3d73186 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -47,6 +47,7 @@
 
 #include <unordered_map>
 #include <algorithm>
+#include <utility>
 
 using namespace com::sun::star;
 using namespace com::sun::star::sheet;
@@ -62,8 +63,8 @@ static void lcl_SetBoolProperty( const 
uno::Reference<beans::XPropertySet>& xPro
     xProp->setPropertyValue( rName, uno::Any( bValue ) );
 }
 
-ScDPSaveMember::ScDPSaveMember(const OUString& rName) :
-    aName( rName ),
+ScDPSaveMember::ScDPSaveMember(OUString _aName) :
+    aName(std::move( _aName )),
     nVisibleMode( SC_DPSAVEMODE_DONTKNOW ),
     nShowDetailsMode( SC_DPSAVEMODE_DONTKNOW )
 {
@@ -179,8 +180,8 @@ void ScDPSaveMember::Dump(int nIndent) const
 
 #endif
 
-ScDPSaveDimension::ScDPSaveDimension(const OUString& rName, bool bDataLayout) :
-    aName( rName ),
+ScDPSaveDimension::ScDPSaveDimension(OUString _aName, bool bDataLayout) :
+    aName(std::move( _aName )),
     bIsDataLayout( bDataLayout ),
     bDupFlag( false ),
     nOrientation( sheet::DataPilotFieldOrientation_HIDDEN ),
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 6302f044eea7..98bd94aef708 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -48,6 +48,7 @@
 #include <editeng/scriptspaceitem.hxx>
 #include <sfx2/objsh.hxx>
 #include <svl/itempool.hxx>
+#include <utility>
 #include <vcl/canvastools.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
@@ -228,11 +229,11 @@ static ScRange lcl_getClipRangeFromClipDoc(ScDocument* 
pClipDoc, SCTAB nClipTab)
     return ScRange(nClipStartX, nClipStartY, nClipTab, nClipEndX, nClipEndY, 
nClipTab);
 }
 
-ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) :
+ScDrawLayer::ScDrawLayer( ScDocument* pDocument, OUString _aName ) :
     FmFormModel(
         nullptr,
         pGlobalDrawPersist ? pGlobalDrawPersist : (pDocument ? 
pDocument->GetDocumentShell() : nullptr)),
-    aName( rName ),
+    aName(std::move( _aName )),
     pDoc( pDocument ),
     bRecording( false ),
     bAdjustEnabled( true ),
diff --git a/sc/source/core/data/listenercontext.cxx 
b/sc/source/core/data/listenercontext.cxx
index dac2380bfd04..e8bfd49ae7e5 100644
--- a/sc/source/core/data/listenercontext.cxx
+++ b/sc/source/core/data/listenercontext.cxx
@@ -10,6 +10,7 @@
 #include <listenercontext.hxx>
 #include <document.hxx>
 #include <mtvelements.hxx>
+#include <utility>
 
 namespace sc {
 
@@ -17,8 +18,8 @@ StartListeningContext::StartListeningContext(ScDocument& 
rDoc) :
     mrDoc(rDoc), mpSet(std::make_shared<ColumnBlockPositionSet>(rDoc)) {}
 
 StartListeningContext::StartListeningContext(
-    ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet) :
-    mrDoc(rDoc), mpSet(pSet) {}
+    ScDocument& rDoc, std::shared_ptr<ColumnBlockPositionSet> pSet) :
+    mrDoc(rDoc), mpSet(std::move(pSet)) {}
 
 void StartListeningContext::setColumnSet( const std::shared_ptr<const 
ColumnSet>& rpColSet )
 {
@@ -40,8 +41,8 @@ EndListeningContext::EndListeningContext(ScDocument& rDoc, 
ScTokenArray* pOldCod
     mpOldCode(pOldCode), maPosDelta(0,0,0) {}
 
 EndListeningContext::EndListeningContext(
-    ScDocument& rDoc, const std::shared_ptr<ColumnBlockPositionSet>& pSet, 
ScTokenArray* pOldCode) :
-    mrDoc(rDoc),  mpPosSet(pSet),
+    ScDocument& rDoc, std::shared_ptr<ColumnBlockPositionSet> pSet, 
ScTokenArray* pOldCode) :
+    mrDoc(rDoc),  mpPosSet(std::move(pSet)),
     mpOldCode(pOldCode), maPosDelta(0,0,0) {}
 
 void EndListeningContext::setPositionDelta( const ScAddress& rDelta )
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 7544e6e95c71..c854b452c20e 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <pivot.hxx>
+#include <utility>
 
 #if DEBUG_PIVOT_TABLE
 using std::cout;
@@ -31,8 +32,8 @@ using std::endl;
 ScDPName::ScDPName() : mnDupCount(0)
 {}
 
-ScDPName::ScDPName(const OUString& rName, const OUString& rLayoutName, 
sal_uInt8 nDupCount) :
-    maName(rName), maLayoutName(rLayoutName), mnDupCount(nDupCount)
+ScDPName::ScDPName(OUString aName, OUString aLayoutName, sal_uInt8 nDupCount) :
+    maName(std::move(aName)), maLayoutName(std::move(aLayoutName)), 
mnDupCount(nDupCount)
 {}
 
 // ScDPLabelData
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index cd8acfdceec4..b2de7a6843d7 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -52,6 +52,7 @@
 #include <userdat.hxx>
 #include <detfunc.hxx>
 #include <editutil.hxx>
+#include <utility>
 
 using namespace com::sun::star;
 
@@ -166,7 +167,7 @@ public:
     /** Create a new caption. The caption will not be inserted into the 
document. */
     explicit            ScCaptionCreator( ScDocument& rDoc, const ScAddress& 
rPos, bool bTailFront );
     /** Manipulate an existing caption. */
-    explicit            ScCaptionCreator( ScDocument& rDoc, const ScAddress& 
rPos, const ScCaptionPtr& xCaption );
+    explicit            ScCaptionCreator( ScDocument& rDoc, const ScAddress& 
rPos, ScCaptionPtr xCaption );
 
     /** Returns the drawing layer page of the sheet contained in maPos. */
     SdrPage*            GetDrawPage();
@@ -212,10 +213,10 @@ ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, 
const ScAddress& rPos, boo
     CreateCaption( true/*bShown*/, bTailFront );
 }
 
-ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, 
const ScCaptionPtr& xCaption ) :
+ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, 
ScCaptionPtr xCaption ) :
     mrDoc( rDoc ),
     maPos( rPos ),
-    mxCaption( xCaption )
+    mxCaption(std::move( xCaption ))
 {
     Initialize();
 }
@@ -861,9 +862,9 @@ ScPostIt::ScPostIt( ScDocument& rDoc, const ScAddress& 
rPos, const ScPostIt& rNo
     CreateCaption( rPos, rNote.maNoteData.mxCaption.get() );
 }
 
-ScPostIt::ScPostIt( ScDocument& rDoc, const ScAddress& rPos, const ScNoteData& 
rNoteData, bool bAlwaysCreateCaption, sal_uInt32 nPostItId ) :
+ScPostIt::ScPostIt( ScDocument& rDoc, const ScAddress& rPos, ScNoteData 
aNoteData, bool bAlwaysCreateCaption, sal_uInt32 nPostItId ) :
     mrDoc( rDoc ),
-    maNoteData( rNoteData )
+    maNoteData(std::move( aNoteData ))
 {
     mnPostItId = nPostItId == 0 ? mnLastPostItId++ : nPostItId;
     if( bAlwaysCreateCaption || maNoteData.mbShown )
diff --git a/sc/source/core/inc/addinlis.hxx b/sc/source/core/inc/addinlis.hxx
index ac3d2d64da65..d1cc7f3dd85b 100644
--- a/sc/source/core/inc/addinlis.hxx
+++ b/sc/source/core/inc/addinlis.hxx
@@ -43,7 +43,7 @@ private:
     static ::std::vector<rtl::Reference<ScAddInListener>> aAllListeners;
 
     // always allocated via CreateListener
-    ScAddInListener( css::uno::Reference<css::sheet::XVolatileResult> const & 
xVR,
+    ScAddInListener( css::uno::Reference<css::sheet::XVolatileResult> xVR,
                     ScDocument* pD );
 
 public:
diff --git a/sc/source/core/inc/ddelink.hxx b/sc/source/core/inc/ddelink.hxx
index 6baa7cee4761..d872a102cc9c 100644
--- a/sc/source/core/inc/ddelink.hxx
+++ b/sc/source/core/inc/ddelink.hxx
@@ -49,7 +49,7 @@ static bool bIsInUpdate;
 public:
 
             ScDdeLink( ScDocument& rD,
-                        const OUString& rA, const OUString& rT, const 
OUString& rI,
+                        OUString aA, OUString aT, OUString aI,
                         sal_uInt8 nM );
             ScDdeLink( ScDocument& rD, SvStream& rStream, 
ScMultipleReadHeader& rHdr );
             ScDdeLink( ScDocument& rD, const ScDdeLink& rOther );
diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx
index b8cb084e792b..cda9241590e6 100644
--- a/sc/source/core/inc/doubleref.hxx
+++ b/sc/source/core/inc/doubleref.hxx
@@ -134,7 +134,7 @@ private:
 class ScDBExternalRange final : public ScDBRangeBase
 {
 public:
-    explicit ScDBExternalRange(ScDocument* pDoc, const ScMatrixRef& pMat);
+    explicit ScDBExternalRange(ScDocument* pDoc, ScMatrixRef pMat);
     virtual ~ScDBExternalRange() override;
 
     virtual SCCOL getColSize() const override;
diff --git a/sc/source/core/inc/webservicelink.hxx 
b/sc/source/core/inc/webservicelink.hxx
index 7f1d1e913156..8504a8c1b6e3 100644
--- a/sc/source/core/inc/webservicelink.hxx
+++ b/sc/source/core/inc/webservicelink.hxx
@@ -28,7 +28,7 @@ private:
     OUString aResult;
 
 public:
-    ScWebServiceLink(ScDocument* pD, const OUString& rURL);
+    ScWebServiceLink(ScDocument* pD, OUString aURL);
     virtual ~ScWebServiceLink() override;
 
     // SvBaseLink override:
diff --git a/sc/source/core/opencl/formulagroupcl.cxx 
b/sc/source/core/opencl/formulagroupcl.cxx
index f9ce312976af..67f0da6eb3d6 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -134,6 +134,7 @@ const char* const publicFunc =
  "}\n"
  ;
 
+#include <utility>
 #include <vector>
 #include <map>
 #include <iostream>
@@ -1046,9 +1047,9 @@ class DynamicKernelSlidingArgument : public Base
 public:
     DynamicKernelSlidingArgument(const ScCalcConfig& config, const 
std::string& s,
                                  const FormulaTreeNodeRef& ft,
-                                 const std::shared_ptr<SlidingFunctionBase>& 
CodeGen, int index)
+                                 std::shared_ptr<SlidingFunctionBase> CodeGen, 
int index)
         : Base(config, s, ft, index)
-        , mpCodeGen(CodeGen)
+        , mpCodeGen(std::move(CodeGen))
     {
         FormulaToken* t = ft->GetFormulaToken();
         if (t->GetType() != formula::svDoubleVectorRef)
@@ -1336,9 +1337,9 @@ class ParallelReductionVectorRef : public Base
 public:
     ParallelReductionVectorRef(const ScCalcConfig& config, const std::string& 
s,
                                const FormulaTreeNodeRef& ft,
-                               const std::shared_ptr<SlidingFunctionBase>& 
CodeGen, int index)
+                               std::shared_ptr<SlidingFunctionBase> CodeGen, 
int index)
         : Base(config, s, ft, index)
-        , mpCodeGen(CodeGen)
+        , mpCodeGen(std::move(CodeGen))
         , mpClmem2(nullptr)
     {
         FormulaToken* t = ft->GetFormulaToken();
@@ -3826,7 +3827,7 @@ namespace {
 class DynamicKernel : public CompiledFormula
 {
 public:
-    DynamicKernel( const ScCalcConfig& config, const FormulaTreeNodeRef& r, 
int nResultSize );
+    DynamicKernel( ScCalcConfig  config, FormulaTreeNodeRef r, int nResultSize 
);
     virtual ~DynamicKernel() override;
 
     static std::shared_ptr<DynamicKernel> create( const ScCalcConfig& config, 
const ScTokenArray& rCode, int nResultSize );
@@ -3865,9 +3866,9 @@ private:
 
 }
 
-DynamicKernel::DynamicKernel( const ScCalcConfig& config, const 
FormulaTreeNodeRef& r, int nResultSize ) :
-    mCalcConfig(config),
-    mpRoot(r),
+DynamicKernel::DynamicKernel( ScCalcConfig config, FormulaTreeNodeRef x, int 
nResultSize ) :
+    mCalcConfig(std::move(config)),
+    mpRoot(std::move(x)),
     mpProgram(nullptr),
     mpKernel(nullptr),
     mpResClmem(nullptr),
diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx
index e197ea002bb3..12361d907766 100644
--- a/sc/source/core/opencl/opbase.cxx
+++ b/sc/source/core/opencl/opbase.cxx
@@ -10,6 +10,7 @@
 #include <opencl/openclwrapper.hxx>
 #include <formula/vectortoken.hxx>
 #include <sal/log.hxx>
+#include <utility>
 
 #include "opbase.hxx"
 
@@ -18,11 +19,11 @@ using namespace formula;
 namespace sc::opencl {
 
 UnhandledToken::UnhandledToken(
-    const char* m, const std::string& fn, int ln ) :
-    mMessage(m), mFile(fn), mLineNumber(ln) {}
+    const char* m, std::string  fn, int ln ) :
+    mMessage(m), mFile(std::move(fn)), mLineNumber(ln) {}
 
-OpenCLError::OpenCLError( const std::string& function, cl_int error, const 
std::string& file, int line ) :
-    mFunction(function), mError(error), mFile(file), mLineNumber(line)
+OpenCLError::OpenCLError( std::string  function, cl_int error, std::string  
file, int line ) :
+    mFunction(std::move(function)), mError(error), mFile(std::move(file)), 
mLineNumber(line)
 {
     // Not sure if this SAL_INFO() is useful; the place in
     // CLInterpreterContext::launchKernel() where OpenCLError is
@@ -31,15 +32,15 @@ OpenCLError::OpenCLError( const std::string& function, 
cl_int error, const std::
     // SAL_INFO("sc.opencl", "OpenCL error: " << 
openclwrapper::errorString(mError));
 }
 
-Unhandled::Unhandled( const std::string& fn, int ln ) :
-    mFile(fn), mLineNumber(ln) {}
+Unhandled::Unhandled( std::string  fn, int ln ) :
+    mFile(std::move(fn)), mLineNumber(ln) {}
 
-InvalidParameterCount::InvalidParameterCount( int parameterCount, const 
std::string& file, int ln ) :
-    mParameterCount(parameterCount), mFile(file), mLineNumber(ln) {}
+InvalidParameterCount::InvalidParameterCount( int parameterCount, std::string 
file, int ln ) :
+    mParameterCount(parameterCount), mFile(std::move(file)), mLineNumber(ln) {}
 
-DynamicKernelArgument::DynamicKernelArgument( const ScCalcConfig& config, 
const std::string& s,
-    const FormulaTreeNodeRef& ft ) :
-    mCalcConfig(config), mSymName(s), mFormulaTree(ft) { }
+DynamicKernelArgument::DynamicKernelArgument( const ScCalcConfig& config, 
std::string s,
+    FormulaTreeNodeRef  ft ) :
+    mCalcConfig(config), mSymName(std::move(s)), mFormulaTree(std::move(ft)) { 
}
 
 std::string DynamicKernelArgument::GenDoubleSlidingWindowDeclRef( bool ) const
 {
diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx
index b4a2780f7c0e..658a3fb59c99 100644
--- a/sc/source/core/opencl/opbase.hxx
+++ b/sc/source/core/opencl/opbase.hxx
@@ -30,7 +30,7 @@ class FormulaTreeNode;
 class UnhandledToken
 {
 public:
-    UnhandledToken( const char* m, const std::string& fn, int ln );
+    UnhandledToken( const char* m, std::string fn, int ln );
 
     std::string mMessage;
     std::string mFile;
@@ -41,7 +41,7 @@ public:
 class OpenCLError
 {
 public:
-    OpenCLError( const std::string& function, cl_int error, const std::string& 
file, int line );
+    OpenCLError( std::string  function, cl_int error, std::string file, int 
line );
 
     std::string mFunction;
     cl_int mError;
@@ -53,7 +53,7 @@ public:
 class Unhandled
 {
 public:
-    Unhandled( const std::string& fn, int ln );
+    Unhandled( std::string fn, int ln );
 
     std::string mFile;
     int mLineNumber;
@@ -62,7 +62,7 @@ public:
 class InvalidParameterCount
 {
 public:
-    InvalidParameterCount( int parameterCount, const std::string& file, int ln 
);
+    InvalidParameterCount( int parameterCount, std::string file, int ln );
 
     int mParameterCount;
     std::string mFile;
@@ -107,7 +107,7 @@ public:
     /// delete copy-assignment operator
     const DynamicKernelArgument& operator=( const DynamicKernelArgument& ) = 
delete;
 
-    DynamicKernelArgument( const ScCalcConfig& config, const std::string& s, 
const FormulaTreeNodeRef& ft );
+    DynamicKernelArgument( const ScCalcConfig& config, std::string s, 
FormulaTreeNodeRef  ft );
     virtual ~DynamicKernelArgument() {}
 
     /// Generate declaration
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 2c756a155165..cc444e808e9c 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -19,6 +19,7 @@
 
 #include <comphelper/processfactory.hxx>
 #include <i18nlangtag/languagetag.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <sfx2/objsh.hxx>
@@ -66,23 +67,23 @@ using namespace com::sun::star;
 #define SC_CALLERPOS_NONE   (-1)
 
 ScUnoAddInFuncData::ScUnoAddInFuncData( const OUString& rNam, const OUString& 
rLoc,
-                                        const OUString& rDesc,
-                                        sal_uInt16 nCat, const OString& sHelp,
-                                        const 
uno::Reference<reflection::XIdlMethod>& rFunc,
-                                        const uno::Any& rO,
+                                        OUString aDesc,
+                                        sal_uInt16 nCat, OString sHelp,
+                                        uno::Reference<reflection::XIdlMethod> 
xFunc,
+                                        uno::Any aO,
                                         tools::Long nAC, const ScAddInArgDesc* 
pAD,
                                         tools::Long nCP ) :
     aOriginalName( rNam ),
     aLocalName( rLoc ),
     aUpperName( rNam ),
     aUpperLocal( rLoc ),
-    aDescription( rDesc ),
-    xFunction( rFunc ),
-    aObject( rO ),
+    aDescription(std::move( aDesc )),
+    xFunction(std::move( xFunc )),
+    aObject(std::move( aO )),
     nArgCount( nAC ),
     nCallerPos( nCP ),
     nCategory( nCat ),
-    sHelpId( sHelp ),
+    sHelpId(std::move( sHelp )),
     bCompInitialized( false )
 {
     if ( nArgCount )
diff --git a/sc/source/core/tool/addinlis.cxx b/sc/source/core/tool/addinlis.cxx
index 56d178eb66b7..9f09e464a229 100644
--- a/sc/source/core/tool/addinlis.cxx
+++ b/sc/source/core/tool/addinlis.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <sfx2/objsh.hxx>
+#include <utility>
 #include <vcl/svapp.hxx>
 
 #include <addinlis.hxx>
@@ -46,8 +47,8 @@ ScAddInListener* ScAddInListener::CreateListener(
     return xNew.get();
 }
 
-ScAddInListener::ScAddInListener( uno::Reference<sheet::XVolatileResult> const 
& xVR, ScDocument* pDoc ) :
-    xVolRes( xVR ),
+ScAddInListener::ScAddInListener( uno::Reference<sheet::XVolatileResult> xVR, 
ScDocument* pDoc ) :
+    xVolRes(std::move( xVR )),
     pDocs( new ScAddInDocs )
 {
     pDocs->insert( pDoc );
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 5a7fce85254e..2c441164cfdc 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -19,6 +19,7 @@
 
 #include <sal/config.h>
 
+#include <utility>
 #include <vcl/svapp.hxx>
 #include <vcl/settings.hxx>
 #include <osl/module.hxx>
@@ -83,22 +84,22 @@ public:
     ModuleData(const ModuleData&) = delete;
     const ModuleData& operator=(const ModuleData&) = delete;
 
-    ModuleData(const OUString& rStr, std::unique_ptr<osl::Module> pInst) : 
aName(rStr), pInstance(std::move(pInst)) {}
+    ModuleData(OUString aStr, std::unique_ptr<osl::Module> pInst) : 
aName(std::move(aStr)), pInstance(std::move(pInst)) {}
 
     const OUString& GetName() const { return aName; }
     osl::Module*    GetInstance() const { return pInstance.get(); }
 };
 
 LegacyFuncData::LegacyFuncData(const ModuleData*pModule,
-                   const OUString& rIName,
-                   const OUString& rFName,
+                   OUString aIName,
+                   OUString aFName,
                          sal_uInt16 nNo,
                     sal_uInt16  nCount,
                    const ParamType* peType,
                     ParamType  eType) :
     pModuleData     (pModule),
-    aInternalName   (rIName),
-    aFuncName       (rFName),
+    aInternalName   (std::move(aIName)),
+    aFuncName       (std::move(aFName)),
     nNumber         (nNo),
     nParamCount     (nCount),
     eAsyncType      (eType)
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index cadf8686bf0d..024ff205e1f6 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <memory>
+#include <utility>
 #include <vcl/svapp.hxx>
 
 #include <chartlis.hxx>
@@ -40,9 +41,9 @@ class ScChartUnoData
     uno::Reference< chart::XChartData >                     xSource;
 
 public:
-            ScChartUnoData( const uno::Reference< 
chart::XChartDataChangeEventListener >& rL,
-                            const uno::Reference< chart::XChartData >& rS ) :
-                    xListener( rL ), xSource( rS ) {}
+            ScChartUnoData( uno::Reference< 
chart::XChartDataChangeEventListener > xL,
+                            uno::Reference< chart::XChartData > xS ) :
+                    xListener(std::move( xL )), xSource(std::move( xS )) {}
 
     const uno::Reference< chart::XChartDataChangeEventListener >& 
GetListener() const   { return xListener; }
     const uno::Reference< chart::XChartData >& GetSource() const               
         { return xSource; }
@@ -95,9 +96,9 @@ void 
ScChartListener::ExternalRefListener::removeFileId(sal_uInt16 nFileId)
     maFileIds.erase(nFileId);
 }
 
-ScChartListener::ScChartListener( const OUString& rName, ScDocument& rDocP,
+ScChartListener::ScChartListener( OUString aName, ScDocument& rDocP,
         const ScRangeListRef& rRangeList ) :
-    maName(rName),
+    maName(std::move(aName)),
     mrDoc( rDocP ),
     bUsed( false ),
     bDirty( false )
@@ -105,9 +106,9 @@ ScChartListener::ScChartListener( const OUString& rName, 
ScDocument& rDocP,
     ScRefTokenHelper::getTokensFromRangeList(&rDocP, maTokens, *rRangeList);
 }
 
-ScChartListener::ScChartListener( const OUString& rName, ScDocument& rDocP, 
vector<ScTokenRef> aTokens ) :
+ScChartListener::ScChartListener( OUString aName, ScDocument& rDocP, 
vector<ScTokenRef> aTokens ) :
     maTokens(std::move(aTokens)),
-    maName(rName),
+    maName(std::move(aName)),
     mrDoc( rDocP ),
     bUsed( false ),
     bDirty( false )
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 4c93be995b29..11af92f9461d 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -23,6 +23,7 @@
 #include <svl/numformat.hxx>
 
 #include <memory>
+#include <utility>
 
 namespace
 {
@@ -55,8 +56,8 @@ ScChartPositioner::ScChartPositioner( ScDocument& rDoc, SCTAB 
nTab,
     CheckColRowHeaders();
 }
 
-ScChartPositioner::ScChartPositioner( ScDocument& rDoc, const ScRangeListRef& 
rRangeList ) :
-        aRangeListRef( rRangeList ),
+ScChartPositioner::ScChartPositioner( ScDocument& rDoc, ScRangeListRef 
xRangeList ) :
+        aRangeListRef(std::move( xRangeList )),
         rDocument( rDoc ),
         eGlue( ScChartGlue::NA ),
         nStartCol(0),
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 0fa7951d474b..ccfea08c8561 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -43,6 +43,7 @@
 #include <tools/json_writer.hxx>
 #include <algorithm>
 #include <memory>
+#include <utility>
 
 ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScRange& 
rRange )
         :
@@ -63,14 +64,14 @@ ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, 
const ScRange& rRange
 }
 
 ScChangeAction::ScChangeAction(
-    ScChangeActionType eTypeP, const ScBigRange& rRange,
+    ScChangeActionType eTypeP, ScBigRange aRange,
     const sal_uLong nTempAction, const sal_uLong nTempRejectAction,
     const ScChangeActionState eTempState, const DateTime& aTempDateTime,
-    const OUString& aTempUser,  const OUString& aTempComment) :
-        aBigRange( rRange ),
+    OUString aTempUser,  OUString aTempComment) :
+        aBigRange(std::move( aRange )),
         aDateTime( aTempDateTime ),
-        aUser( aTempUser ),
-        aComment( aTempComment ),
+        aUser(std::move( aTempUser )),
+        aComment(std::move( aTempComment )),
         pNext( nullptr ),
         pPrev( nullptr ),
         pLinkAny( nullptr ),
@@ -84,10 +85,10 @@ ScChangeAction::ScChangeAction(
 {
 }
 
-ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, const ScBigRange& 
rRange,
+ScChangeAction::ScChangeAction( ScChangeActionType eTypeP, ScBigRange aRange,
                         const sal_uLong nTempAction)
         :
-        aBigRange( rRange ),
+        aBigRange(std::move( aRange )),
         aDateTime( DateTime::SYSTEM ),
         pNext( nullptr ),
         pPrev( nullptr ),
@@ -1093,10 +1094,10 @@ ScChangeActionMove::ScChangeActionMove(
     const sal_uLong nActionNumber, const ScChangeActionState eStateP,
     const sal_uLong nRejectingNumber, const ScBigRange& aToBigRange,
     const OUString& aUserP, const DateTime& aDateTimeP,
-    const OUString &sComment, const ScBigRange& aFromBigRange,
+    const OUString &sComment, ScBigRange  aFromBigRange,
     ScChangeTrack* pTrackP) : // which of nDx and nDy is set depends on the 
type
     ScChangeAction(SC_CAT_MOVE, aToBigRange, nActionNumber, nRejectingNumber, 
eStateP, aDateTimeP, aUserP, sComment),
-    aFromRange(aFromBigRange),
+    aFromRange(std::move(aFromBigRange)),
     pTrack( pTrackP ),
     nStartLastCut(0),
     nEndLastCut(0)
@@ -1246,9 +1247,9 @@ ScChangeActionContent::ScChangeActionContent( const 
sal_uLong nActionNumber,
             const ScChangeActionState eStateP, const sal_uLong 
nRejectingNumber,
             const ScBigRange& aBigRangeP, const OUString& aUserP,
             const DateTime& aDateTimeP, const OUString& sComment,
-            const ScCellValue& rOldCell, const ScDocument* pDoc, const 
OUString& sOldValue ) :
+            ScCellValue aOldCell, const ScDocument* pDoc, const OUString& 
sOldValue ) :
     ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber, 
nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
-    maOldCell(rOldCell),
+    maOldCell(std::move(aOldCell)),
     maOldValue(sOldValue),
     pNextContent(nullptr),
     pPrevContent(nullptr),
@@ -1263,10 +1264,10 @@ ScChangeActionContent::ScChangeActionContent( const 
sal_uLong nActionNumber,
 }
 
 ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
-            const ScCellValue& rNewCell, const ScBigRange& aBigRangeP,
+            ScCellValue aNewCell, const ScBigRange& aBigRangeP,
             const ScDocument* pDoc, const OUString& sNewValue ) :
     ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber),
-    maNewCell(rNewCell),
+    maNewCell(std::move(aNewCell)),
     maNewValue(sNewValue),
     pNextContent(nullptr),
     pPrevContent(nullptr),
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 841a863f15f0..5a2fa75684de 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -759,8 +759,8 @@ namespace {
 class TableColumnNameSearch
 {
 public:
-    explicit TableColumnNameSearch( const OUString& rSearchName ) :
-        maSearchName( rSearchName )
+    explicit TableColumnNameSearch( OUString aSearchName ) :
+        maSearchName(std::move( aSearchName ))
     {
     }
 
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 0b7d79eeb62e..95591dddb461 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -36,17 +36,18 @@
 #include <rangeseq.hxx>
 #include <sc.hrc>
 #include <hints.hxx>
+#include <utility>
 
 
 bool ScDdeLink::bIsInUpdate = false;
 
-ScDdeLink::ScDdeLink( ScDocument& rD, const OUString& rA, const OUString& rT, 
const OUString& rI,
+ScDdeLink::ScDdeLink( ScDocument& rD, OUString aA, OUString aT, OUString aI,
                         sal_uInt8 nM ) :
     ::sfx2::SvBaseLink(SfxLinkUpdateMode::ALWAYS,SotClipboardFormatId::STRING),
     rDoc( rD ),
-    aAppl( rA ),
-    aTopic( rT ),
-    aItem( rI ),
+    aAppl(std::move( aA )),
+    aTopic(std::move( aT )),
+    aItem(std::move( aI )),
     nMode( nM ),
     bNeedUpdate( false ),
     pResult( nullptr )
diff --git a/sc/source/core/tool/defaultsoptions.cxx 
b/sc/source/core/tool/defaultsoptions.cxx
index 3f18da0937e1..a55f154fefe1 100644
--- a/sc/source/core/tool/defaultsoptions.cxx
+++ b/sc/source/core/tool/defaultsoptions.cxx
@@ -14,6 +14,7 @@
 #include <globstr.hrc>
 #include <scresid.hxx>
 #include <sc.hrc>
+#include <utility>
 
 using namespace utl;
 using namespace com::sun::star::uno;
@@ -38,9 +39,9 @@ bool ScDefaultsOptions::operator==( const ScDefaultsOptions& 
rOpt ) const
         && rOpt.bJumboSheets == bJumboSheets;
 }
 
-ScTpDefaultsItem::ScTpDefaultsItem( const ScDefaultsOptions& rOpt ) :
+ScTpDefaultsItem::ScTpDefaultsItem( ScDefaultsOptions aOpt ) :
     SfxPoolItem ( SID_SCDEFAULTSOPTIONS ),
-    theOptions  ( rOpt )
+    theOptions  (std::move( aOpt ))
 {
 }
 
diff --git a/sc/source/core/tool/doubleref.cxx 
b/sc/source/core/tool/doubleref.cxx
index 4ef076003e0f..66ecea4a108d 100644
--- a/sc/source/core/tool/doubleref.cxx
+++ b/sc/source/core/tool/doubleref.cxx
@@ -385,8 +385,8 @@ bool ScDBInternalRange::isRangeEqual(const ScRange& rRange) 
const
     return maRange == rRange;
 }
 
-ScDBExternalRange::ScDBExternalRange(ScDocument* pDoc, const ScMatrixRef& 
pMat) :
-    ScDBRangeBase(pDoc), mpMatrix(pMat)
+ScDBExternalRange::ScDBExternalRange(ScDocument* pDoc, ScMatrixRef pMat) :
+    ScDBRangeBase(pDoc), mpMatrix(std::move(pMat))
 {
     SCSIZE nC, nR;
     mpMatrix->GetDimensions(nC, nR);
diff --git a/sc/source/core/tool/formulalogger.cxx 
b/sc/source/core/tool/formulalogger.cxx
index 46465b56195a..964067ba0f70 100644
--- a/sc/source/core/tool/formulalogger.cxx
+++ b/sc/source/core/tool/formulalogger.cxx
@@ -21,6 +21,7 @@
 #include <rtl/ustrbuf.hxx>
 
 #include <cstdlib>
+#include <utility>
 
 namespace sc {
 
@@ -68,9 +69,9 @@ struct FormulaLogger::GroupScope::Impl
     bool mbCalcComplete;
     bool mbOutputEnabled;
 
-    Impl( FormulaLogger& rLogger, const OUString& rPrefix, const ScDocument& 
rDoc,
+    Impl( FormulaLogger& rLogger, OUString aPrefix, const ScDocument& rDoc,
         const ScFormulaCell& rCell, bool bOutputEnabled ) :
-        mrLogger(rLogger), mrDoc(rDoc), maPrefix(rPrefix),
+        mrLogger(rLogger), mrDoc(rDoc), maPrefix(std::move(aPrefix)),
         mbCalcComplete(false), mbOutputEnabled(bOutputEnabled)
     {
         ++mrLogger.mnNestLevel;
diff --git a/sc/source/core/tool/formulaopt.cxx 
b/sc/source/core/tool/formulaopt.cxx
index 6c9e790aa00b..08c660a44ac1 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -16,6 +16,7 @@
 #include <global.hxx>
 #include <formulagroup.hxx>
 #include <sc.hrc>
+#include <utility>
 
 using namespace utl;
 using namespace com::sun::star::uno;
@@ -123,9 +124,9 @@ bool ScFormulaOptions::operator!=( const ScFormulaOptions& 
rOpt ) const
     return !(operator==(rOpt));
 }
 
-ScTpFormulaItem::ScTpFormulaItem( const ScFormulaOptions& rOpt ) :
+ScTpFormulaItem::ScTpFormulaItem( ScFormulaOptions aOpt ) :
     SfxPoolItem ( SID_SCFORMULAOPTIONS ),
-    theOptions  ( rOpt )
+    theOptions  (std::move( aOpt ))
 {
 }
 
diff --git a/sc/source/core/tool/formularesult.cxx 
b/sc/source/core/tool/formularesult.cxx
index b41c77f1f3ee..d4b146dfe3bd 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -12,12 +12,13 @@
 #include <token.hxx>
 
 #include <sal/log.hxx>
+#include <utility>
 
 namespace sc {
 
 FormulaResultValue::FormulaResultValue() : mfValue(0.0), meType(Invalid), 
mnError(FormulaError::NONE) {}
 FormulaResultValue::FormulaResultValue( double fValue ) : mfValue(fValue), 
meType(Value), mnError(FormulaError::NONE) {}
-FormulaResultValue::FormulaResultValue( const svl::SharedString& rStr ) : 
mfValue(0.0), maString(rStr), meType(String), mnError(FormulaError::NONE) {}
+FormulaResultValue::FormulaResultValue( svl::SharedString aStr ) : 
mfValue(0.0), maString(std::move(aStr)), meType(String), 
mnError(FormulaError::NONE) {}
 FormulaResultValue::FormulaResultValue( FormulaError nErr ) : mfValue(0.0), 
meType(Error), mnError(nErr) {}
 
 }
diff --git a/sc/source/core/tool/hints.cxx b/sc/source/core/tool/hints.cxx
index e2f47824e330..06ac946d9b6e 100644
--- a/sc/source/core/tool/hints.cxx
+++ b/sc/source/core/tool/hints.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <hints.hxx>
+#include <utility>
 
 // ScPaintHint - info what has to be repainted
 
@@ -81,11 +82,11 @@ void ScLinkRefreshedHint::SetAreaLink( const ScAddress& 
rPos )
 
 //      ScAutoStyleHint - STYLE() function has been called
 
-ScAutoStyleHint::ScAutoStyleHint( const ScRange& rR, const OUString& rSt1,
-                                        sal_uLong nT, const OUString& rSt2 ) :
+ScAutoStyleHint::ScAutoStyleHint( const ScRange& rR, OUString aSt1,
+                                        sal_uLong nT, OUString aSt2 ) :
     aRange( rR ),
-    aStyle1( rSt1 ),
-    aStyle2( rSt2 ),
+    aStyle1(std::move( aSt1 )),
+    aStyle2(std::move( aSt2 )),
     nTimeout( nT )
 {
 }
@@ -102,8 +103,8 @@ ScDBRangeRefreshedHint::~ScDBRangeRefreshedHint()
 {
 }
 
-ScDataPilotModifiedHint::ScDataPilotModifiedHint( const OUString& rName )
-    : maName(rName)
+ScDataPilotModifiedHint::ScDataPilotModifiedHint( OUString aName )
+    : maName(std::move(aName))
 {
 }
 ScDataPilotModifiedHint::~ScDataPilotModifiedHint()
diff --git a/sc/source/core/tool/orcusxml.cxx b/sc/source/core/tool/orcusxml.cxx
index 26fc0e27fbdb..eddeb977b93e 100644
--- a/sc/source/core/tool/orcusxml.cxx
+++ b/sc/source/core/tool/orcusxml.cxx
@@ -9,6 +9,7 @@
 
 #include <orcusxml.hxx>
 
+#include <utility>
 #include <vcl/weld.hxx>
 
 ScOrcusXMLTreeParam::EntryData::EntryData(EntryType eType)
@@ -24,7 +25,7 @@ ScOrcusXMLTreeParam::EntryData* 
ScOrcusXMLTreeParam::getUserData(const weld::Tre
     return 
weld::fromId<ScOrcusXMLTreeParam::EntryData*>(rControl.get_id(rEntry));
 }
 
-ScOrcusImportXMLParam::CellLink::CellLink(const ScAddress& rPos, const 
OString& rPath) :
-    maPos(rPos), maPath(rPath) {}
+ScOrcusImportXMLParam::CellLink::CellLink(const ScAddress& rPos, OString 
aPath) :
+    maPos(rPos), maPath(std::move(aPath)) {}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/reffind.cxx b/sc/source/core/tool/reffind.cxx
index 1d930dadf554..778d46a1de4e 100644
--- a/sc/source/core/tool/reffind.cxx
+++ b/sc/source/core/tool/reffind.cxx
@@ -25,6 +25,7 @@
 #include <global.hxx>
 #include <compiler.hxx>
 #include <document.hxx>
+#include <utility>
 
 namespace {
 
@@ -203,9 +204,9 @@ void ExpandToText(const sal_Unicode* p, sal_Int32 nLen, 
sal_Int32& rStartPos, sa
 }
 
 ScRefFinder::ScRefFinder(
-    const OUString& rFormula, const ScAddress& rPos,
+    OUString aFormula, const ScAddress& rPos,
     ScDocument& rDoc, formula::FormulaGrammar::AddressConvention eConvP) :
-    maFormula(rFormula),
+    maFormula(std::move(aFormula)),
     meConv(eConvP),
     mrDoc(rDoc),
     maPos(rPos),
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index d88bf07cdd04..3c0aa14966db 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -35,6 +35,7 @@
 #include <osl/diagnose.h>
 
 #include <memory>
+#include <utility>
 #include <vector>
 #include <limits>
 
@@ -1315,7 +1316,7 @@ class WalkAndMatchElements
 
 public:
     WalkAndMatchElements(Type aMatchValue, const 
MatrixImplType::size_pair_type& aSize, size_t nCol1, size_t nCol2) :
-        maMatchValue(aMatchValue),
+        maMatchValue(std::move(aMatchValue)),
         mnStartIndex( nCol1 * aSize.row ),
         mnStopIndex( (nCol2 + 1) * aSize.row ),
         mnResult(ResultNotSet),
@@ -2209,8 +2210,8 @@ private:
 
 public:
 
-    wrapped_iterator(typename T::const_iterator const & it_, U const & aOp):
-        it(it_),
+    wrapped_iterator(typename T::const_iterator  it_, U const & aOp):
+        it(std::move(it_)),
         val(value_type()),
         maOp(aOp)
     {
@@ -2274,9 +2275,9 @@ private:
     typename T::const_iterator m_itEnd;
     U maOp;
 public:
-    MatrixIteratorWrapper(typename T::const_iterator const & itBegin, typename 
T::const_iterator const & itEnd, U const & aOp):
-        m_itBegin(itBegin),
-        m_itEnd(itEnd),
+    MatrixIteratorWrapper(typename T::const_iterator itBegin, typename 
T::const_iterator itEnd, U const & aOp):
+        m_itBegin(std::move(itBegin)),
+        m_itEnd(std::move(itEnd)),
         maOp(aOp)
     {
     }
@@ -2409,17 +2410,17 @@ namespace {
 struct ElementBlock
 {
     ElementBlock(size_t nRowSize,
-            ScMatrix::DoubleOpFunction const & aDoubleFunc,
-            ScMatrix::BoolOpFunction const & aBoolFunc,
-            ScMatrix::StringOpFunction const & aStringFunc,
-            ScMatrix::EmptyOpFunction const & aEmptyFunc):
+            ScMatrix::DoubleOpFunction aDoubleFunc,
+            ScMatrix::BoolOpFunction aBoolFunc,
+            ScMatrix::StringOpFunction aStringFunc,
+            ScMatrix::EmptyOpFunction aEmptyFunc):
         mnRowSize(nRowSize),
         mnRowPos(0),
         mnColPos(0),
-        maDoubleFunc(aDoubleFunc),
-        maBoolFunc(aBoolFunc),
-        maStringFunc(aStringFunc),
-        maEmptyFunc(aEmptyFunc)
+        maDoubleFunc(std::move(aDoubleFunc)),
+        maBoolFunc(std::move(aBoolFunc)),
+        maStringFunc(std::move(aStringFunc)),
+        maEmptyFunc(std::move(aEmptyFunc))
     {
     }
 
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 22359d060b0a..ce52dd27bd5a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -663,8 +663,8 @@ bool ScRefListToken::operator==( const FormulaToken& r ) 
const
     return p && mbArrayResult == p->IsArrayResult();
 }
 
-ScMatrixToken::ScMatrixToken( const ScMatrixRef& p ) :
-    FormulaToken(formula::svMatrix), pMatrix(p) {}
+ScMatrixToken::ScMatrixToken( ScMatrixRef p ) :
+    FormulaToken(formula::svMatrix), pMatrix(std::move(p)) {}
 
 ScMatrixToken::ScMatrixToken( const ScMatrixToken& ) = default;
 
@@ -718,10 +718,10 @@ FormulaToken* ScMatrixRangeToken::Clone() const
     return new ScMatrixRangeToken(*this);
 }
 
-ScExternalSingleRefToken::ScExternalSingleRefToken( sal_uInt16 nFileId, const 
svl::SharedString& rTabName, const ScSingleRefData& r ) :
+ScExternalSingleRefToken::ScExternalSingleRefToken( sal_uInt16 nFileId, 
svl::SharedString aTabName, const ScSingleRefData& r ) :
     FormulaToken( svExternalSingleRef, ocPush),
     mnFileId(nFileId),
-    maTabName(rTabName),
+    maTabName(std::move(aTabName)),
     maSingleRef(r)
 {
 }
@@ -764,10 +764,10 @@ bool ScExternalSingleRefToken::operator ==( const 
FormulaToken& r ) const
     return maSingleRef == *r.GetSingleRef();
 }
 
-ScExternalDoubleRefToken::ScExternalDoubleRefToken( sal_uInt16 nFileId, const 
svl::SharedString& rTabName, const ScComplexRefData& r ) :
+ScExternalDoubleRefToken::ScExternalDoubleRefToken( sal_uInt16 nFileId, 
svl::SharedString aTabName, const ScComplexRefData& r ) :
     FormulaToken( svExternalDoubleRef, ocPush),
     mnFileId(nFileId),
-    maTabName(rTabName),
+    maTabName(std::move(aTabName)),
     maDoubleRef(r)
 {
 }
@@ -830,10 +830,10 @@ bool ScExternalDoubleRefToken::operator ==( const 
FormulaToken& r ) const
     return maDoubleRef == *r.GetDoubleRef();
 }
 
-ScExternalNameToken::ScExternalNameToken( sal_uInt16 nFileId, const 
svl::SharedString& rName ) :
+ScExternalNameToken::ScExternalNameToken( sal_uInt16 nFileId, 
svl::SharedString aName ) :
     FormulaToken( svExternalName, ocPush),
     mnFileId(nFileId),
-    maName(rName)
+    maName(std::move(aName))
 {
 }
 
@@ -976,8 +976,8 @@ bool ScEmptyCellToken::operator==( const FormulaToken& r ) 
const
         bDisplayedAsString == static_cast< const ScEmptyCellToken & 
>(r).IsDisplayedAsString();
 }
 
-ScMatrixCellResultToken::ScMatrixCellResultToken( const ScConstMatrixRef& 
pMat, const formula::FormulaToken* pUL ) :
-    FormulaToken(formula::svMatrixCell), xMatrix(pMat), xUpperLeft(pUL) {}
+ScMatrixCellResultToken::ScMatrixCellResultToken( ScConstMatrixRef pMat, const 
formula::FormulaToken* pUL ) :
+    FormulaToken(formula::svMatrixCell), xMatrix(std::move(pMat)), 
xUpperLeft(pUL) {}
 
 ScMatrixCellResultToken::ScMatrixCellResultToken( const 
ScMatrixCellResultToken& ) = default;
 
@@ -1109,10 +1109,10 @@ void ScMatrixFormulaCellToken::ResetResult()
 }
 
 ScHybridCellToken::ScHybridCellToken(
-    double f, const svl::SharedString & rStr, const OUString & rFormula, bool 
bEmptyDisplayedAsString ) :
+    double f, const svl::SharedString & rStr, OUString aFormula, bool 
bEmptyDisplayedAsString ) :
         FormulaToken( formula::svHybridCell ),
         mfDouble( f ), maString( rStr ),
-        maFormula( rFormula ),
+        maFormula(std::move( aFormula )),
         mbEmptyDisplayedAsString( bEmptyDisplayedAsString)
 {
     // caller, make up your mind...
diff --git a/sc/source/core/tool/typedstrdata.cxx 
b/sc/source/core/tool/typedstrdata.cxx
index 953035724d45..bf659733366a 100644
--- a/sc/source/core/tool/typedstrdata.cxx
+++ b/sc/source/core/tool/typedstrdata.cxx
@@ -11,6 +11,7 @@
 #include <global.hxx>
 
 #include <unotools/collatorwrapper.hxx>
+#include <utility>
 
 bool ScTypedStrData::LessHiddenRows::operator() (const ScTypedStrData& left, 
const ScTypedStrData& right) const
 {
@@ -110,8 +111,8 @@ ScTypedStrData::ScTypedStrData(
     mbIsDate( bDate ),
     mbIsHiddenByFilter(bIsHiddenByFilter) {}
 
-FindTypedStrData::FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens) 
:
-    maVal(rVal), mbCaseSens(bCaseSens) {}

... etc. - the rest is truncated

Reply via email to