diff options
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 16 | ||||
-rw-r--r-- | svl/source/numbers/zforscan.hxx | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index ce04f095c68f..01eb9c319d92 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1036,6 +1036,22 @@ SvNumberformat::SvNumberformat(OUString& rString, { maLocale = aTmpLocale; eLan = aTmpLocale.meLanguage; // return to caller + + // Set new target locale also at scanner. + // We have to do this because switching locale + // may make replacing keywords and separators + // necessary. + // We can do this because it's the first + // subformat and we're still at parsing the + // modifiers, not keywords. + rScan.SetNewLnge( eLan); + // We can not force conversion though because + // the caller may have explicitly not set it. + // In the usual case the target locale is the + // originating locale the conversion is not + // necessary, when reading alien documents + // conversion is enabled anyway. + /* TODO: fiddle with scanner to make this * known? A change in the locale may affect * separators and keywords. On the other diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx index 77f8eef513a8..a5e7ecaa8b3e 100644 --- a/svl/source/numbers/zforscan.hxx +++ b/svl/source/numbers/zforscan.hxx @@ -161,6 +161,7 @@ public: bool GetConvertMode() const { return bConvertMode; } LanguageType GetNewLnge() const { return eNewLnge; } // Read access on ConvertMode and convert country/language LanguageType GetTmpLnge() const { return eTmpLnge; } // Read access on StartCountry/Language + void SetNewLnge( LanguageType e ) { eNewLnge = e; } // Set new convert country/language /// get Thai T speciality sal_uInt8 GetNatNumModifier() const { return nNatNumModifier; } |