summaryrefslogtreecommitdiff
path: root/sw/source/ui/app
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2002-09-24 13:07:39 +0000
committerOliver Specht <os@openoffice.org>2002-09-24 13:07:39 +0000
commitfb0e0cfb9e437fd2a6feee9cd4f576ac1b919003 (patch)
tree43fd11c3cbddbf988fd0a1c5f659917b2fae181c /sw/source/ui/app
parent49e7de735081a9488bafb518b6b9656ad40ba631 (diff)
#103596# default font CTL corrected
Diffstat (limited to 'sw/source/ui/app')
-rw-r--r--sw/source/ui/app/docshini.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index ea8c0742eb01..4fec5059a9ee 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docshini.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: os $ $Date: 2002-08-20 13:34:44 $
+ * last change: $Author: os $ $Date: 2002-09-24 14:07:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -328,6 +328,13 @@ sal_Bool SwDocShell::InitNew( SvStorage * pStor )
FONT_STANDARD_CJK,
FONT_STANDARD_CTL
};
+ USHORT nFontTypes[] =
+ {
+ DEFAULTFONT_LATIN_TEXT,
+ DEFAULTFONT_CJK_TEXT,
+ DEFAULTFONT_CTL_TEXT
+ };
+
for(USHORT i = 0; i < 3; i++)
{
USHORT nFontWhich = aFontWhich[i];
@@ -354,9 +361,10 @@ sal_Bool SwDocShell::InitNew( SvStorage * pStor )
}
else
{
- const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault(i ? RES_CHRATR_CJK_LANGUAGE : RES_CHRATR_LANGUAGE );
+ const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( nFontWhich );
+
Font aLangDefFont = OutputDevice::GetDefaultFont(
- i ? DEFAULTFONT_CJK_TEXT : DEFAULTFONT_LATIN_TEXT,
+ nFontTypes[i],
rLang.GetLanguage(),
DEFAULTFONT_FLAGS_ONLYONE );
pFontItem = new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(),