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/unoobj/nameuno.cxx | |
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/unoobj/nameuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/nameuno.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 842a4e56de90..6d6a56a6d85b 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -19,6 +19,7 @@ #include <o3tl/safeint.hxx> #include <svl/hint.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/sheet/NamedRangeFlag.hpp> @@ -81,10 +82,10 @@ static bool lcl_UserVisibleName(const ScRangeData& rData) return !rData.HasType(ScRangeData::Type::Database); } -ScNamedRangeObj::ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > const & xParent, ScDocShell* pDocSh, const OUString& rNm, Reference<container::XNamed> const & xSheet): - mxParent(xParent), +ScNamedRangeObj::ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > xParent, ScDocShell* pDocSh, OUString aNm, Reference<container::XNamed> const & xSheet): + mxParent(std::move(xParent)), pDocShell( pDocSh ), - aName( rNm ), + aName(std::move( aNm )), mxSheet( xSheet ) { pDocShell->GetDocument().AddUnoObject(*this); @@ -828,9 +829,9 @@ SCTAB ScGlobalNamedRangesObj::GetTab_Impl() return -1; } -ScLocalNamedRangesObj::ScLocalNamedRangesObj( ScDocShell* pDocSh, uno::Reference<container::XNamed> const & xSheet ) +ScLocalNamedRangesObj::ScLocalNamedRangesObj( ScDocShell* pDocSh, uno::Reference<container::XNamed> xSheet ) : ScNamedRangesObj(pDocSh), - mxSheet(xSheet) + mxSheet(std::move(xSheet)) { } |