[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - svl/source
Eike Rathke
erack at redhat.com
Thu Jan 25 18:30:15 UTC 2018
svl/source/numbers/zforscan.cxx | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 28265db967d90680c1fd754bb746751b849373b3
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 17 12:34:35 2017 +0200
Add to nPos once instead of in each iteration
(cherry picked from commit d728492f4aa195fd4aec3ddb116879de76a95c6d)
Change-Id: I9ab9d5be1edead3a83375d87910bc9128c894b85
Reviewed-on: https://gerrit.libreoffice.org/48302
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index cd09a444c81f..74a765238518 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -2412,19 +2412,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
bDecSep = true;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
OUString& rStr = sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
nCounter++;
i++;
while (i < nAnzStrings &&
sStrArray[i][0] == '0')
{
rStr += sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
nAnzResStrings--;
nCounter++;
i++;
}
+ nPos += rStr.getLength();
}
else
{
@@ -2562,19 +2561,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
bDecSep = true;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
OUString& rStr = sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
- i++;
nCounter++;
+ i++;
while (i < nAnzStrings &&
sStrArray[i][0] == '0')
{
rStr += sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
nAnzResStrings--;
nCounter++;
i++;
}
+ nPos += rStr.getLength();
}
else
{
More information about the Libreoffice-commits
mailing list