summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-01-17 19:21:56 +0100
committerAndras Timar <andras.timar@collabora.com>2014-01-19 14:24:04 +0000
commitcf32bd06da9d215e8a337ad611651664142e8a65 (patch)
tree246a86f62bd46ba0a9031fe375bd46b3382cf483
parentdad46670ccd3f2a79ad61812ea5a48120e82058d (diff)
fdo#73549 do not attempt to resolve an empty locale
... to match installed UI locales Change-Id: If0ad0fde392bc5ea3cf454f4858330f5e93a6666 (cherry picked from commit 8e826c7ff7c597e9f585377b2117f4dc24239dcc) fdo#73549 do not resolve empty locale here if not determined yet Change-Id: Iad03d6209a2b4024b27c6195195e5aa557c295fe (cherry picked from commit db6f8f9f8969b592ed90c841960fdd186e1cbc5a) do not resolve empty locale here when set, fdo#73549 related Change-Id: Id9c8c3926f64826fd2295e0f75f007ce435f5915 (cherry picked from commit 26fc9be1bf2d6aaeb52a571ea416f4527a52e146) Reviewed-on: https://gerrit.libreoffice.org/7529 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--comphelper/source/misc/configuration.cxx2
-rw-r--r--configmgr/source/configurationprovider.cxx2
-rw-r--r--desktop/source/app/langselect.cxx3
3 files changed, 5 insertions, 2 deletions
diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx
index 69885b98163f..6f9e5fdbdf3f 100644
--- a/comphelper/source/misc/configuration.cxx
+++ b/comphelper/source/misc/configuration.cxx
@@ -47,7 +47,7 @@ OUString getDefaultLocale(
css::uno::Reference< css::lang::XLocalizable >(
css::configuration::theDefaultProvider::get(context),
css::uno::UNO_QUERY_THROW)->
- getLocale()).getBcp47();
+ getLocale()).getBcp47(false);
}
OUString extendLocalizedPath(OUString const & path, OUString const & locale) {
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index a4aaa15d9cdb..7293e9fb5733 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -324,7 +324,7 @@ void Service::setLocale(css::lang::Locale const & eLocale)
throw (css::uno::RuntimeException)
{
osl::MutexGuard guard(*lock_);
- locale_ = LanguageTag::convertToBcp47( eLocale);
+ locale_ = LanguageTag::convertToBcp47( eLocale, false);
}
css::lang::Locale Service::getLocale() throw (css::uno::RuntimeException) {
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 291e70822222..21228f849526 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -53,6 +53,9 @@ OUString foundLocale;
OUString getInstalledLocale(
css::uno::Sequence<OUString> const & installed, OUString const & locale)
{
+ if (locale.isEmpty())
+ return OUString(); // do not attempt to resolve anything
+
for (sal_Int32 i = 0; i != installed.getLength(); ++i) {
if (installed[i] == locale) {
return installed[i];