summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-02 13:37:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-04 14:06:37 +0200
commita36ada7c5400735b6d03d7215a32ea7e98aacd63 (patch)
treed90c9995144614d47b997f8becdf488caa25cd53 /svl
parent27f1827afa11ba9c5d912614dc84dd308ecf8b5f (diff)
loplugin:reducevarscope in store..svtools
Change-Id: Iaa6c6eac15cb73fc2a76ba1c5241297c94d297cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103839 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforfind.cxx3
-rw-r--r--svl/source/numbers/zforlist.cxx6
2 files changed, 3 insertions, 6 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 57a3f0233d45..dfa10d79a41c 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -3698,7 +3698,6 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
const SvNumberformat* pFormat, // maybe a number format to match against
SvNumInputOptions eInputOptions )
{
- OUString aString;
bool res; // return value
sal_uInt16 k;
eSetType = F_Type; // old type set
@@ -3714,7 +3713,7 @@ bool ImpSvNumberInputScan::IsNumberFormat( const OUString& rString, // s
else
{
// NoMoreUpperNeeded, all comparisons on UpperCase
- aString = pFormatter->GetCharClass()->uppercase( rString );
+ OUString aString = pFormatter->GetCharClass()->uppercase( rString );
// convert native number to ASCII if necessary
TransformInput(pFormatter, aString);
res = IsNumberFormatMain( aString, pFormat );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index de29679297aa..cced64f86d8c 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1718,7 +1718,6 @@ bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString,
{
return false;
}
- sal_uInt32 nKey;
if (eLnge == LANGUAGE_DONTKNOW)
{
eLnge = IniLnge;
@@ -1735,7 +1734,7 @@ bool SvNumberFormatter::GetPreviewString(const OUString& sFormatString,
if (nCheckPos == 0) // String ok
{
sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // create new standard formats if necessary
- nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLnge);
+ sal_uInt32 nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLnge);
if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // already present
{
GetOutputString(fPreviewNumber, nKey, sOutString, ppColor, bUseStarFormat);
@@ -1872,7 +1871,6 @@ bool SvNumberFormatter::GetPreviewString( const OUString& sFormatString,
{
return false;
}
- sal_uInt32 nKey;
if (eLnge == LANGUAGE_DONTKNOW)
{
eLnge = IniLnge;
@@ -1890,7 +1888,7 @@ bool SvNumberFormatter::GetPreviewString( const OUString& sFormatString,
{
// May have to create standard formats for this locale.
sal_uInt32 CLOffset = ImpGenerateCL(eLnge);
- nKey = ImpIsEntry( p_Entry->GetFormatstring(), CLOffset, eLnge);
+ sal_uInt32 nKey = ImpIsEntry( p_Entry->GetFormatstring(), CLOffset, eLnge);
if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // already present
{
GetOutputString( sPreviewString, nKey, sOutString, ppColor);