diff options
author | Eike Rathke <erack@redhat.com> | 2018-10-12 17:39:14 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2018-10-12 19:25:14 +0200 |
commit | e30f6a8c6b053e7a7b9c54fb3fdaed4e73bb5389 (patch) | |
tree | 7627772b0014d7cac2e19031c65c80e3b52d6050 /sfx2 | |
parent | 5d5e0da5c314773129d8153363e2892fc359a744 (diff) |
tdf#119739 split ConfigManager::getLocale(), getUILocale(), getWorkLocale()
To prevent further confusion which is which, dbaccess
UserInformation already got that wrong since ever.
/org.openoffice.Setup/L10N/ooLocale is the UI locale.
/org.openoffice.Setup/L10N/ooSetupSystemLocale is the work locale.
Confusingly due to legacy when the setup program was a separate
binary that picked the UI ooLocale and later set up the default
(system) work locale as well.
Change-Id: I9a05ad39f5fb65c54076ff5789ba7a2cc06ad23a
Reviewed-on: https://gerrit.libreoffice.org/61725
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 2917dfcd0a11..81b905c91455 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -528,7 +528,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) { OUString module = SfxHelp::GetCurrentModuleIdentifier(); OUString sURL("https://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() + - "&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 ) ); + "&LOlocale=" + utl::ConfigManager::getUILocale() + "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 ) ); sfx2::openUriExternally(sURL, false); break; } @@ -538,29 +538,29 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) // Askbot has URL's normalized to languages, not locales // Get language from locale: ll or lll or ll-CC or lll-CC - OUString sURL("https://hub.libreoffice.org/forum/?LOlocale=" + utl::ConfigManager::getLocale()); + OUString sURL("https://hub.libreoffice.org/forum/?LOlocale=" + utl::ConfigManager::getUILocale()); sfx2::openUriExternally(sURL, false); break; } case SID_DOCUMENTATION: { // Open documentation page based on locales - OUString sURL("https://hub.libreoffice.org/documentation/?LOlocale=" + utl::ConfigManager::getLocale()); + OUString sURL("https://hub.libreoffice.org/documentation/?LOlocale=" + utl::ConfigManager::getUILocale()); sfx2::openUriExternally(sURL, false); break; } case SID_GETINVOLVED: { // Open get involved/join us page based on locales - OUString sURL("https://hub.libreoffice.org/joinus/?LOlocale=" + utl::ConfigManager::getLocale()); + OUString sURL("https://hub.libreoffice.org/joinus/?LOlocale=" + utl::ConfigManager::getUILocale()); sfx2::openUriExternally(sURL, false); break; } case SID_DONATION: { // Open donation page based on language + script (BCP47) with language as fall back. - OUString aLang = LanguageTag(utl::ConfigManager::getLocale()).getLanguage(); - OUString aBcp47 = LanguageTag(utl::ConfigManager::getLocale()).getBcp47(); + OUString aLang = LanguageTag(utl::ConfigManager::getUILocale()).getLanguage(); + OUString aBcp47 = LanguageTag(utl::ConfigManager::getUILocale()).getBcp47(); OUString sURL("https://hub.libreoffice.org/donation/?BCP47=" + aBcp47 + "&LOlang=" + aLang ); sfx2::openUriExternally(sURL, false); break; diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 956c600de6d9..4d07364cf725 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -215,7 +215,7 @@ static OUString HelpLocaleString() { const OUString aEnglish("en-US"); // detect installed locale - aLocaleStr = utl::ConfigManager::getLocale(); + aLocaleStr = utl::ConfigManager::getUILocale(); if ( aLocaleStr.isEmpty() ) aLocaleStr = aEnglish; @@ -263,7 +263,7 @@ static OUString HelpLocaleString() aLocaleStr = sLang; return aEnglish; } - aLocaleStr = utl::ConfigManager::getLocale(); + aLocaleStr = utl::ConfigManager::getUILocale(); return aLocaleStr; } } diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 94f0175a4dc1..01f20ba9734b 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -477,7 +477,7 @@ void SfxDocTplService_Impl::getDefaultLocale() ::osl::MutexGuard aGuard( maMutex ); if ( !mbLocaleSet ) { - maLocale = LanguageTag::convertToLocale( utl::ConfigManager::getLocale(), false); + maLocale = LanguageTag::convertToLocale( utl::ConfigManager::getUILocale(), false); mbLocaleSet = true; } } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 3728917d95fc..3a0e06f02716 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1372,7 +1372,7 @@ IMPL_LINK_NOARG(SfxViewFrame, GetInvolvedHandler, Button*, void) { try { - OUString sURL("https://hub.libreoffice.org/joinus/?LOlocale=" + utl::ConfigManager::getLocale()); + OUString sURL("https://hub.libreoffice.org/joinus/?LOlocale=" + utl::ConfigManager::getUILocale()); sfx2::openUriExternally(sURL, false); } catch (const Exception&) |