summaryrefslogtreecommitdiff
path: root/desktop/source/app/langselect.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-17 02:15:28 +0100
committerEike Rathke <erack@redhat.com>2012-11-17 02:15:33 +0100
commit2a5afded31f8bf00a966fd7eaee3b4882541ff0e (patch)
tree3f90e2a0db42a61343137edea172dd9a24ba4cd6 /desktop/source/app/langselect.cxx
parent2b0a014dce8bf811d82fdfb3c287a6e9dfab95de (diff)
use LanguageTag
Change-Id: I5e2a41eb94876302f61c261a350b6cf72db41a86
Diffstat (limited to 'desktop/source/app/langselect.cxx')
-rw-r--r--desktop/source/app/langselect.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 4bfa8b5d597e..2b17083e524f 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)