[Libreoffice-commits] .: linguistic/source svl/source svtools/source unotools/inc unotools/source vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 21 09:36:23 PST 2012


 linguistic/source/misc.cxx                   |    2 -
 svl/source/config/ctloptions.cxx             |    2 -
 svl/source/config/languageoptions.cxx        |    2 -
 svl/source/items/style.cxx                   |    2 -
 svl/source/numbers/zforlist.cxx              |   16 ++++-----
 svtools/source/table/cellvalueconversion.cxx |    4 +-
 unotools/inc/unotools/syslocale.hxx          |    9 +----
 unotools/inc/unotools/syslocaleoptions.hxx   |   14 ++++----
 unotools/source/config/compatibility.cxx     |    2 -
 unotools/source/config/fontcfg.cxx           |    4 +-
 unotools/source/config/syslocaleoptions.cxx  |   44 +++------------------------
 unotools/source/misc/syslocale.cxx           |   28 ++++-------------
 vcl/source/app/settings.cxx                  |   10 +++---
 13 files changed, 47 insertions(+), 92 deletions(-)

New commits:
commit b8a467b70756b83c8aeb77f385ea1e368350d370
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Nov 21 18:34:53 2012 +0100

    obtain LanguageTag from SvtSysLocale
    
    Change-Id: Iaee25f1d92349704eaae45e6582d31dfa718ddcb

diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 02c5ef8..53afb41 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -77,7 +77,7 @@ osl::Mutex &    GetLinguMutex()
 LocaleDataWrapper & GetLocaleDataWrapper( sal_Int16 nLang )
 {
     static LocaleDataWrapper aLclDtaWrp(
-                CreateLocale( SvtSysLocale().GetUILanguage() ) );
+                CreateLocale( SvtSysLocale().GetLanguageTag().getLanguageType() ) );
 
     const Locale &rLcl = aLclDtaWrp.getLoadedLocale();
     Locale aLcl( CreateLocale( nLang ) );
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index 36d8df1..9a4fcb1 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -293,7 +293,7 @@ void SvtCTLOptions_Impl::Load()
             ((eSystemLanguage != LANGUAGE_SYSTEM)  && ( nWinScript & SCRIPTTYPE_COMPLEX )))  )
     {
         m_bCTLFontEnabled = sal_True;
-        sal_uInt16 nLanguage = SvtSysLocale().GetLanguage();
+        sal_uInt16 nLanguage = SvtSysLocale().GetLanguageTag().getLanguageType();
         //enable sequence checking for the appropriate languages
         m_bCTLSequenceChecking = m_bCTLRestricted = m_bCTLTypeAndReplace =
             (MsLangId::needsSequenceChecking( nLanguage) ||
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index c73318c..cdf61e8 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -149,7 +149,7 @@ sal_uInt16 SvtLanguageOptions::GetScriptTypeOfLanguage( sal_uInt16 nLang )
     if( LANGUAGE_DONTKNOW == nLang )
         nLang = LANGUAGE_ENGLISH_US;
     else if( LANGUAGE_SYSTEM == nLang  )
-        nLang = SvtSysLocale().GetLanguage();
+        nLang = SvtSysLocale().GetLanguageTag().getLanguageType();
 
     sal_Int16 nScriptType = MsLangId::getScriptType( nLang );
     sal_uInt16 nScript;
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 1c8a7c8..1bc6d17 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -334,7 +334,7 @@ XubString SfxStyleSheetBase::GetDescription( SfxMapUnit eMetric )
     const SfxPoolItem* pItem = aIter.FirstItem();
 
     IntlWrapper aIntlWrapper(comphelper::getProcessServiceFactory(),
-            SvtSysLocale().GetLanguage());
+            SvtSysLocale().GetLanguageTag().getLocale());
     while ( pItem )
     {
         XubString aItemPresentation;
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index f609417..af30c94 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -636,13 +636,13 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
     // #62389# empty format string (of Writer) => General standard format
     if (!rString.Len())
         ;   // nothing
-    else if (eLnge == LANGUAGE_SYSTEM && eSysLnge != SvtSysLocale().GetLanguage())
+    else if (eLnge == LANGUAGE_SYSTEM && eSysLnge != SvtSysLocale().GetLanguageTag().getLanguageType())
     {
         sal_uInt32 nOrig = GetEntryKey( rString, eSysLnge );
         if (nOrig == NUMBERFORMAT_ENTRY_NOT_FOUND)
             nKey = nOrig;   // none avaliable, maybe user-defined
         else
-            nKey = GetFormatForLanguageIfBuiltIn( nOrig, SvtSysLocale().GetLanguage() );
+            nKey = GetFormatForLanguageIfBuiltIn( nOrig, SvtSysLocale().GetLanguageTag().getLanguageType() );
 
         if (nKey == nOrig)
         {
@@ -651,7 +651,7 @@ sal_uInt32 SvNumberFormatter::GetIndexPuttingAndConverting( String & rString,
             // language and wouldn't match eSysLnge anymore, do that on a copy.
             String aTmp( rString);
             rNewInserted = PutandConvertEntrySystem( aTmp, rCheckPos, rType,
-                                                     nKey, eLnge, SvtSysLocale().GetLanguage());
+                                                     nKey, eLnge, SvtSysLocale().GetLanguageTag().getLanguageType());
             if (rCheckPos > 0)
             {
                 SAL_WARN( "svl.numbers", "SvNumberFormatter::GetIndexPuttingAndConverting: bad format code string for current locale");
@@ -702,7 +702,7 @@ void SvNumberFormatter::DeleteEntry(sal_uInt32 nKey)
 
 bool SvNumberFormatter::Load( SvStream& rStream )
 {
-    LanguageType eSysLang = SvtSysLocale().GetLanguage();
+    LanguageType eSysLang = SvtSysLocale().GetLanguageTag().getLanguageType();
     SvNumberFormatter* pConverter = NULL;
 
     ImpSvNumMultipleReadHeader aHdr( rStream );
@@ -802,7 +802,7 @@ bool SvNumberFormatter::Save( SvStream& rStream ) const
     // As of 364i we store what SYSTEM locale really was, before it was hard
     // coded LANGUAGE_SYSTEM.
     rStream << (sal_uInt16) SV_NUMBERFORMATTER_VERSION;
-    rStream << (sal_uInt16) SvtSysLocale().GetLanguage() << (sal_uInt16) IniLnge;
+    rStream << (sal_uInt16) SvtSysLocale().GetLanguageTag().getLanguageType() << (sal_uInt16) IniLnge;
     const SvNumberFormatTable* pTable = &aFTable;
     SvNumberFormatTable::const_iterator it = pTable->begin();
     while (it != pTable->end())
@@ -3167,7 +3167,7 @@ void SvNumberFormatter::SetDefaultSystemCurrency( const String& rAbbrev, Languag
 {
     ::osl::MutexGuard aGuard( GetMutex() );
     if ( eLang == LANGUAGE_SYSTEM )
-        eLang = SvtSysLocale().GetLanguage();
+        eLang = SvtSysLocale().GetLanguageTag().getLanguageType();
     const NfCurrencyTable& rTable = GetTheCurrencyTable();
     sal_uInt16 nCount = rTable.size();
     if ( rAbbrev.Len() )
@@ -3562,10 +3562,10 @@ void SvNumberFormatter::ImpInitCurrencyTable()
 
     RTL_LOGFILE_CONTEXT_AUTHOR( aTimeLog, "svl", "er93726", "SvNumberFormatter::ImpInitCurrencyTable" );
 
-    LanguageType eSysLang = SvtSysLocale().GetLanguage();
+    LanguageType eSysLang = SvtSysLocale().GetLanguageTag().getLanguageType();
     LocaleDataWrapper* pLocaleData = new LocaleDataWrapper(
         ::comphelper::getProcessComponentContext(),
-        LanguageTag( eSysLang ).getLocale() );
+        SvtSysLocale().GetLanguageTag().getLocale() );
     // get user configured currency
     String aConfiguredCurrencyAbbrev;
     LanguageType eConfiguredCurrencyLanguage = LANGUAGE_SYSTEM;
diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx
index fba286c..d47210b 100644
--- a/svtools/source/table/cellvalueconversion.cxx
+++ b/svtools/source/table/cellvalueconversion.cxx
@@ -146,7 +146,7 @@ namespace svt
                 ENSURE_OR_THROW( i_formatter.is(), "StandardFormatNormalizer: no formatter!" );
                 Reference< XNumberFormatsSupplier > const xSupplier( i_formatter->getNumberFormatsSupplier(), UNO_SET_THROW );
                 Reference< XNumberFormatTypes > const xTypes( xSupplier->getNumberFormats(), UNO_QUERY_THROW );
-                m_nFormatKey = xTypes->getStandardFormat( i_numberFormatType, SvtSysLocale().GetLocale() );
+                m_nFormatKey = xTypes->getStandardFormat( i_numberFormatType, SvtSysLocale().GetLanguageTag().getLocale() );
             }
             catch( const Exception& )
             {
@@ -341,7 +341,7 @@ namespace svt
 
                 // a supplier of number formats
                 Sequence< Any > aInitArgs(1);
-                aInitArgs[0] <<= SvtSysLocale().GetLocale();
+                aInitArgs[0] <<= SvtSysLocale().GetLanguageTag().getLocale();
 
                 Reference< XNumberFormatsSupplier > const xSupplier(
                     io_data.aContext.createComponentWithArguments( "com.sun.star.util.NumberFormatsSupplier", aInitArgs ),
diff --git a/unotools/inc/unotools/syslocale.hxx b/unotools/inc/unotools/syslocale.hxx
index d10e2c9..e148504 100644
--- a/unotools/inc/unotools/syslocale.hxx
+++ b/unotools/inc/unotools/syslocale.hxx
@@ -23,15 +23,14 @@
 #include "unotools/unotoolsdllapi.h"
 #include <unotools/localedatawrapper.hxx>
 #include <unotools/charclass.hxx>
+#include <i18npool/languagetag.hxx>
 #include <sal/types.h>
-#include <i18npool/lang.h>
 #include <rtl/textenc.h>
 
 class SvtSysLocale_Impl;
 class SvtSysLocaleOptions;
 
 namespace osl { class Mutex; }
-class LocaleDataWrapper;
 
 /**
     SvtSysLocale provides a refcounted single instance of an application wide
@@ -65,10 +64,8 @@ public:
             const LocaleDataWrapper*    GetLocaleDataPtr() const;
             const CharClass*            GetCharClassPtr() const;
             SvtSysLocaleOptions&        GetOptions() const;
-            com::sun::star::lang::Locale GetLocale() const;
-            LanguageType                GetLanguage() const;
-            com::sun::star::lang::Locale GetUILocale() const;
-            LanguageType                GetUILanguage() const;
+            const LanguageTag&          GetLanguageTag() const;
+            const LanguageTag&          GetUILanguageTag() const;
 
     /** Get the best MIME encoding matching the system locale, or if that isn't
         determinable one that matches the UI locale, or UTF8 if everything else
diff --git a/unotools/inc/unotools/syslocaleoptions.hxx b/unotools/inc/unotools/syslocaleoptions.hxx
index a7d1f84..d9bb17e 100644
--- a/unotools/inc/unotools/syslocaleoptions.hxx
+++ b/unotools/inc/unotools/syslocaleoptions.hxx
@@ -26,9 +26,9 @@
 #include <tools/solar.h>
 #include <tools/link.hxx>
 #include <i18npool/lang.h>
+#include <i18npool/languagetag.hxx>
 #include <tools/string.hxx>
 #include <unotools/options.hxx>
-#include <com/sun/star/lang/Locale.hpp>
 
 // bits for broadcasting hints of changes in a SfxSimpleHint, may be combined
 const sal_uLong SYSLOCALEOPTIONS_HINT_LOCALE       = 0x00000001;
@@ -99,14 +99,16 @@ public:
     /// The config string may be empty to denote the SYSTEM locale
             const ::rtl::OUString&  GetLocaleConfigString() const;
             void                SetLocaleConfigString( const ::rtl::OUString& rStr );
-            com::sun::star::lang::Locale GetLocale() const;
-            com::sun::star::lang::Locale GetRealLocale() const;
-            LanguageType        GetRealLanguage() const;
+            /** Get locale set, if empty denotes SYSTEM locale, not resolved
+                to the real locale. */
+            LanguageTag         GetLanguageTag() const;
+            /** Get locale set, always resolved to the real locale. */
+            const LanguageTag&  GetRealLanguageTag() const;
 
     /// The config string may be empty to denote the SYSTEM locale
             void                SetUILocaleConfigString( const ::rtl::OUString& rStr );
-            com::sun::star::lang::Locale GetRealUILocale() const;
-            LanguageType        GetRealUILanguage() const;
+            /** Get UI locale set, always resolved to the real locale. */
+            const LanguageTag&  GetRealUILanguageTag() const;
 
     /// The config string may be empty to denote the default currency of the locale
             const ::rtl::OUString&  GetCurrencyConfigString() const;
diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx
index 8278137..e5079a9 100644
--- a/unotools/source/config/compatibility.cxx
+++ b/unotools/source/config/compatibility.cxx
@@ -404,7 +404,7 @@ SvtCompatibilityOptions_Impl::SvtCompatibilityOptions_Impl()
         if ( !bDefaultFound && aItem.sName.equals( COMPATIBILITY_DEFAULT_NAME ) != sal_False )
         {
             SvtSysLocale aSysLocale;
-            com::sun::star::lang::Locale aLocale = aSysLocale.GetLocale();
+            com::sun::star::lang::Locale aLocale = aSysLocale.GetLanguageTag().getLocale();
             if ( aLocale.Language == "zh" || aLocale.Language == "ja" || aLocale.Language == "ko" )
                 aItem.bExpandWordSpace = false;
 
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 314fed4..ce1f465 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -252,7 +252,7 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale )
 {
     Locale aLocale = rLocale;
     if( aLocale.Language.isEmpty() )
-        aLocale = SvtSysLocale().GetUILocale();
+        aLocale = SvtSysLocale().GetUILanguageTag().getLocale();
 
     OUString aUIFont = getDefaultFont( aLocale, DEFAULTFONT_UI_SANS );
 
@@ -1160,7 +1160,7 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const String& rFontNam
     aLocale.Variant = rLocale.Variant.toAsciiUpperCase();
 
     if( aLocale.Language.isEmpty() )
-        aLocale = SvtSysLocale().GetUILocale();
+        aLocale = SvtSysLocale().GetUILanguageTag().getLocale();
 
     while( !aLocale.Language.isEmpty() )
     {
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index 10c7574..785cf33 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -49,26 +49,6 @@ namespace
         : public rtl::Static<Link, CurrencyChangeLink> {};
 }
 
-static com::sun::star::lang::Locale lcl_str_to_locale( const ::rtl::OUString rStr )
-{
-    com::sun::star::lang::Locale aRet;
-    if ( !rStr.isEmpty() )
-    {
-        aRet = com::sun::star::lang::Locale();
-        sal_Int32 nSep = rStr.indexOf('-');
-        if (nSep < 0)
-            aRet.Language = rStr;
-        else
-        {
-            aRet.Language = rStr.copy(0, nSep);
-            if (nSep < rStr.getLength())
-                aRet.Country = rStr.copy(nSep+1, rStr.getLength() - (nSep+1));
-        }
-    }
-
-    return aRet;
-}
-
 class SvtSysLocaleOptions_Impl : public utl::ConfigItem
 {
         LanguageTag             m_aRealLocale;
@@ -121,10 +101,8 @@ public:
             void                SetIgnoreLanguageChange( sal_Bool bSet);
 
             sal_Bool            IsReadOnly( SvtSysLocaleOptions::EOption eOption ) const;
-            const Locale&       GetRealLocale() { return m_aRealLocale.getLocale(); }
-            const Locale&       GetRealUILocale() { return m_aRealUILocale.getLocale(); }
-            LanguageType        GetRealLanguage() { return m_aRealLocale.getLanguageType(); }
-            LanguageType        GetRealUILanguage() { return m_aRealUILocale.getLanguageType(); }
+            const LanguageTag&  GetRealLocale() { return m_aRealLocale; }
+            const LanguageTag&  GetRealUILocale() { return m_aRealUILocale; }
 };
 
 
@@ -755,30 +733,20 @@ void SvtSysLocaleOptions::ConfigurationChanged( utl::ConfigurationBroadcaster* p
     ::utl::detail::Options::ConfigurationChanged( p, nHint );
 }
 
-com::sun::star::lang::Locale SvtSysLocaleOptions::GetLocale() const
+LanguageTag SvtSysLocaleOptions::GetLanguageTag() const
 {
-    return lcl_str_to_locale( GetLocaleConfigString() );
+    return LanguageTag( GetLocaleConfigString() );
 }
 
-com::sun::star::lang::Locale SvtSysLocaleOptions::GetRealLocale() const
+const LanguageTag & SvtSysLocaleOptions::GetRealLanguageTag() const
 {
     return pOptions->GetRealLocale();
 }
 
-com::sun::star::lang::Locale SvtSysLocaleOptions::GetRealUILocale() const
+const LanguageTag & SvtSysLocaleOptions::GetRealUILanguageTag() const
 {
     return pOptions->GetRealUILocale();
 }
 
-LanguageType SvtSysLocaleOptions::GetRealLanguage() const
-{
-    return pOptions->GetRealLanguage();
-}
-
-LanguageType SvtSysLocaleOptions::GetRealUILanguage() const
-{
-    return pOptions->GetRealUILanguage();
-}
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unotools/source/misc/syslocale.cxx b/unotools/source/misc/syslocale.cxx
index a769e8b..c8b0fe1 100644
--- a/unotools/source/misc/syslocale.cxx
+++ b/unotools/source/misc/syslocale.cxx
@@ -20,9 +20,7 @@
 
 #include <unotools/syslocale.hxx>
 #include <unotools/syslocaleoptions.hxx>
-#include <unotools/localedatawrapper.hxx>
 #include <comphelper/processfactory.hxx>
-#include <i18npool/mslangid.hxx>
 #include <rtl/tencinfo.h>
 #include <rtl/locale.h>
 #include <osl/nlsupport.h>
@@ -57,7 +55,7 @@ private:
 
 SvtSysLocale_Impl::SvtSysLocale_Impl() : pCharClass(NULL)
 {
-    pLocaleData = new LocaleDataWrapper( aSysLocaleOptions.GetRealLocale() );
+    pLocaleData = new LocaleDataWrapper( aSysLocaleOptions.GetRealLanguageTag().getLocale() );
     setDateAcceptancePatternsConfig();
 
     // listen for further changes
@@ -75,7 +73,7 @@ SvtSysLocale_Impl::~SvtSysLocale_Impl()
 CharClass* SvtSysLocale_Impl::GetCharClass()
 {
     if ( !pCharClass )
-        pCharClass = new CharClass( aSysLocaleOptions.GetRealLocale() );
+        pCharClass = new CharClass( aSysLocaleOptions.GetRealLanguageTag().getLocale() );
     return pCharClass;
 }
 
@@ -85,7 +83,7 @@ void SvtSysLocale_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*, sa
 
     if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE )
     {
-        com::sun::star::lang::Locale aLocale( aSysLocaleOptions.GetRealLocale() );
+        com::sun::star::lang::Locale aLocale( aSysLocaleOptions.GetRealLanguageTag().getLocale() );
         pLocaleData->setLocale( aLocale );
         GetCharClass()->setLocale( aLocale );
     }
@@ -185,24 +183,14 @@ SvtSysLocaleOptions& SvtSysLocale::GetOptions() const
     return pImpl->aSysLocaleOptions;
 }
 
-com::sun::star::lang::Locale SvtSysLocale::GetLocale() const
+const LanguageTag& SvtSysLocale::GetLanguageTag() const
 {
-    return pImpl->aSysLocaleOptions.GetRealLocale();
+    return pImpl->aSysLocaleOptions.GetRealLanguageTag();
 }
 
-LanguageType SvtSysLocale::GetLanguage() const
+const LanguageTag& SvtSysLocale::GetUILanguageTag() const
 {
-    return pImpl->aSysLocaleOptions.GetRealLanguage();
-}
-
-com::sun::star::lang::Locale SvtSysLocale::GetUILocale() const
-{
-    return pImpl->aSysLocaleOptions.GetRealUILocale();
-}
-
-LanguageType SvtSysLocale::GetUILanguage() const
-{
-    return pImpl->aSysLocaleOptions.GetRealUILanguage();
+    return pImpl->aSysLocaleOptions.GetRealUILanguageTag();
 }
 
 //------------------------------------------------------------------------
@@ -216,7 +204,7 @@ rtl_TextEncoding SvtSysLocale::GetBestMimeEncoding()
     {
         // If the system locale is unknown to us, e.g. LC_ALL=xx, match the UI
         // language if possible.
-        ::com::sun::star::lang::Locale aLocale( SvtSysLocale().GetUILocale() );
+        ::com::sun::star::lang::Locale aLocale( SvtSysLocale().GetUILanguageTag().getLocale() );
         rtl_Locale * pLocale = rtl_locale_register( aLocale.Language.getStr(),
                 aLocale.Country.getStr(), aLocale.Variant.getStr() );
         rtl_TextEncoding nEnc = osl_getTextEncodingFromLocale( pLocale );
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 82440fd..aa42cb6 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1540,7 +1540,7 @@ bool AllSettings::GetLayoutRTL() const
 const ::com::sun::star::lang::Locale& AllSettings::GetLocale() const
 {
     if ( mpData->maLocale.Language.isEmpty() )
-        mpData->maLocale = mpData->maSysLocale.GetLocale();
+        mpData->maLocale = mpData->maSysLocale.GetLanguageTag().getLocale();
 
     return mpData->maLocale;
 }
@@ -1551,7 +1551,7 @@ const ::com::sun::star::lang::Locale& AllSettings::GetUILocale() const
 {
     // the UILocale is never changed
     if ( mpData->maUILocale.Language.isEmpty() )
-        mpData->maUILocale = mpData->maSysLocale.GetUILocale();
+        mpData->maUILocale = mpData->maSysLocale.GetUILanguageTag().getLocale();
 
     return mpData->maUILocale;
 }
@@ -1562,7 +1562,7 @@ LanguageType AllSettings::GetLanguage() const
 {
     // meLanguage == LANGUAGE_SYSTEM means: use settings from SvtSysLocale
     if ( mpData->meLanguage == LANGUAGE_SYSTEM )
-        return mpData->maSysLocale.GetLanguage();
+        return mpData->maSysLocale.GetLanguageTag().getLanguageType();
 
     return mpData->meLanguage;
 }
@@ -1572,7 +1572,7 @@ LanguageType AllSettings::GetLanguage() const
 LanguageType AllSettings::GetUILanguage() const
 {
     // the UILanguage is never changed
-    return mpData->maSysLocale.GetUILanguage();
+    return mpData->maSysLocale.GetUILanguageTag().getLanguageType();
 }
 
 // -----------------------------------------------------------------------
@@ -1628,7 +1628,7 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint )
     }
 
     if ( (nHint & SYSLOCALEOPTIONS_HINT_LOCALE) )
-        aAllSettings.SetLocale( aAllSettings.mpData->maSysLocale.GetOptions().GetLocale() );
+        aAllSettings.SetLocale( aAllSettings.mpData->maSysLocale.GetOptions().GetLanguageTag().getLocale() );
 
     Application::SetSettings( aAllSettings );
 }


More information about the Libreoffice-commits mailing list