summaryrefslogtreecommitdiff
path: root/sw/source/ui/app/appopt.cxx
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
commit708192e04e3297f17968d6a568417b7e527c81d4 (patch)
tree3b2c053087fb72d2bd0ee1185d6da81177e2191f /sw/source/ui/app/appopt.cxx
parentadc470c2bd8f0495702211d04757ac22f321a09b (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
Diffstat (limited to 'sw/source/ui/app/appopt.cxx')
-rw-r--r--sw/source/ui/app/appopt.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/sw/source/ui/app/appopt.cxx b/sw/source/ui/app/appopt.cxx
index 4a4de8b648b9..7698fe58c580 100644
--- a/sw/source/ui/app/appopt.cxx
+++ b/sw/source/ui/app/appopt.cxx
@@ -35,6 +35,8 @@
#include <cmdid.h> // Funktion-Ids
#endif
+#include <com/sun/star/i18n/ScriptType.hpp>
+
#define _SVSTDARR_STRINGSDTOR
#include <svtools/svstdarr.hxx>
@@ -54,6 +56,7 @@
#include <svx/optgrid.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
+#include <i18npool/mslangid.hxx>
#include <fontcfg.hxx>
#include <optload.hxx>
#include <optcomp.hxx>
@@ -191,19 +194,25 @@ SfxItemSet* SwModule::CreateItemSet( USHORT nId )
pRet->Put(SwPtrItem(FN_PARAM_PRINTER, pPrt));*/
SvtLinguConfig aLinguCfg;
+ Locale aLocale;
+ LanguageType nLang;
+
+ using namespace ::com::sun::star::i18n::ScriptType;
Any aLang = aLinguCfg.GetProperty(C2U("DefaultLocale"));
- Locale aLocale;
aLang >>= aLocale;
- pRet->Put(SvxLanguageItem(SvxLocaleToLanguage( aLocale ), SID_ATTR_LANGUAGE));
+ nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale), LATIN);
+ pRet->Put(SvxLanguageItem(nLang, SID_ATTR_LANGUAGE));
aLang = aLinguCfg.GetProperty(C2U("DefaultLocale_CJK"));
aLang >>= aLocale;
- pRet->Put(SvxLanguageItem(SvxLocaleToLanguage( aLocale ), SID_ATTR_CHAR_CJK_LANGUAGE));
+ nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale), ASIAN);
+ pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CJK_LANGUAGE));
aLang = aLinguCfg.GetProperty(C2U("DefaultLocale_CTL"));
aLang >>= aLocale;
- pRet->Put(SvxLanguageItem(SvxLocaleToLanguage( aLocale ), SID_ATTR_CHAR_CTL_LANGUAGE));
+ nLang = MsLangId::resolveSystemLanguageByScriptType(MsLangId::convertLocaleToLanguage(aLocale), COMPLEX);
+ pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CTL_LANGUAGE));
}
if(bTextDialog)
pRet->Put(SwPtrItem(FN_PARAM_STDFONTS, GetStdFontConfig()));