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 /cui | |
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 'cui')
-rw-r--r-- | cui/source/options/optasian.cxx | 16 | ||||
-rw-r--r-- | cui/source/options/optgenrl.cxx | 7 |
2 files changed, 7 insertions, 16 deletions
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 035aa7fa0fad..914923d71fed 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -33,6 +33,7 @@ #include <optasian.hrc> #include <dialmgr.hxx> #include <cuires.hrc> +#include <i18npool/mslangid.hxx> #include <tools/shl.hxx> #include <svl/asiancfg.hxx> #include <com/sun/star/lang/Locale.hpp> @@ -301,17 +302,10 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& ) { eLastUsedLanguageTypeForForbiddenCharacters = SvxLocaleToLanguage( Application::GetSettings().GetLocale() ); - switch(eLastUsedLanguageTypeForForbiddenCharacters) - { - case LANGUAGE_CHINESE : - case LANGUAGE_CHINESE_SINGAPORE : - eLastUsedLanguageTypeForForbiddenCharacters = LANGUAGE_CHINESE_SIMPLIFIED; - break; - case LANGUAGE_CHINESE_HONGKONG : - case LANGUAGE_CHINESE_MACAU : - eLastUsedLanguageTypeForForbiddenCharacters = LANGUAGE_CHINESE_TRADITIONAL; - break; - } + if (MsLangId::isSimplifiedChinese(eLastUsedLanguageTypeForForbiddenCharacters)) + eLastUsedLanguageTypeForForbiddenCharacters = LANGUAGE_CHINESE_SIMPLIFIED; + else if (MsLangId::isTraditionalChinese(eLastUsedLanguageTypeForForbiddenCharacters)) + eLastUsedLanguageTypeForForbiddenCharacters = LANGUAGE_CHINESE_TRADITIONAL; } aLanguageLB.SelectLanguage( eLastUsedLanguageTypeForForbiddenCharacters ); LanguageHdl(&aLanguageLB); diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 2454f17725fe..6645a2e66c9a 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -27,6 +27,7 @@ ************************************************************************/ #include <comphelper/string.hxx> +#include <i18npool/mslangid.hxx> #include <tools/shl.hxx> #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> @@ -162,11 +163,7 @@ SvxGeneralTabPage::SvxGeneralTabPage( Window* pParent, const SfxItemSet& rCoreSe aFirstName.SetZOrder( &aName, WINDOW_ZORDER_BEHIND ); aFatherName.SetZOrder( &aFirstName, WINDOW_ZORDER_BEHIND ); } - else if ( LANGUAGE_JAPANESE == eLang || - LANGUAGE_KOREAN == eLang || - LANGUAGE_HUNGARIAN == eLang || - LANGUAGE_CHINESE_TRADITIONAL == eLang || - LANGUAGE_CHINESE_SIMPLIFIED == eLang) + else if (MsLangId::isFamilyNameFirst(eLang)) { aUsCityEdit.Hide(); aUsStateEdit.Hide(); |