diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-19 13:48:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-19 14:11:50 +0100 |
commit | d9e4c74811855de15f1bf2045c2c9b061a2d4dc6 (patch) | |
tree | 895cbcd595094e9fd2621a943fc83bb004b429c9 /sd | |
parent | 2a598619d7fbc992f1903a745fd536ddf5e45c81 (diff) |
merge together hand-crafted traditional/simplified chinese tests
merge together a gadzillion hand-crafted
isSimpleChinese/isTraditionalChinese/isKoreanVariants/isCJK
implementations which should fix a goodly amount of them
add a MsLangId::isFamilyNameFirst for locales where
family name appears first while I'm at it.
Change-Id: I65377793be037d16fe7250cd7450b28aec689e83
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/drawdoc.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 4c7c98985ab9..d88383f117cd 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -242,7 +242,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) } // for korean and japanese languages we have a different default for apply spacing between asian, latin and ctl text - if( ( LANGUAGE_KOREAN == eRealCTLLanguage ) || ( LANGUAGE_KOREAN_JOHAB == eRealCTLLanguage ) || ( LANGUAGE_JAPANESE == eRealCTLLanguage ) ) + if (MsLangId::isKorean(eRealCTLLanguage) || (LANGUAGE_JAPANESE == eRealCTLLanguage)) { GetPool().GetSecondaryPool()->SetPoolDefaultItem( SvxScriptSpaceItem( sal_False, EE_PARA_ASIANCJKSPACING ) ); } diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 6fce9ca1a991..100bae141d5d 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -29,7 +29,7 @@ #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/container/XNameAccess.hpp> - +#include <i18npool/mslangid.hxx> #include <sfx2/docfile.hxx> #include <sfx2/dispatch.hxx> #include "Outliner.hxx" @@ -1389,13 +1389,8 @@ void SdDrawDocument::getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rC // be queried for Korean, too (the Latin language from the document can't be Korean). // This is the same logic as in SwDocShell::InitNew. LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); - switch( eUiLanguage ) - { - case LANGUAGE_KOREAN: - case LANGUAGE_KOREAN_JOHAB: - eLatin = eUiLanguage; - break; - } + if (MsLangId::isKorean(eUiLanguage)) + eLatin = eUiLanguage; rLatinFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_PRESENTATION, eLatin, DEFAULTFONT_FLAGS_ONLYONE ); rCJKFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_PRESENTATION, GetLanguage( EE_CHAR_LANGUAGE_CJK ), DEFAULTFONT_FLAGS_ONLYONE ); |