diff options
-rw-r--r-- | dbaccess/source/core/misc/userinformation.cxx | 2 | ||||
-rw-r--r-- | desktop/source/app/app.cxx | 2 | ||||
-rw-r--r-- | desktop/source/app/officeipcthread.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_resource.cxx | 2 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 2 | ||||
-rw-r--r-- | framework/source/services/substitutepathvars.cxx | 2 | ||||
-rw-r--r-- | include/unotools/configmgr.hxx | 4 | ||||
-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 | ||||
-rw-r--r-- | svx/source/dialog/SafeModeDialog.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/configmgr.cxx | 8 |
13 files changed, 27 insertions, 19 deletions
diff --git a/dbaccess/source/core/misc/userinformation.cxx b/dbaccess/source/core/misc/userinformation.cxx index d7cd482f4a80..b5f6d4e28f88 100644 --- a/dbaccess/source/core/misc/userinformation.cxx +++ b/dbaccess/source/core/misc/userinformation.cxx @@ -27,7 +27,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; UserInformation::UserInformation(): - m_aUserLocale( LanguageTag( ConfigManager::getLocale()).getLocale()) + m_aUserLocale( LanguageTag( ConfigManager::getWorkLocale()).getLocale()) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index de11310bc7ca..bbe4b2ee286d 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1998,7 +1998,7 @@ void Desktop::OpenClients() OUString aHelpURL = "vnd.sun.star.help://" + aHelpModule + "/start?Language=" - + utl::ConfigManager::getLocale(); + + utl::ConfigManager::getUILocale(); #if defined UNX aHelpURL += "&System=UNX"; #elif defined WNT diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index a606c589bcc8..49a08f97eeb8 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -1086,7 +1086,7 @@ bool IpcThread::process(OString const & arguments, bool * waitProcessed) { } if (bShowHelp) { aHelpURLBuffer.append("?Language="); - aHelpURLBuffer.append(utl::ConfigManager::getLocale()); + aHelpURLBuffer.append(utl::ConfigManager::getUILocale()); #if defined UNX aHelpURLBuffer.append("&System=UNX"); #elif defined WNT diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx index 4f5671df9879..c6e9d2a18e3a 100644 --- a/desktop/source/deployment/misc/dp_resource.cxx +++ b/desktop/source/deployment/misc/dp_resource.cxx @@ -37,7 +37,7 @@ namespace { struct OfficeLocale : public rtl::StaticWithInit<LanguageTag, OfficeLocale> { const LanguageTag operator () () { - OUString slang(utl::ConfigManager::getLocale()); + OUString slang(utl::ConfigManager::getUILocale()); //fallback, the locale is currently only set when the user starts the //office for the first time. if (slang.isEmpty()) diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index 96b086878f58..e7f8a2927806 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -155,7 +155,7 @@ void CommandEnvironmentImpl::printLicense( Reference< css::i18n::XCollator > xCollator = css::i18n::Collator::create( m_xComponentContext ); xCollator->loadDefaultCollator( - LanguageTag(utl::ConfigManager::getLocale()).getLocale(), + LanguageTag(utl::ConfigManager::getUILocale()).getLocale(), css::i18n::CollatorOptions::CollatorOptions_IGNORE_CASE); do diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 0e206c36d2a0..afa83643b87a 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -655,7 +655,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables() // Detect the language type of the current office m_aPreDefVars.m_eLanguageType = LANGUAGE_ENGLISH_US; - OUString aLocaleStr( utl::ConfigManager::getLocale() ); + OUString aLocaleStr( utl::ConfigManager::getUILocale() ); m_aPreDefVars.m_eLanguageType = LanguageTag::convertToLanguageTypeWithFallback( aLocaleStr ); // We used to have an else branch here with a SAL_WARN, but that // always fired in some unit tests when this code was built with diff --git a/include/unotools/configmgr.hxx b/include/unotools/configmgr.hxx index 5205c9d1664e..e79629834db4 100644 --- a/include/unotools/configmgr.hxx +++ b/include/unotools/configmgr.hxx @@ -43,7 +43,9 @@ public: static OUString getDefaultCurrency(); - static OUString getLocale(); + static OUString getUILocale(); + + static OUString getWorkLocale(); static OUString getProductExtension(); 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&) diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index e32128570db4..b99770d1d827 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -118,7 +118,7 @@ SafeModeDialog::SafeModeDialog(vcl::Window* pParent) // Set URL for help button (module=safemode) OUString sURL("http://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() + - "&LOlocale=" + utl::ConfigManager::getLocale() + "&LOmodule=safemode"); + "&LOlocale=" + utl::ConfigManager::getUILocale() + "&LOmodule=safemode"); mpBugLink->SetURL(sURL); mpUserProfileLink->SetURL(comphelper::BackupFileHelper::getUserProfileURL()); diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index d07f6c164598..1c7a7f29ff9e 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -108,12 +108,18 @@ OUString utl::ConfigManager::getDefaultCurrency() { "L10N/ooSetupCurrency"); } -OUString utl::ConfigManager::getLocale() { +OUString utl::ConfigManager::getUILocale() { return getConfigurationString( "/org.openoffice.Setup", "L10N/ooLocale"); } +OUString utl::ConfigManager::getWorkLocale() { + return getConfigurationString( + "/org.openoffice.Setup", + "L10N/ooSetupSystemLocale"); +} + OUString utl::ConfigManager::getProductExtension() { return getConfigurationString( "/org.openoffice.Setup", |