summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-19 13:48:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-19 14:11:50 +0100
commitd9e4c74811855de15f1bf2045c2c9b061a2d4dc6 (patch)
tree895cbcd595094e9fd2621a943fc83bb004b429c9 /unotools
parent2a598619d7fbc992f1903a745fd536ddf5e45c81 (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 'unotools')
-rw-r--r--unotools/source/config/fontcfg.cxx12
-rw-r--r--unotools/source/config/lingucfg.cxx4
2 files changed, 6 insertions, 10 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index b13fe320f60e..5c889369b229 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -26,6 +26,7 @@
*
************************************************************************/
+#include <i18npool/mslangid.hxx>
#include <unotools/fontcfg.hxx>
#include <unotools/fontdefs.hxx>
#include <comphelper/processfactory.hxx>
@@ -325,13 +326,10 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale )
{
return rtl::OUString(FALLBACKFONT_UI_SANS_LATIN2);
}
- else if ( aLocale.Language == "zh" )
- {
- if( ! aLocale.Country.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "cn" ) ) )
- return rtl::OUString(FALLBACKFONT_UI_SANS_CHINTRD);
- else
- return rtl::OUString(FALLBACKFONT_UI_SANS_CHINSIM);
- }
+ else if (MsLangId::isTraditionalChinese(aLocale))
+ return rtl::OUString(FALLBACKFONT_UI_SANS_CHINTRD);
+ else if (MsLangId::isSimplifiedChinese(aLocale))
+ return rtl::OUString(FALLBACKFONT_UI_SANS_CHINSIM);
else if ( aLocale.Language == "ja" )
{
// we need localized names for japanese fonts
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 5e60a3d4d797..286932e68aae 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -639,9 +639,7 @@ sal_Bool SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProp
if( ! (rVal >>= rOpt.bIsDirectionToSimplified) )
{
//default is locale dependent:
- if( rOpt.nDefaultLanguage_CJK == LANGUAGE_CHINESE_HONGKONG
- || rOpt.nDefaultLanguage_CJK == LANGUAGE_CHINESE_MACAU
- || rOpt.nDefaultLanguage_CJK == LANGUAGE_CHINESE_TRADITIONAL )
+ if (MsLangId::isTraditionalChinese(rOpt.nDefaultLanguage_CJK))
{
rOpt.bIsDirectionToSimplified = sal_False;
}