summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-11-07 19:00:41 +0100
committerAndras Timar <andras.timar@collabora.com>2021-11-10 23:23:35 +0100
commit6cc10c4492f59c6ab56c31a80712f604608d7f0d (patch)
tree5331b56890fe39b4359f0880202d9b792952058c /svl
parentdc2a8c509507dffa28e4c356418207e9b9bb0ca5 (diff)
Resolves: tdf#145386 Use "Default" for LANGUAGE_PROCESS_OR_USER_DEFAULT
There's no, specifically not in Writer, handling of the LCID 0x0400 LANGUAGE_PROCESS_OR_USER_DEFAULT language/locale concept other than the number formatter mapping it to LANGUAGE_SYSTEM. Use the LANGUAGE_SYSTEM "Default" string in UI (status bar, status menu, language list) but keep the LCID, and don't append the resolved locale string as it is also displayed both in the Font Western and CJK listboxes. This ends up as two list entries, like * Default - English (UK) first entry * Default last entry of which the second would be selected. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124449 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 0f3c19ee61ec371aa32d9f51c3555d3ea8ae9eeb) Conflicts: svtools/source/misc/langtab.cxx Change-Id: I8d9e4171bee6bbe9d1c9dcfb7a5fa8fc92ea1a2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124204 Tested-by: Jenkins Tested-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124450 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/config/languageoptions.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index f00812b30b8d..3b490c6ac1fe 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -142,7 +142,7 @@ SvtScriptType SvtLanguageOptions::GetScriptTypeOfLanguage( LanguageType nLang )
{
if( LANGUAGE_DONTKNOW == nLang )
nLang = LANGUAGE_ENGLISH_US;
- else if( LANGUAGE_SYSTEM == nLang )
+ else if (LANGUAGE_SYSTEM == nLang || LANGUAGE_PROCESS_OR_USER_DEFAULT == nLang)
nLang = SvtSysLocale().GetLanguageTag().getLanguageType();
sal_Int16 nScriptType = MsLangId::getScriptType( nLang );