[Libreoffice-commits] .: framework/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 16 13:44:16 PST 2012
framework/source/fwi/helper/mischelper.cxx | 4 ++--
framework/source/services/substitutepathvars.cxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 97760eb090ed7d5b9c05ac8ad02a27de1144ecc3
Author: Eike Rathke <erack at redhat.com>
Date: Fri Nov 16 22:43:32 2012 +0100
use LanguageTag
Change-Id: I1f0516cc17741e8f87655ad251930a9da7bdb205
diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx
index 6292281..379ec36 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 7db7b97..08dd17f 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
More information about the Libreoffice-commits
mailing list