use local var to simplify code in MsLangId::getScriptType
Change-Id: If3b0709cb2d755ac4e031e2c14d29a1e49fe603f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169202 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
This commit is contained in:
parent
ef77086255
commit
38f16494f8
1 changed files with 40 additions and 39 deletions
|
@ -412,45 +412,46 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang )
|
|||
nScript = css::i18n::ScriptType::ASIAN;
|
||||
}
|
||||
// CTL catcher
|
||||
else if (primary(nLang) == primary(LANGUAGE_AMHARIC_ETHIOPIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_ARABIC_SAUDI_ARABIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_ASSAMESE )
|
||||
|| primary(nLang) == primary(LANGUAGE_BENGALI )
|
||||
|| primary(nLang) == primary(LANGUAGE_BURMESE )
|
||||
|| primary(nLang) == primary(LANGUAGE_DHIVEHI )
|
||||
|| primary(nLang) == primary(LANGUAGE_FARSI )
|
||||
|| primary(nLang) == primary(LANGUAGE_GUJARATI )
|
||||
|| primary(nLang) == primary(LANGUAGE_HEBREW )
|
||||
|| primary(nLang) == primary(LANGUAGE_HINDI )
|
||||
|| primary(nLang) == primary(LANGUAGE_KANNADA )
|
||||
|| primary(nLang) == primary(LANGUAGE_KASHMIRI )
|
||||
|| primary(nLang) == primary(LANGUAGE_KHMER )
|
||||
|| primary(nLang) == primary(LANGUAGE_KONKANI )
|
||||
|| primary(nLang) == primary(LANGUAGE_LAO )
|
||||
|| primary(nLang) == primary(LANGUAGE_MALAYALAM )
|
||||
|| primary(nLang) == primary(LANGUAGE_MANIPURI )
|
||||
|| primary(nLang) == primary(LANGUAGE_MARATHI )
|
||||
|| primary(nLang) == primary(LANGUAGE_NEPALI )
|
||||
|| primary(nLang) == primary(LANGUAGE_ODIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_PUNJABI )
|
||||
|| primary(nLang) == primary(LANGUAGE_SANSKRIT )
|
||||
|| primary(nLang) == primary(LANGUAGE_SINDHI )
|
||||
|| primary(nLang) == primary(LANGUAGE_SINHALESE_SRI_LANKA )
|
||||
|| primary(nLang) == primary(LANGUAGE_SYRIAC )
|
||||
|| primary(nLang) == primary(LANGUAGE_TAMIL )
|
||||
|| primary(nLang) == primary(LANGUAGE_TELUGU )
|
||||
|| primary(nLang) == primary(LANGUAGE_THAI )
|
||||
|| primary(nLang) == primary(LANGUAGE_TIBETAN ) // also LANGUAGE_DZONGKHA
|
||||
|| primary(nLang) == primary(LANGUAGE_TIGRIGNA_ETHIOPIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_UIGHUR_CHINA )
|
||||
|| primary(nLang) == primary(LANGUAGE_URDU_INDIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_USER_BODO_INDIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_USER_DOGRI_INDIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_USER_LIMBU )
|
||||
|| primary(nLang) == primary(LANGUAGE_USER_MAITHILI_INDIA )
|
||||
|| primary(nLang) == primary(LANGUAGE_USER_NKO )
|
||||
|| primary(nLang) == primary(LANGUAGE_USER_SARAIKI )
|
||||
|| primary(nLang) == primary(LANGUAGE_YIDDISH ))
|
||||
else if (auto p = primary(nLang);
|
||||
p == primary(LANGUAGE_AMHARIC_ETHIOPIA )
|
||||
|| p == primary(LANGUAGE_ARABIC_SAUDI_ARABIA )
|
||||
|| p == primary(LANGUAGE_ASSAMESE )
|
||||
|| p == primary(LANGUAGE_BENGALI )
|
||||
|| p == primary(LANGUAGE_BURMESE )
|
||||
|| p == primary(LANGUAGE_DHIVEHI )
|
||||
|| p == primary(LANGUAGE_FARSI )
|
||||
|| p == primary(LANGUAGE_GUJARATI )
|
||||
|| p == primary(LANGUAGE_HEBREW )
|
||||
|| p == primary(LANGUAGE_HINDI )
|
||||
|| p == primary(LANGUAGE_KANNADA )
|
||||
|| p == primary(LANGUAGE_KASHMIRI )
|
||||
|| p == primary(LANGUAGE_KHMER )
|
||||
|| p == primary(LANGUAGE_KONKANI )
|
||||
|| p == primary(LANGUAGE_LAO )
|
||||
|| p == primary(LANGUAGE_MALAYALAM )
|
||||
|| p == primary(LANGUAGE_MANIPURI )
|
||||
|| p == primary(LANGUAGE_MARATHI )
|
||||
|| p == primary(LANGUAGE_NEPALI )
|
||||
|| p == primary(LANGUAGE_ODIA )
|
||||
|| p == primary(LANGUAGE_PUNJABI )
|
||||
|| p == primary(LANGUAGE_SANSKRIT )
|
||||
|| p == primary(LANGUAGE_SINDHI )
|
||||
|| p == primary(LANGUAGE_SINHALESE_SRI_LANKA )
|
||||
|| p == primary(LANGUAGE_SYRIAC )
|
||||
|| p == primary(LANGUAGE_TAMIL )
|
||||
|| p == primary(LANGUAGE_TELUGU )
|
||||
|| p == primary(LANGUAGE_THAI )
|
||||
|| p == primary(LANGUAGE_TIBETAN ) // also LANGUAGE_DZONGKHA
|
||||
|| p == primary(LANGUAGE_TIGRIGNA_ETHIOPIA )
|
||||
|| p == primary(LANGUAGE_UIGHUR_CHINA )
|
||||
|| p == primary(LANGUAGE_URDU_INDIA )
|
||||
|| p == primary(LANGUAGE_USER_BODO_INDIA )
|
||||
|| p == primary(LANGUAGE_USER_DOGRI_INDIA )
|
||||
|| p == primary(LANGUAGE_USER_LIMBU )
|
||||
|| p == primary(LANGUAGE_USER_MAITHILI_INDIA )
|
||||
|| p == primary(LANGUAGE_USER_NKO )
|
||||
|| p == primary(LANGUAGE_USER_SARAIKI )
|
||||
|| p == primary(LANGUAGE_YIDDISH ))
|
||||
{
|
||||
nScript = css::i18n::ScriptType::COMPLEX;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue