summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-09-17 11:26:03 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-09-17 11:26:03 +0000
commit0f75b586e6bb0f05d2b11b09c8bedc35655a1f15 (patch)
tree9b26dc9539648d359cf6827f103710268a666785
parent2e850d9943b152bc290f25e7b88b46431ce3ca22 (diff)
CWS-TOOLING: integrate CWS defaultdoclang
2009-08-21 14:44:21 +0200 cmc r275260 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@275001 (milestone: DEV300:m55) 2009-08-10 17:43:32 +0200 cmc r274833 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@274622 (milestone: DEV300:m54) 2009-07-24 11:46:58 +0200 cmc r274297 : CWS-TOOLING: rebase CWS defaultdoclang to trunk@274203 (milestone: DEV300:m53) 2009-07-10 12:22:16 +0200 cmc r273884 : #i99577# tweak the widths a bit 2009-07-08 15:17:58 +0200 cmc r273834 : #i99577 tidy up indentation 2009-07-04 16:09:18 +0200 cmc r273721 : #i99577# a "default" document language that reflects what the locale language is
-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 70af23c21..de2efb75c 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 cffe4ac3c..82f22e30e 100644
--- a/reportdesign/util/makefile.mk
+++ b/reportdesign/util/makefile.mk
@@ -61,6 +61,7 @@ SHL1STDLIBS= \
$(FWELIB) \
$(SFXLIB) \
$(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
$(SVLLIB) \
$(SVTOOLLIB) \
$(UNOTOOLSLIB) \