summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2020-06-15 09:20:24 +0200
committerAndras Timar <andras.timar@collabora.com>2020-06-15 21:41:16 +0200
commit1b8cbfef2481c06bc6d7bf3c5d5811b0d2b9b423 (patch)
treebc7d713e7030676ce5433370fbe626a8c63a6867 /sd
parenteab9648afc864c8bed4c61f7419aa193e0c37b92 (diff)
Use getBcp47() instead of getLanguage()
getLanguage() only returns the language code which can be ambiguous in case of UI localization, when there are more than one language variants. Fallback to the first variant caused mixed language UI, e.g. en-US vs. en-GB, pt vs. pt-BR, zh-CN vs. zh-TW. Change-Id: I888423cd4b3c65dbdb900ff3b6bc308fa119be4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96285 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx4
-rw-r--r--sd/source/core/TransitionPreset.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 3be4e76941f8..cf15dc490622 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -478,8 +478,8 @@ const CustomAnimationPresets& CustomAnimationPresets::getCustomAnimationPresets(
// Support localization per-view. Currently not useful for Desktop
// but very much critical for LOK. The cache now is per-language.
const OUString aLang = comphelper::LibreOfficeKit::isActive()
- ? comphelper::LibreOfficeKit::getLanguageTag().getLanguage()
- : SvtSysLocaleOptions().GetLanguageTag().getLanguage();
+ ? comphelper::LibreOfficeKit::getLanguageTag().getBcp47()
+ : SvtSysLocaleOptions().GetLanguageTag().getBcp47();
SolarMutexGuard aGuard;
const auto it = mPresetsMap.find(aLang);
diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx
index 951959cdb69a..1a8f55b90aed 100644
--- a/sd/source/core/TransitionPreset.cxx
+++ b/sd/source/core/TransitionPreset.cxx
@@ -367,8 +367,8 @@ const TransitionPresetList& TransitionPreset::getTransitionPresetList()
// Support localization per-view. Currently not useful for Desktop
// but very much critical for LOK. The cache now is per-language.
const OUString aLang = comphelper::LibreOfficeKit::isActive()
- ? comphelper::LibreOfficeKit::getLanguageTag().getLanguage()
- : SvtSysLocaleOptions().GetLanguageTag().getLanguage();
+ ? comphelper::LibreOfficeKit::getLanguageTag().getBcp47()
+ : SvtSysLocaleOptions().GetLanguageTag().getBcp47();
SolarMutexGuard aGuard;
const auto it = mPresetsMap.find(aLang);