summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-05-03 14:59:33 +0200
committerEike Rathke <erack@redhat.com>2018-05-04 12:13:55 +0200
commit90df301f6d4e7ab0b660d9e39c6fe639ef5ae348 (patch)
treeefda4a42968141ecf1fa8d5b1c95c3dce5370321 /svl
parent10a047ae8a6e5c47edc1ca11ed573f340b249f61 (diff)
Use the currently active locale if no format passed
No format passed doesn't necessarily mean the init/system locale, use the locale set at SvNumberFormatter::IsNumberFormat() Change-Id: Ief1025fa14145396ba096842e2f3341496ce4ce8 Reviewed-on: https://gerrit.libreoffice.org/53829 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforfind.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index e55786ea9d17..be310b5cf390 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -709,8 +709,9 @@ bool ImpSvNumberInputScan::GetCurrency( const OUString& rString, sal_Int32& nPos
if ( rString.getLength() > nPos )
{
if ( !aUpperCurrSymbol.getLength() )
- { // if no format specified the currency of the initialized formatter
- LanguageType eLang = (mpFormat ? mpFormat->GetLanguage() : pFormatter->GetLanguage());
+ { // If no format specified the currency of the currently active locale.
+ LanguageType eLang = (mpFormat ? mpFormat->GetLanguage() :
+ pFormatter->GetLocaleData()->getLanguageTag().getLanguageType());
aUpperCurrSymbol = pFormatter->GetCharClass()->uppercase(
SvNumberFormatter::GetCurrencyEntry( eLang ).GetSymbol() );
}