diff options
author | Eike Rathke <erack@redhat.com> | 2014-06-12 10:57:15 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-06-12 11:02:36 +0200 |
commit | 9476bd39ad30eea46ff146f46d6c996450710b3c (patch) | |
tree | 80eb384025e372c029aeb9e307175b92adb3dc4c /i18nlangtag | |
parent | -Werror,-Wunused-private-field (diff) | |
download | core-9476bd39ad30eea46ff146f46d6c996450710b3c.tar.gz core-9476bd39ad30eea46ff146f46d6c996450710b3c.zip |
disallow 'qlt' privateuse code
... to prevent confusion with our internal usage.
Change-Id: I273b80882cbe5029d04ad754c8b0636f5c59a4f6
Diffstat (limited to 'i18nlangtag')
-rw-r--r-- | i18nlangtag/source/languagetag/languagetag.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index b7b8aa180ea4..c81197a31039 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -2720,6 +2720,20 @@ bool LanguageTag::isValidBcp47( const OUString& rString, OUString* o_pCanonicali const lt_string_t* pPrivate = lt_tag_get_privateuse( aVar.mpLangtag); if (pPrivate && lt_string_length( pPrivate) > 0) bValid = false; + else + { + const lt_lang_t* pLangT = lt_tag_get_language( aVar.mpLangtag); + if (pLangT) + { + const char* pLang = lt_lang_get_tag( pLangT); + if (pLang && strcmp( pLang, I18NLANGTAG_QLT) == 0) + { + // Disallow 'qlt' privateuse code to prevent + // confusion with our internal usage. + bValid = false; + } + } + } } if (o_pCanonicalized) *o_pCanonicalized = OUString::createFromAscii( pTag); |