diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-17 03:46:20 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-17 03:46:36 +0100 |
commit | 3dd3fc17a6b8f5dbc3d795ac80ad737647ab553c (patch) | |
tree | 89e6fd228073d0ebb5d76ed554e560272ef7745c /reportdesign/source | |
parent | c90231291b5fa033ec3b079427c522177083a585 (diff) |
use LanguageTag
Change-Id: Ibb2788febb2af2c140f310104757439f72496e3f
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/core/api/ReportComponent.cxx | 7 | ||||
-rw-r--r-- | reportdesign/source/ui/misc/UITools.cxx | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx index f7105362e596..e463574a5248 100644 --- a/reportdesign/source/core/api/ReportComponent.cxx +++ b/reportdesign/source/core/api/ReportComponent.cxx @@ -33,6 +33,7 @@ #include <unotools/syslocale.hxx> #include <unotools/lingucfg.hxx> #include <i18npool/mslangid.hxx> +#include <i18npool/languagetag.hxx> // ============================================================================= namespace reportdesign @@ -83,11 +84,11 @@ OFormatProperties::OFormatProperties() using namespace ::com::sun::star::i18n::ScriptType; aLinguConfig.GetProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale"))) >>= aCharLocale; - LanguageType eCurLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aCharLocale), LATIN); + LanguageType eCurLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag(aCharLocale).getLanguageType(false), LATIN); aLinguConfig.GetProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CJK"))) >>= aCharLocaleAsian; - LanguageType eCurLangCJK = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aCharLocaleAsian), ASIAN); + LanguageType eCurLangCJK = MsLangId::resolveSystemLanguageByScriptType(LanguageTag(aCharLocaleAsian).getLanguageType(false), ASIAN); aLinguConfig.GetProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CTL"))) >>= aCharLocaleComplex; - LanguageType eCurLangCTL = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aCharLocaleComplex), COMPLEX); + LanguageType eCurLangCTL = MsLangId::resolveSystemLanguageByScriptType(LanguageTag(aCharLocaleComplex).getLanguageType(false), COMPLEX); Font aLatin,aCJK,aCTL; lcl_getDefaultFonts(aLatin,aCJK,aCTL,eCurLang,eCurLangCJK,eCurLangCTL); diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index afa86cd7b006..6fdf61706183 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -94,7 +94,7 @@ #include <com/sun/star/report/Function.hpp> #include <com/sun/star/sdb/XParametersSupplier.hpp> #include <com/sun/star/sdb/SQLContext.hpp> -#include <i18npool/mslangid.hxx> +#include <i18npool/languagetag.hxx> #include "dlgpage.hxx" #include <vcl/msgbox.hxx> #include "rptui_slotid.hrc" @@ -252,7 +252,7 @@ namespace break; } - _rItemSet.Put(SvxLanguageItem(MsLangId::convertLocaleToLanguageWithFallback(aLocale),_nLanguage)); + _rItemSet.Put(SvxLanguageItem(LanguageTag(aLocale).makeFallback().getLanguageType(),_nLanguage)); _rItemSet.Put(SvxPostureItem(aFont.GetItalic(),_nPosture)); _rItemSet.Put(SvxWeightItem(aFont.GetWeight(),_nWeight)); @@ -546,8 +546,7 @@ namespace if ( SFX_ITEM_SET == _rItemSet.GetItemState( pItems[k].nWhich,sal_True,&pItem) && pItem->ISA(SvxLanguageItem)) { const SvxLanguageItem* pFontItem = static_cast<const SvxLanguageItem*>(pItem); - lang::Locale aCharLocale; - MsLangId::convertLanguageToLocale( pFontItem->GetLanguage(), aCharLocale ); + lang::Locale aCharLocale( LanguageTag( pFontItem->GetLanguage()).getLocale()); lcl_pushBack( _out_rProperties, pItems[k].sPropertyName, uno::makeAny( aCharLocale ) ); } } |