summaryrefslogtreecommitdiff
path: root/linguistic
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-04-07 12:50:38 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-04-07 12:50:38 +0000
commit5f1796a7578ac3b214042be775bcad2b85511f30 (patch)
treec722163ffb754c19cce404f7ac57e91c611f9302 /linguistic
parent4fe5ce38e0f53359a1157ba387923da408d06c48 (diff)
INTEGRATION: CWS internatiodel (1.24.26); FILE MERGED
2006/02/10 19:27:23 er 1.24.26.1: #i52115# move LangIDs and ISO conversion from tools to i18npool; introduce class MsLangId and libi18nisolang
Diffstat (limited to 'linguistic')
-rw-r--r--linguistic/source/misc.cxx23
1 files changed, 10 insertions, 13 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index a8bd36043370..0d8a91b2ae7a 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: misc.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: rt $ $Date: 2005-09-07 19:54:38 $
+ * last change: $Author: vg $ $Date: 2006-04-07 13:50:38 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -54,6 +54,9 @@
#ifndef _UCBHELPER_CONTENT_HXX
#include <ucbhelper/content.hxx>
#endif
+#ifndef INCLUDED_I18NPOOL_MSLANGID_HXX
+#include <i18npool/mslangid.hxx>
+#endif
#ifndef _COM_SUN_STAR_UCB_XCOMMANDENVIRONMENT_HPP_
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -422,31 +425,25 @@ LanguageType LocaleToLanguage( const Locale& rLocale )
if ( rLocale.Language.getLength() == 0 )
return LANGUAGE_NONE;
- // Variant of Locale is ignored
- return ConvertIsoNamesToLanguage( rLocale.Language, rLocale.Country );
+ return MsLangId::convertLocaleToLanguage( rLocale );
}
Locale& LanguageToLocale( Locale& rLocale, LanguageType eLang )
{
- String aLangStr, aCtryStr;
if ( eLang != LANGUAGE_NONE /* && eLang != LANGUAGE_SYSTEM */)
- ConvertLanguageToIsoNames( eLang, aLangStr, aCtryStr );
-
- rLocale.Language = aLangStr;
- rLocale.Country = aCtryStr;
- rLocale.Variant = OUString();
+ MsLangId::convertLanguageToLocale( eLang, rLocale );
return rLocale;
}
Locale CreateLocale( LanguageType eLang )
{
- String aLangStr, aCtryStr;
+ Locale aLocale;
if ( eLang != LANGUAGE_NONE /* && eLang != LANGUAGE_SYSTEM */)
- ConvertLanguageToIsoNames( eLang, aLangStr, aCtryStr );
+ return MsLangId::convertLanguageToLocale( eLang );
- return Locale( aLangStr, aCtryStr, OUString() );
+ return aLocale;
}
uno::Sequence< Locale > LangSeqToLocaleSeq( const uno::Sequence< INT16 > &rLangSeq )