[Libreoffice-commits] core.git: svl/source

Eike Rathke erack at redhat.com
Fri May 4 10:14:19 UTC 2018


 svl/source/numbers/zforfind.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 90df301f6d4e7ab0b660d9e39c6fe639ef5ae348
Author: Eike Rathke <erack at redhat.com>
Date:   Thu May 3 14:59:33 2018 +0200

    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 at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>

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() );
         }


More information about the Libreoffice-commits mailing list