Kaydet (Commit) 2a5afded authored tarafından Eike Rathke's avatar Eike Rathke

use LanguageTag

Change-Id: I5e2a41eb94876302f61c261a350b6cf72db41a86
üst 2b0a014d
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <tools/resid.hxx> #include <tools/resid.hxx>
#include <tools/config.hxx> #include <tools/config.hxx>
#include <i18npool/mslangid.hxx> #include <i18npool/mslangid.hxx>
#include <i18npool/languagetag.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
...@@ -230,14 +231,14 @@ bool LanguageSelection::prepareLanguage() ...@@ -230,14 +231,14 @@ bool LanguageSelection::prepareLanguage()
Reference< XChangesBatch >(xProp2, UNO_QUERY_THROW)->commitChanges(); Reference< XChangesBatch >(xProp2, UNO_QUERY_THROW)->commitChanges();
} }
MsLangId::setConfiguredSystemUILanguage( MsLangId::convertLocaleToLanguage(loc) ); MsLangId::setConfiguredSystemUILanguage( LanguageTag(loc).getLanguageType( false) );
OUString sLocale; OUString sLocale;
xProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale"))) >>= sLocale; xProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale"))) >>= sLocale;
if ( !sLocale.isEmpty() ) if ( !sLocale.isEmpty() )
{ {
loc = LanguageSelection::IsoStringToLocale(sLocale); loc = LanguageSelection::IsoStringToLocale(sLocale);
MsLangId::setConfiguredSystemLanguage( MsLangId::convertLocaleToLanguage(loc) ); MsLangId::setConfiguredSystemLanguage( LanguageTag(loc).getLanguageType( false) );
} }
else else
MsLangId::setConfiguredSystemLanguage( MsLangId::getSystemLanguage() ); MsLangId::setConfiguredSystemLanguage( MsLangId::getSystemLanguage() );
...@@ -269,7 +270,7 @@ void LanguageSelection::setDefaultLanguage(const OUString& sLocale) ...@@ -269,7 +270,7 @@ void LanguageSelection::setDefaultLanguage(const OUString& sLocale)
// See #i42730# for rules for determining source of settings // See #i42730# for rules for determining source of settings
// determine script type of locale // determine script type of locale
LanguageType nLang = MsLangId::convertIsoStringToLanguage(sLocale); LanguageType nLang = LanguageTag(sLocale).getLanguageType();
sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(nLang); sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage(nLang);
switch (nScriptType) switch (nScriptType)
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "comphelper/processfactory.hxx" #include "comphelper/processfactory.hxx"
#include "comphelper/servicedecl.hxx" #include "comphelper/servicedecl.hxx"
#include "comphelper/unwrapargs.hxx" #include "comphelper/unwrapargs.hxx"
#include <i18npool/mslangid.hxx> #include <i18npool/languagetag.hxx>
#include "vcl/svapp.hxx" #include "vcl/svapp.hxx"
#include "vcl/msgbox.hxx" #include "vcl/msgbox.hxx"
#include "com/sun/star/lang/XServiceInfo.hpp" #include "com/sun/star/lang/XServiceInfo.hpp"
...@@ -249,8 +249,8 @@ void ServiceImpl::startExecuteModal( ...@@ -249,8 +249,8 @@ void ServiceImpl::startExecuteModal(
static_cast<OWeakObject *>(this) ); static_cast<OWeakObject *>(this) );
AllSettings as = app->GetSettings(); AllSettings as = app->GetSettings();
as.SetUILanguage( as.SetUILanguage(
MsLangId::convertIsoStringToLanguage( LanguageTag(
utl::ConfigManager::getLocale() ) ); utl::ConfigManager::getLocale() ).getLanguageType() );
app->SetSettings( as ); app->SetSettings( as );
app->SetDisplayName( app->SetDisplayName(
utl::ConfigManager::getProductName() + utl::ConfigManager::getProductName() +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment