diff options
author | Eike Rathke <erack@redhat.com> | 2013-08-30 15:05:21 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-08-30 16:23:52 +0200 |
commit | 6c3d74e8b779b1eb2d9779ed84f1518e078113c4 (patch) | |
tree | 15246f23ab648c43a7935fba76b68e2b41c0dfc3 /i18nlangtag | |
parent | 756b6040ca24702cca2482086e358080e20eb6d2 (diff) |
take a shortcut for unknown "x-..." or "i-..."
Change-Id: I4996fd68ba6bd62bd7126924418242fde78fe713
Diffstat (limited to 'i18nlangtag')
-rw-r--r-- | i18nlangtag/source/isolang/isolang.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx index 50c154b93c7b..447a60a992f5 100644 --- a/i18nlangtag/source/isolang/isolang.cxx +++ b/i18nlangtag/source/isolang/isolang.cxx @@ -846,9 +846,10 @@ void MsLangId::Conversion::convertLanguageToLocaleImpl( LanguageType nLang, // Locale. sal_Int32 nIndex = 0; aLowerLang = rLocale.Variant.getToken( 0, '-', nIndex).toAsciiLowerCase(); - // Cater for "x-..." - if (aLowerLang.getLength() == 1 && aLowerLang[0] == 'x' && nIndex > 0) - aLowerLang += "-" + rLocale.Variant.getToken( 0, '-', nIndex).toAsciiLowerCase(); + // Nothing with "x-..." or "i-..." or any 1 letter in lll-CC table that + // follows. + if (aLowerLang.getLength() == 1) + return aLastResortFallbackEntry.getLocale(); } // Search for locale and remember first lang-only. |