diff options
author | Laurent BP <laurent.balland-poirier@laposte.net> | 2018-06-15 20:41:18 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-06-20 00:39:50 +0200 |
commit | 062e0999c2b7923e463f1611204a63f0bb7b6404 (patch) | |
tree | a26459ea050c86c5f67aa4e078750c03bdce15fb /svl | |
parent | 28f3e44e99283ede636c28c68bffb2b9df0bbcf8 (diff) |
tdf#117575 treat thousand sep with ? in integer part
'?' was missing when treating thousand separator
However, format with '?' in integer part are not
saved in ODF.
Change-Id: I1d684a31f800f10bf9a04babb0b9fec34e28e72a
Reviewed-on: https://gerrit.libreoffice.org/55901
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 8 | ||||
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 6 |
2 files changed, 4 insertions, 10 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index fd482cc27f2e..53e7a02e9acf 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -4487,13 +4487,7 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff, // numb ; // nothing break; case '?': - // erAck: 2008-04-03T16:24+0200 - // Actually this currently isn't executed - // because the format scanner in the context of - // "?," doesn't generate a group separator but - // a literal ',' character instead that is - // inserted unconditionally. Should be changed - // on some occasion. + // replace thousand separator with blank sBuff.insert(k, ' '); break; default: diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 40b522d074a9..ea9e24236b4c 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -2070,8 +2070,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) } } else if (i > 0 && i < nStringsCnt-1 && - (cPre == '#' || cPre == '0') && - ((cNext = NextChar(i)) == '#' || cNext == '0')) // #,# + (cPre == '#' || cPre == '0' || cPre == '?') && + ((cNext = NextChar(i)) == '#' || cNext == '0' || cNext == '?')) // #,# { nPos = nPos + sStrArray[i].getLength(); if (!bThousand) // only once @@ -2083,7 +2083,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) nResultStringsCnt--; i++; } - else if (i > 0 && (cPre == '#' || cPre == '0') + else if (i > 0 && (cPre == '#' || cPre == '0' || cPre == '?') && PreviousType(i) == NF_SYMBOLTYPE_DIGIT && nThousand < FLAG_STANDARD_IN_FORMAT ) { // #,,,, |