diff options
author | Eike Rathke <erack@redhat.com> | 2013-09-12 19:31:04 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-09-12 19:31:45 +0200 |
commit | b291852c2f907e5d181b1de43af216f7d03db96a (patch) | |
tree | 014dfe4334ecd0edc46f6570cceae1c9cf1e3166 /linguistic | |
parent | 2f6551b0167c2651f900b9c727bd74240b493754 (diff) |
get rid of unnecessary conversion, use LinguIsUnspecified(OUString)
Change-Id: Ib1074e3025680306c0a8bf7dcff651cefdcb90ba
Diffstat (limited to 'linguistic')
-rw-r--r-- | linguistic/source/misc.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index 867dccfc4c38..fe24438a0b6c 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -106,6 +106,19 @@ bool LinguIsUnspecified( LanguageType nLanguage ) return false; } +// When adding anything keep both LinguIsUnspecified() methods in sync! +// For mappings between language code string and LanguageType see +// i18nlangtag/source/isolang/isolang.cxx + +bool LinguIsUnspecified( const OUString & rBcp47 ) +{ + if (rBcp47.getLength() != 3) + return false; + if (rBcp47 == "zxx" || rBcp47 == "und" || rBcp47 == "mul") + return true; + return false; +} + static inline sal_Int32 Minimum( sal_Int32 n1, sal_Int32 n2, sal_Int32 n3 ) { sal_Int32 nMin = n1 < n2 ? n1 : n2; |