reportdesign/source/core/api/ReportComponent.cxx | 7 ++++--- reportdesign/source/ui/misc/UITools.cxx | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-)
New commits: commit 3dd3fc17a6b8f5dbc3d795ac80ad737647ab553c Author: Eike Rathke <er...@redhat.com> Date: Sat Nov 17 03:46:20 2012 +0100 use LanguageTag Change-Id: Ibb2788febb2af2c140f310104757439f72496e3f diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx index f710536..e463574 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 afa86cd..6fdf617 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 ) ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits