diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2021-11-10 13:40:12 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2021-11-12 14:54:55 +0100 |
commit | 66a0b5f04d1ec06d2631a9f739b995d365bfc879 (patch) | |
tree | b623088afd569c4542544a85cfb6a89121932aa7 /sw | |
parent | 723db12abd7c238e11dab0271516b6f4415e52eb (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
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>
Change-Id: I35b84dbf6e5913773949aad3dad802d79e93c2af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124965
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/langhelper.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 27326c973fb0..32a6cb1a5793 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -39,7 +39,6 @@ #include <editeng/langitem.hxx> #include <svl/languageoptions.hxx> -#include <i18nlangtag/mslangid.hxx> #include <svtools/langtab.hxx> #include <svl/slstitm.hxx> #include <svl/stritem.hxx> @@ -76,14 +75,14 @@ namespace SwLangHelper vcl::Window* pWin = rEditView.GetWindow(); if(pWin) - nLang = MsLangId::getRealLanguage( pWin->GetInputLanguage() ); + nLang = pWin->GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use OUString aCurrentLang("*"); SfxItemSet aSet(pOLV->GetAttribs()); - nLang = MsLangId::getRealLanguage( SwLangHelper::GetCurrentLanguage( aSet,nScriptType ) ); + nLang = SwLangHelper::GetCurrentLanguage( aSet,nScriptType ); if (nLang != LANGUAGE_DONTKNOW) aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index e7747e36db76..630d54a2efc6 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -26,7 +26,6 @@ #include <comphelper/lok.hxx> #include <i18nutil/unicode.hxx> -#include <i18nlangtag/mslangid.hxx> #include <i18nlangtag/languagetag.hxx> #include <svl/languageoptions.hxx> #include <editeng/langitem.hxx> @@ -1624,13 +1623,13 @@ void SwTextShell::GetState( SfxItemSet &rSet ) // get keyboard language OUString aKeyboardLang; SwEditWin& rEditWin = GetView().GetEditWin(); - LanguageType nLang = MsLangId::getRealLanguage( rEditWin.GetInputLanguage() ); + LanguageType nLang = rEditWin.GetInputLanguage(); if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM) aKeyboardLang = SvtLanguageTable::GetLanguageString( nLang ); // get the language that is in use OUString aCurrentLang = "*"; - nLang = MsLangId::getRealLanguage( SwLangHelper::GetCurrentLanguage( rSh ) ); + nLang = SwLangHelper::GetCurrentLanguage( rSh ); if (nLang != LANGUAGE_DONTKNOW) { aCurrentLang = SvtLanguageTable::GetLanguageString( nLang ); |