diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-12 16:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-18 07:37:31 +0000 |
commit | 789055bc2acb4c71483fd60ea258d158bd5aec10 (patch) | |
tree | 7849de841a71f667a30b2a971ad0c3d406110396 /sc/source/ui/docshell | |
parent | 150ac9cf05ed9da6a2af5bc3f820280fd853e519 (diff) |
clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.
Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh8.cxx | 5 |
4 files changed, 9 insertions, 10 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index c69493a20f29..e7918c6efa01 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -467,7 +467,7 @@ bool ScDocFunc::DetectiveRefresh( bool bAutomatic ) for (size_t i=0; i < nCount; ++i) { const ScDetOpData& rData = pList->GetObject(i); - ScAddress aPos = rData.GetPos(); + const ScAddress& aPos = rData.GetPos(); ScDetectiveFunc aFunc( &rDoc, aPos.Tab() ); SCCOL nCol = aPos.Col(); SCROW nRow = aPos.Row(); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index c86fc9287466..c3bb306c66da 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -639,9 +639,9 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) // (handled by AddInitial) const ScAutoStyleHint& rStlHint = static_cast<const ScAutoStyleHint&>(rHint); - ScRange aRange = rStlHint.GetRange(); - OUString aName1 = rStlHint.GetStyle1(); - OUString aName2 = rStlHint.GetStyle2(); + const ScRange& aRange = rStlHint.GetRange(); + const OUString& aName1 = rStlHint.GetStyle1(); + const OUString& aName2 = rStlHint.GetStyle2(); sal_uInt32 nTimeout = rStlHint.GetTimeout(); if (!pAutoStyleList) diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 729e93173518..9198313c19c4 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -483,9 +483,9 @@ void ScDocShell::CheckConfigOptions() ScModule* pScMod = SC_MOD(); const ScFormulaOptions& rOpt=pScMod->GetFormulaOptions(); - OUString aSepArg = rOpt.GetFormulaSepArg(); - OUString aSepArrRow = rOpt.GetFormulaSepArrayRow(); - OUString aSepArrCol = rOpt.GetFormulaSepArrayCol(); + const OUString& aSepArg = rOpt.GetFormulaSepArg(); + const OUString& aSepArrRow = rOpt.GetFormulaSepArrayRow(); + const OUString& aSepArrCol = rOpt.GetFormulaSepArrayCol(); if (aDecSep == aSepArg || aDecSep == aSepArrRow || aDecSep == aSepArrCol) { diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 2ea750ff808d..9b5df568fc8b 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -1101,9 +1101,8 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi sal_Int32 nLen; if (bIsOctetTextEncoding) { - OUString aOUString( aString); OString aOString; - if (!aOUString.convertToString( &aOString, eCharSet, + if (!aString.convertToString( &aOString, eCharSet, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)) { @@ -1112,7 +1111,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi } nLen = aOString.getLength(); if (!bTest) - SAL_WARN("sc", "ScDocShell::DBaseExport encoding error, string with default replacements: ``" << aOUString << "''\n"); + SAL_WARN("sc", "ScDocShell::DBaseExport encoding error, string with default replacements: ``" << aString << "''\n"); } else nLen = aString.getLength() * sizeof(sal_Unicode); |