[Libreoffice-commits] core.git: desktop/source
Eike Rathke
erack at redhat.com
Tue Jan 17 22:00:52 UTC 2017
desktop/source/app/langselect.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 57f66925d4c43dad7b0e2e67f91fc4d965f3f92d
Author: Eike Rathke <erack at redhat.com>
Date: Tue Jan 17 22:59:01 2017 +0100
set the default startup document locale fallback to work locale, not UI locale
Do as the comment says and #i32939# intended but never was implemented. This
matters only for initial startups when no document locale at all (of the
locale's corresponding western/cjk/ctl type) is configured yet, to preselect a
matching locale for each under Tools->Options.
Change-Id: I73588568dd34b0f7807588194579b95cde33f0fd
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 9b52d8a4..ea3f605 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -155,6 +155,7 @@ bool prepareLocale() {
}
}
MsLangId::setConfiguredSystemUILanguage(tag.getLanguageType(false));
+
OUString setupSysLoc(officecfg::Setup::L10N::ooSetupSystemLocale::get());
LanguageTag::setConfiguredSystemLanguage(
setupSysLoc.isEmpty()
@@ -162,7 +163,11 @@ bool prepareLocale() {
: LanguageTag(setupSysLoc).getLanguageType(false));
// #i32939# setting of default document locale
// #i32939# this should not be based on the UI language
- setMsLangIdFallback(locale);
+ // So obtain the system locale now configured just above and pass it on,
+ // resolved of course.
+ LanguageTag docTag(LANGUAGE_SYSTEM);
+ setMsLangIdFallback(docTag.getBcp47());
+
foundLocale = locale;
return true;
}
More information about the Libreoffice-commits
mailing list