summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/config/languageoptions.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index 9f9fe4513819..faa573069e5c 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -283,9 +283,13 @@ OUString getInstalledLocaleForLanguage(css::uno::Sequence<OUString> const & inst
return OUString();
}
-OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence<OUString>& rLocaleElementNames)
+OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence<OUString>& rLocaleElementNames, const OUString& rPreferredLocale)
{
- OUString locale = getInstalledLocaleForLanguage(rLocaleElementNames, officecfg::System::L10N::UILocale::get());
+ OUString aPreferredLocale(rPreferredLocale);
+ if (aPreferredLocale.isEmpty())
+ aPreferredLocale = officecfg::System::L10N::UILocale::get();
+
+ OUString locale = getInstalledLocaleForLanguage(rLocaleElementNames, aPreferredLocale);
if (locale.isEmpty())
locale = getInstalledLocaleForLanguage(rLocaleElementNames, "en-US");
if (locale.isEmpty() && rLocaleElementNames.hasElements())