diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-17 02:39:59 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-17 02:40:04 +0100 |
commit | 4d79f55efd042cacfe252758228f8813552b4cbb (patch) | |
tree | a430e6afe72b52ad5390c2faab1a0d94199b0421 /cui | |
parent | feec7a873ff803f7815c2d85adc7143a89f203d6 (diff) |
use LanguageTag
Change-Id: I4f49c5ada6b9dfb8fe143157470e7d73e04c3354
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 006be93a1c19..2bf4f0e79cee 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -30,6 +30,7 @@ #include <vcl/msgbox.hxx> #include <vcl/mnemonic.hxx> #include <i18npool/mslangid.hxx> +#include <i18npool/languagetag.hxx> #include <unotools/compatibility.hxx> #include <unotools/useroptions.hxx> #include <unotools/fontoptions.hxx> @@ -1255,7 +1256,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe LanguageType aLang = LANGUAGE_DONTKNOW; for (sal_IntPtr i=0; i<seqInstalledLanguages.getLength(); i++) { - aLang = MsLangId::convertIsoStringToLanguage(seqInstalledLanguages[i]); + aLang = LanguageTag(seqInstalledLanguages[i]).getLanguageType(); if (aLang != LANGUAGE_DONTKNOW) { //sal_uInt16 p = aUserInterfaceLB.InsertLanguage(aLang); @@ -1551,7 +1552,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if(!bCurrentDocCBChecked) { Any aValue; - Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false ); + Locale aLocale = LanguageTag( eSelectLang).getLocale( false ); aValue <<= aLocale; OUString aPropName( "DefaultLocale" ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); @@ -1571,7 +1572,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if(!bCurrentDocCBChecked) { Any aValue; - Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false ); + Locale aLocale = LanguageTag( eSelectLang).getLocale( false ); aValue <<= aLocale; OUString aPropName( "DefaultLocale_CJK" ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); @@ -1591,7 +1592,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet ) if(!bCurrentDocCBChecked) { Any aValue; - Locale aLocale = MsLangId::convertLanguageToLocale( eSelectLang, false ); + Locale aLocale = LanguageTag( eSelectLang).getLocale( false ); aValue <<= aLocale; OUString aPropName( "DefaultLocale_CTL" ); pLangConfig->aLinguConfig.SetProperty( aPropName, aValue ); @@ -1724,17 +1725,17 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) Locale aLocale; aWestLang >>= aLocale; - eCurLang = MsLangId::convertLocaleToLanguage( aLocale ); + eCurLang = LanguageTag( aLocale ).getLanguageType( false); aCJKLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CJK"); aLocale = Locale(); aCJKLang >>= aLocale; - eCurLangCJK = MsLangId::convertLocaleToLanguage( aLocale ); + eCurLangCJK = LanguageTag( aLocale ).getLanguageType( false); aCTLLang = pLangConfig->aLinguConfig.GetProperty("DefaultLocale_CTL"); aLocale = Locale(); aCTLLang >>= aLocale; - eCurLangCTL = MsLangId::convertLocaleToLanguage( aLocale ); + eCurLangCTL = LanguageTag( aLocale ).getLanguageType( false); } catch (const Exception&) { |