summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--reportdesign/source/core/api/ReportComponent.cxx11
-rw-r--r--reportdesign/util/makefile.mk1
2 files changed, 9 insertions, 3 deletions
diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx
index c90407c156de..1eae3724ce23 100644
--- a/reportdesign/source/core/api/ReportComponent.cxx
+++ b/reportdesign/source/core/api/ReportComponent.cxx
@@ -42,9 +42,12 @@
#include <com/sun/star/reflection/XProxyFactory.hpp>
#include <com/sun/star/text/ParagraphVertAlign.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
+#include <com/sun/star/i18n/ScriptType.hpp>
#include <svx/unolingu.hxx>
#include <svtools/syslocale.hxx>
#include <svtools/lingucfg.hxx>
+#include <i18npool/mslangid.hxx>
+
// =============================================================================
namespace reportdesign
{
@@ -96,12 +99,14 @@ OFormatProperties::OFormatProperties()
try
{
SvtLinguConfig aLinguConfig;
+ using namespace ::com::sun::star::i18n::ScriptType;
+
aLinguConfig.GetProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale"))) >>= aCharLocale;
- LanguageType eCurLang = SvxLocaleToLanguage( aCharLocale );
+ LanguageType eCurLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aCharLocale), LATIN);
aLinguConfig.GetProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CJK"))) >>= aCharLocaleAsian;
- LanguageType eCurLangCJK = SvxLocaleToLanguage( aCharLocaleAsian );
+ LanguageType eCurLangCJK = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aCharLocaleAsian), ASIAN);
aLinguConfig.GetProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultLocale_CTL"))) >>= aCharLocaleComplex;
- LanguageType eCurLangCTL = SvxLocaleToLanguage( aCharLocaleComplex );
+ LanguageType eCurLangCTL = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aCharLocaleComplex), COMPLEX);
Font aLatin,aCJK,aCTL;
lcl_getDefaultFonts(aLatin,aCJK,aCTL,eCurLang,eCurLangCJK,eCurLangCTL);
diff --git a/reportdesign/util/makefile.mk b/reportdesign/util/makefile.mk
index cffe4ac3ca1d..82f22e30ede7 100644
--- a/reportdesign/util/makefile.mk
+++ b/reportdesign/util/makefile.mk
@@ -61,6 +61,7 @@ SHL1STDLIBS= \
$(FWELIB) \
$(SFXLIB) \
$(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
$(SVLLIB) \
$(SVTOOLLIB) \
$(UNOTOOLSLIB) \