[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - i18nlangtag/source
Eike Rathke
erack at redhat.com
Thu Jun 12 02:06:00 PDT 2014
i18nlangtag/source/languagetag/languagetag.cxx | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit e3115814f4f82f0eeddb4d591d0e66e6a2fd9196
Author: Eike Rathke <erack at redhat.com>
Date: Thu Jun 12 10:57:15 2014 +0200
disallow 'qlt' privateuse code
... to prevent confusion with our internal usage.
Change-Id: I273b80882cbe5029d04ad754c8b0636f5c59a4f6
(cherry picked from commit 9476bd39ad30eea46ff146f46d6c996450710b3c)
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index b9fcd72..f0241bc 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);
More information about the Libreoffice-commits
mailing list