diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-05 11:21:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-07 13:32:30 +0200 |
commit | 5b112c8f8843613873181fce50990a8feef837ca (patch) | |
tree | 9ebd9d01d49a0c6a058de954dc167fd4ccb4ff5c /sc/source/ui/docshell | |
parent | 799753cb80f4c81a6e87bf016924e0f2a29f03f0 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/arealink.cxx | 15 | ||||
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/docshell/tablink.cxx | 21 |
4 files changed, 25 insertions, 21 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index 8d3a89a1659d..64fb1e963aaf 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -19,6 +19,7 @@ #include <sfx2/fcontnr.hxx> #include <sfx2/linkmgr.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> #include <unotools/charclass.hxx> @@ -46,17 +47,17 @@ #include <clipparam.hxx> -ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const OUString& rFile, - const OUString& rFilter, const OUString& rOpt, - const OUString& rArea, const ScRange& rDest, +ScAreaLink::ScAreaLink( SfxObjectShell* pShell, OUString aFile, + OUString aFilter, OUString aOpt, + OUString aArea, const ScRange& rDest, sal_Int32 nRefreshDelaySeconds ) : ::sfx2::SvBaseLink(SfxLinkUpdateMode::ONCALL,SotClipboardFormatId::SIMPLE_FILE), ScRefreshTimer ( nRefreshDelaySeconds ), m_pDocSh(static_cast<ScDocShell*>(pShell)), - aFileName (rFile), - aFilterName (rFilter), - aOptions (rOpt), - aSourceArea (rArea), + aFileName (std::move(aFile)), + aFilterName (std::move(aFilter)), + aOptions (std::move(aOpt)), + aSourceArea (std::move(aArea)), aDestArea (rDest), bAddUndo (true), bInCreate (false), diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 9c4d8848ffc7..b429a26dbe1f 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -27,6 +27,7 @@ #include <editeng/justifyitem.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/bindings.hxx> +#include <utility> #include <vcl/weld.hxx> #include <vcl/stdtext.hxx> #include <vcl/svapp.hxx> @@ -1151,8 +1152,8 @@ namespace { sal_Int32 nIndex; SfxItemSet aItemSet; - ScMyRememberItem(const SfxItemSet& rItemSet, sal_Int32 nTempIndex) : - nIndex(nTempIndex), aItemSet(rItemSet) {} + ScMyRememberItem(SfxItemSet _aItemSet, sal_Int32 nTempIndex) : + nIndex(nTempIndex), aItemSet(std::move(_aItemSet)) {} }; } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 4fc7556c6daf..cfe1a1f5c6fa 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -27,6 +27,7 @@ #include <scextopt.hxx> #include <rangenam.hxx> #include <formulacell.hxx> +#include <utility> #include <viewdata.hxx> #include <tabvwsh.hxx> #include <sc.hrc> @@ -471,8 +472,8 @@ ScExternalRefCache::TokenRef ScExternalRefCache::Table::getEmptyOrNullToken( return TokenRef(); } -ScExternalRefCache::TableName::TableName(const OUString& rUpper, const OUString& rReal) : - maUpperName(rUpper), maRealName(rReal) +ScExternalRefCache::TableName::TableName(OUString aUpper, OUString aReal) : + maUpperName(std::move(aUpper)), maRealName(std::move(aReal)) { } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 21fe08519773..7fd32eb23780 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -30,6 +30,7 @@ #include <sfx2/fcontnr.hxx> #include <sfx2/frame.hxx> #include <sfx2/linkmgr.hxx> +#include <utility> #include <vcl/weld.hxx> #include <tools/urlobj.hxx> #include <unotools/transliterationwrapper.hxx> @@ -61,15 +62,15 @@ struct TableLink_Impl }; -ScTableLink::ScTableLink(ScDocShell* pDocSh, const OUString& rFile, - const OUString& rFilter, const OUString& rOpt, +ScTableLink::ScTableLink(ScDocShell* pDocSh, OUString aFile, + OUString aFilter, OUString aOpt, sal_Int32 nRefreshDelaySeconds ): ::sfx2::SvBaseLink(SfxLinkUpdateMode::ONCALL,SotClipboardFormatId::SIMPLE_FILE), ScRefreshTimer( nRefreshDelaySeconds ), pImpl( new TableLink_Impl ), - aFileName(rFile), - aFilterName(rFilter), - aOptions(rOpt), + aFileName(std::move(aFile)), + aFilterName(std::move(aFilter)), + aOptions(std::move(aOpt)), bInCreate( false ), bInEdit( false ), bAddUndo( true ) @@ -77,15 +78,15 @@ ScTableLink::ScTableLink(ScDocShell* pDocSh, const OUString& rFile, pImpl->m_pDocSh = pDocSh; } -ScTableLink::ScTableLink(SfxObjectShell* pShell, const OUString& rFile, - const OUString& rFilter, const OUString& rOpt, +ScTableLink::ScTableLink(SfxObjectShell* pShell, OUString aFile, + OUString aFilter, OUString aOpt, sal_Int32 nRefreshDelaySeconds ): ::sfx2::SvBaseLink(SfxLinkUpdateMode::ONCALL,SotClipboardFormatId::SIMPLE_FILE), ScRefreshTimer( nRefreshDelaySeconds ), pImpl( new TableLink_Impl ), - aFileName(rFile), - aFilterName(rFilter), - aOptions(rOpt), + aFileName(std::move(aFile)), + aFilterName(std::move(aFilter)), + aOptions(std::move(aOpt)), bInCreate( false ), bInEdit( false ), bAddUndo( true ) |