diff options
author | Eike Rathke <erack@redhat.com> | 2017-01-17 22:59:01 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-01-17 23:00:29 +0100 |
commit | 57f66925d4c43dad7b0e2e67f91fc4d965f3f92d (patch) | |
tree | d955ed73a899771febe5f80f1932c7f306d6cec8 /desktop/source/app/langselect.cxx | |
parent | 63102c87a91e90f6b8116ba73695ede0c96bb0c3 (diff) |
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
Diffstat (limited to 'desktop/source/app/langselect.cxx')
-rw-r--r-- | desktop/source/app/langselect.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |