summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-12 21:13:18 +0100
committerEike Rathke <erack@redhat.com>2017-12-12 21:14:22 +0100
commitb2cd9dd31183c45942c2f522104654ff1f8e6889 (patch)
tree2cf49c3edcf468b4b2b24f973759acd2bdcfc173
parent482182fd0331a0be371f8f58dc74aa05a68f0a1d (diff)
Resolves: tdf#114185 force KeywordLocalization::LocaleLegacy
... in GetPreviewStringGuess() that is used in Calc TEXT() spreadsheet function, if the format code didn't resolve as English or the format code needs to be (re)parsed otherwise as locale dependent. Also SvNumberFormatterServiceObj::convertNumberToPreviewString() (XNumberFormatPreviewer::convertNumberToPreviewString()) if bAllowEnglish==true. Change-Id: I7c4b1a610d2bcb20fe0f0ae06efc81f998cae048
-rw-r--r--svl/source/numbers/zforlist.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index d85fa3f2eb0b..2a112e866c9f 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -1727,6 +1727,8 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString,
pEntry->GetFormatstring() ) )
{
// other Format
+ // Force locale's keywords.
+ pFormatScanner->ChangeIntl( ImpSvNumberformatScan::KeywordLocalization::LocaleLegacy );
sTmpString = sFormatString;
pEntry.reset(new SvNumberformat( sTmpString, pFormatScanner,
pStringScanner, nCheckPos, eLnge ));
@@ -1747,6 +1749,8 @@ bool SvNumberFormatter::GetPreviewStringGuess( const OUString& sFormatString,
pEntry2->GetFormatstring() ) )
{
// other Format
+ // Force locale's keywords.
+ pFormatScanner->ChangeIntl( ImpSvNumberformatScan::KeywordLocalization::LocaleLegacy );
sTmpString = sFormatString;
pEntry.reset(new SvNumberformat( sTmpString, pFormatScanner,
pStringScanner, nCheckPos, eLnge ));