diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-16 22:43:32 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-16 22:43:38 +0100 |
commit | 97760eb090ed7d5b9c05ac8ad02a27de1144ecc3 (patch) | |
tree | d073459b2ce7ba0a98aecd125141fea320d68ed1 | |
parent | 15e274a37c75eedb6e2fae07e4689cef67cdf2d7 (diff) |
use LanguageTag
Change-Id: I1f0516cc17741e8f87655ad251930a9da7bdb205
-rw-r--r-- | framework/source/fwi/helper/mischelper.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/substitutepathvars.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
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 <tools/debug.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> -#include <i18npool/mslangid.hxx> +#include <i18npool/languagetag.hxx> #include <svtools/langtab.hxx> #include <comphelper/processfactory.hxx> #include <helper/mischelper.hxx> @@ -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 <osl/security.hxx> #include <osl/socket.hxx> #include <osl/process.h> -#include <i18npool/mslangid.hxx> +#include <i18npool/languagetag.hxx> #include <tools/urlobj.hxx> #include <tools/resmgr.hxx> #include <tools/wldcrd.hxx> @@ -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 |