diff options
author | Noel <noelgrandin@gmail.com> | 2020-09-30 09:37:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-30 12:36:51 +0200 |
commit | b29ec8b26bddc03661c527b603863d9e738d1210 (patch) | |
tree | 829f01d36d867f717d4a3c9373842510bbc76e77 /sc/source/core/tool/interpr1.cxx | |
parent | 9373320fc88c1582a2ad25bda9c5264c7c58a97e (diff) |
loplugin:reducevarscope in sc
Change-Id: If88c71351fb157b8eab242fceb65422f05eec3d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103645
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/tool/interpr1.cxx')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 65254b7f4a39..42bdee5716f9 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -3346,7 +3346,7 @@ void ScInterpreter::ScNumberValue() return; OUString aInputString; - OUString aDecimalSeparator, aGroupSeparator; + OUString aGroupSeparator; sal_Unicode cDecimalSeparator = 0; if ( nParamCount == 3 ) @@ -3354,7 +3354,7 @@ void ScInterpreter::ScNumberValue() if ( nParamCount >= 2 ) { - aDecimalSeparator = GetString().getString(); + OUString aDecimalSeparator = GetString().getString(); if ( aDecimalSeparator.getLength() == 1 ) cDecimalSeparator = aDecimalSeparator[ 0 ]; else @@ -5877,13 +5877,12 @@ void ScInterpreter::IterateParametersIfs( double(*ResultFunc)( const sc::ParamIf const ScComplexRefData* pRefData = pMainRangeToken->GetDoubleRef(); if (!pRefData->IsDeleted()) { - ScRange aSubRange; DoubleRefToRange( *pRefData, aMainRange); if (aMainRange.aStart.Tab() == aMainRange.aEnd.Tab()) { // Shrink the range to actual data content. - aSubRange = aMainRange; + ScRange aSubRange = aMainRange; mrDoc.GetDataAreaSubrange(aSubRange); nStartColDiff = aSubRange.aStart.Col() - aMainRange.aStart.Col(); @@ -7229,10 +7228,10 @@ void ScInterpreter::CalculateLookup(bool bHLookup) SCTAB nTab1 = 0; SCCOL nCol2 = 0; SCROW nRow2 = 0; - SCTAB nTab2; StackVar eType = GetStackType(); if (eType == svDoubleRef) { + SCTAB nTab2; PopDoubleRef(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2); if (nTab1 != nTab2) { |