From 57f66925d4c43dad7b0e2e67f91fc4d965f3f92d Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 17 Jan 2017 22:59:01 +0100 Subject: 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 --- desktop/source/app/langselect.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'desktop/source/app/langselect.cxx') diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx index 9b52d8a42fe9..ea3f605c6bcc 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; } -- cgit