Kaydet (Commit) 062e0999 authored tarafından Laurent BP's avatar Laurent BP Kaydeden (comit) Eike Rathke

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: 's avatarEike Rathke <erack@redhat.com>
üst 28f3e44e
...@@ -4487,13 +4487,7 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff, // numb ...@@ -4487,13 +4487,7 @@ bool SvNumberformat::ImpNumberFillWithThousands( OUStringBuffer& sBuff, // numb
; // nothing ; // nothing
break; break;
case '?': case '?':
// erAck: 2008-04-03T16:24+0200 // replace thousand separator with blank
// 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.
sBuff.insert(k, ' '); sBuff.insert(k, ' ');
break; break;
default: default:
......
...@@ -2070,8 +2070,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) ...@@ -2070,8 +2070,8 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
} }
} }
else if (i > 0 && i < nStringsCnt-1 && else if (i > 0 && i < nStringsCnt-1 &&
(cPre == '#' || cPre == '0') && (cPre == '#' || cPre == '0' || cPre == '?') &&
((cNext = NextChar(i)) == '#' || cNext == '0')) // #,# ((cNext = NextChar(i)) == '#' || cNext == '0' || cNext == '?')) // #,#
{ {
nPos = nPos + sStrArray[i].getLength(); nPos = nPos + sStrArray[i].getLength();
if (!bThousand) // only once if (!bThousand) // only once
...@@ -2083,7 +2083,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString ) ...@@ -2083,7 +2083,7 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
nResultStringsCnt--; nResultStringsCnt--;
i++; i++;
} }
else if (i > 0 && (cPre == '#' || cPre == '0') else if (i > 0 && (cPre == '#' || cPre == '0' || cPre == '?')
&& PreviousType(i) == NF_SYMBOLTYPE_DIGIT && PreviousType(i) == NF_SYMBOLTYPE_DIGIT
&& nThousand < FLAG_STANDARD_IN_FORMAT ) && nThousand < FLAG_STANDARD_IN_FORMAT )
{ // #,,,, { // #,,,,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment