summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-10-04 11:14:38 +0200
committerEike Rathke <erack@redhat.com>2022-10-04 19:15:45 +0200
commit437abb3abbc506c1e20c6fec8e574abfe3487842 (patch)
treea107154f0737c2c74bb70aecd752b8b648a410f1 /include
parent71e11268569201f5dcd4dbc1e7560c4530b077fb (diff)
Check acor_langtag for language-script fallback instead of only language
A tag with script could be added for which we don't have locale data but for the same language in another script. Do not fall back to that. With that the share/autocorr/acor_zh-{CN,TW}.dat files created additional Asian language listbox entries "Chinese (Simplified, China) {zh-Hans-CN}" "Chinese (Traditional, Taiwan) {zh-Hant-TW}" because those are the canonicalized language tags. Prefer the known legacy zh-CN and zh-TW tags instead. Could also had happened with any document import. Which again revealed a flaw in the handling of mapping overrides where converting from a LanguageType LCID to Locale could yield a different mapping than from BCP47 to LCID, which in the case of a fallback for locale data lead to odd side effects. Change-Id: I1e2aaa8e9f99b6b3bc2c9a661215cb00bddd33d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140939 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/i18nlangtag/mslangid.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/i18nlangtag/mslangid.hxx b/include/i18nlangtag/mslangid.hxx
index 1d2f5cc8c651..f59e2d683def 100644
--- a/include/i18nlangtag/mslangid.hxx
+++ b/include/i18nlangtag/mslangid.hxx
@@ -292,11 +292,12 @@ public:
/** Convert a LanguageType to a Locale. */
I18NLANGTAG_DLLPRIVATE static css::lang::Locale convertLanguageToLocale(
- LanguageType nLang );
+ LanguageType nLang, bool bIgnoreOverride );
/** Used by convertLanguageToLocale(LanguageType,bool) and
getLocale(IsoLanguageCountryEntry*) and
- getLocale(IsoLanguageScriptCountryEntry)
+ getLocale(IsoLanguageScriptCountryEntry*) and
+ getLocale(Bcp47CountryEntry*)
@param bIgnoreOverride
If bIgnoreOverride==true, a matching entry is used even if