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

Eike Rathke erack at redhat.com
Tue Aug 9 10:51:49 UTC 2016


 sc/source/core/data/poolhelp.cxx |    2 +-
 svl/source/numbers/numfmuno.cxx  |    6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 4ff1318860ae664b066409354d37e040713b493a
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Aug 9 12:47:12 2016 +0200

    create SvNumberFormatter with LANGUAGE_SYSTEM instead of ScGlobal::eLnge
    
    They both end up as the same locale, but with LANGUAGE_SYSTEM the LanguageTag
    still has the mbSystemLocale=true "this is the system locale" context.
    
    Change-Id: I7ff8a368e4dc9c6c471dd78be744c842b188478b

diff --git a/sc/source/core/data/poolhelp.cxx b/sc/source/core/data/poolhelp.cxx
index b469155..72360c6 100644
--- a/sc/source/core/data/poolhelp.cxx
+++ b/sc/source/core/data/poolhelp.cxx
@@ -98,7 +98,7 @@ SvNumberFormatter* ScPoolHelper::CreateNumberFormatter() const
     SvNumberFormatter* p = nullptr;
     {
         osl::MutexGuard aGuard(&maMtxCreateNumFormatter);
-        p = new SvNumberFormatter(comphelper::getProcessComponentContext(), ScGlobal::eLnge);
+        p = new SvNumberFormatter(comphelper::getProcessComponentContext(), LANGUAGE_SYSTEM);
     }
     p->SetColorLink( LINK(m_pSourceDoc, ScDocument, GetUserDefinedColor) );
     p->SetEvalDateFormat(NF_EVALDATEFORMAT_INTL_FORMAT);
commit 7c7df2afa93f706cc72b8154b816d3edee1e7eff
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Aug 9 12:44:12 2016 +0200

    remove the duplicated system locale check
    
    ... which is handled by LanguageTag::convertToLanguageType() anyway.
    
    Change-Id: I26656d64fdccf9c06d24c53e1e473e355732e00f

diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index ed122b5..cd78804 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -94,10 +94,6 @@ static const SfxItemPropertyMapEntry* lcl_GetNumberSettingsPropertyMap()
 
 static LanguageType lcl_GetLanguage( const lang::Locale& rLocale )
 {
-    //  empty language -> LANGUAGE_SYSTEM
-    if ( rLocale.Language.isEmpty() )
-        return LANGUAGE_SYSTEM;
-
     LanguageType eRet = LanguageTag::convertToLanguageType( rLocale, false);
     if ( eRet == LANGUAGE_NONE )
         eRet = LANGUAGE_SYSTEM; //! or throw an exception?
commit 0d386267458b881f15e555186b52f7e2517ceca1
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Aug 9 12:36:58 2016 +0200

    do not resolve system locale when queried, rhbz#1364406 related
    
    When loading older documents that calculated a number format on the fly an
    inherited but default format of a type could had been applied using the fixed
    resolved locale instead of the default system locale, which then was stored
    upon save and remained sticky. This because a format the formula depends on
    already was applied using the resolved system locale.
    
    http://bugs.documentfoundation.org/attachment.cgi?id=78559 of tdf#63267
    exhibits the behavior on the hidden sheet 'Festwerte' when unprotected and
    inspecting number formats in column A under Datum.
    
    Change-Id: If23908f259458e988c5164cc5e268bfc9a6a6bcd

diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 3e9436f..ed122b5 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -717,7 +717,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const OUString& aProperty
         }
         else if (aPropertyName == PROPERTYNAME_LOCALE)
         {
-            lang::Locale aLocale( LanguageTag( pFormat->GetLanguage()).getLocale());
+            lang::Locale aLocale( LanguageTag( pFormat->GetLanguage()).getLocale( false));
             aRet <<= aLocale;
         }
         else if (aPropertyName == PROPERTYNAME_TYPE)


More information about the Libreoffice-commits mailing list