[Libreoffice-commits] .: desktop/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 16 17:15:57 PST 2012


 desktop/source/app/langselect.cxx                |    7 ++++---
 desktop/source/deployment/gui/dp_gui_service.cxx |    6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 2a5afded31f8bf00a966fd7eaee3b4882541ff0e
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Nov 17 02:15:28 2012 +0100

    use LanguageTag
    
    Change-Id: I5e2a41eb94876302f61c261a350b6cf72db41a86

diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 4bfa8b5..2b17083 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -38,6 +38,7 @@
 #include <tools/resid.hxx>
 #include <tools/config.hxx>
 #include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/configuration/theDefaultProvider.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
@@ -230,14 +231,14 @@ bool LanguageSelection::prepareLanguage()
                 Reference< XChangesBatch >(xProp2, UNO_QUERY_THROW)->commitChanges();
             }
 
-            MsLangId::setConfiguredSystemUILanguage( MsLangId::convertLocaleToLanguage(loc) );
+            MsLangId::setConfiguredSystemUILanguage( LanguageTag(loc).getLanguageType( false) );
 
             OUString sLocale;
             xProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale"))) >>= sLocale;
             if ( !sLocale.isEmpty() )
             {
                 loc = LanguageSelection::IsoStringToLocale(sLocale);
-                MsLangId::setConfiguredSystemLanguage( MsLangId::convertLocaleToLanguage(loc) );
+                MsLangId::setConfiguredSystemLanguage( LanguageTag(loc).getLanguageType( false) );
             }
             else
                 MsLangId::setConfiguredSystemLanguage( MsLangId::getSystemLanguage() );
@@ -269,7 +270,7 @@ void LanguageSelection::setDefaultLanguage(const OUString& sLocale)
     // See #i42730# for rules for determining source of settings
 
     // determine script type of locale
-    LanguageType nLang = MsLangId::convertIsoStringToLanguage(sLocale);
+    LanguageType nLang = LanguageTag(sLocale).getLanguageType();
     sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(nLang);
 
     switch (nScriptType)
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index 6f067b9..a55d2f7 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -36,7 +36,7 @@
 #include "comphelper/processfactory.hxx"
 #include "comphelper/servicedecl.hxx"
 #include "comphelper/unwrapargs.hxx"
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
 #include "vcl/svapp.hxx"
 #include "vcl/msgbox.hxx"
 #include "com/sun/star/lang/XServiceInfo.hpp"
@@ -249,8 +249,8 @@ void ServiceImpl::startExecuteModal(
                                         static_cast<OWeakObject *>(this) );
             AllSettings as = app->GetSettings();
             as.SetUILanguage(
-                MsLangId::convertIsoStringToLanguage(
-                    utl::ConfigManager::getLocale() ) );
+                LanguageTag(
+                    utl::ConfigManager::getLocale() ).getLanguageType() );
             app->SetSettings( as );
             app->SetDisplayName(
                 utl::ConfigManager::getProductName() +


More information about the Libreoffice-commits mailing list