From 97760eb090ed7d5b9c05ac8ad02a27de1144ecc3 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 16 Nov 2012 22:43:32 +0100 Subject: use LanguageTag Change-Id: I1f0516cc17741e8f87655ad251930a9da7bdb205 --- framework/source/fwi/helper/mischelper.cxx | 4 ++-- framework/source/services/substitutepathvars.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'framework') diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx index 62922814fed2..379ec36e67a0 100644 --- a/framework/source/fwi/helper/mischelper.cxx +++ b/framework/source/fwi/helper/mischelper.cxx @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -179,7 +179,7 @@ void FillLangItems( std::set< OUString > &rLangItems, if ( xLangGuesser.is() && !rGuessedTextLang.isEmpty()) { ::com::sun::star::lang::Locale aLocale(xLangGuesser->guessPrimaryLanguage( rGuessedTextLang, 0, rGuessedTextLang.getLength()) ); - LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); + LanguageType nLang = LanguageTag( aLocale ).makeFallback().getLanguageType(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_NONE && nLang != LANGUAGE_SYSTEM && IsScriptTypeMatchingToLanguage( nScriptType, nLang )) rLangItems.insert( rLanguageTable.GetString( nLang )); diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 7db7b97dae3b..08dd17f29554 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -1193,7 +1193,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable // Detect the language type of the current office aPreDefPathVariables.m_eLanguageType = LANGUAGE_ENGLISH_US; rtl::OUString aLocaleStr( utl::ConfigManager::getLocale() ); - aPreDefPathVariables.m_eLanguageType = MsLangId::convertIsoStringToLanguage( aLocaleStr ); + aPreDefPathVariables.m_eLanguageType = LanguageTag( aLocaleStr ).getLanguageType(); // We used to have an else branch here with a LOG_ERROR, but that // always fired in some unit tests when this code was built with // debug=t, so it seems fairly pointless, especially as -- cgit