use LanguageTag
Change-Id: Ibb2788febb2af2c140f310104757439f72496e3f
This commit is contained in:
@@ -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);
|
||||
|
@@ -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 ) );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user