summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-03-27 22:49:35 +0100
committerEike Rathke <erack@redhat.com>2013-03-28 01:39:07 +0100
commit4f79c03ba8ca14c3b9798565272a82e4e14ac3d0 (patch)
treede0895da089ef89e72b11497e5d2d0295346cf23 /configmgr
parentefc5995170f2ffe98374acb16a4f851bede6842d (diff)
use LanguageTag instead of comphelper::Locale
Change-Id: I98cac783ff1db94d1d7135dd0db8ee0d809b3457
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/Library_configmgr.mk1
-rw-r--r--configmgr/source/configurationprovider.cxx16
2 files changed, 5 insertions, 12 deletions
diff --git a/configmgr/Library_configmgr.mk b/configmgr/Library_configmgr.mk
index 3cd2ff1cdd0c..3cc6bee38604 100644
--- a/configmgr/Library_configmgr.mk
+++ b/configmgr/Library_configmgr.mk
@@ -74,6 +74,7 @@ $(eval $(call gb_Library_use_libraries,configmgr, \
sal \
salhelper \
xmlreader \
+ i18nisolang1 \
$(gb_UWINAPI) \
))
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index 84f9456b3b7e..bd84e8cb6f98 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -57,6 +57,8 @@
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
+#include <i18npool/languagetag.hxx>
+
#include "components.hxx"
#include "configurationprovider.hxx"
#include "lock.hxx"
@@ -337,20 +339,10 @@ void Service::setLocale(css::lang::Locale const & eLocale)
css::lang::Locale Service::getLocale() throw (css::uno::RuntimeException) {
osl::MutexGuard guard(*lock_);
css::lang::Locale loc;
- if ( locale_ == "*" ) {
+ if ( locale_ == "*" ) { /* FIXME-BCP47: WTF is this?!? */
loc.Language = locale_;
} else if (! locale_.isEmpty()) {
- try {
- comphelper::Locale l(locale_);
- loc.Language = l.getLanguage();
- loc.Country = l.getCountry();
- loc.Variant = l.getVariant();
- } catch (comphelper::Locale::MalFormedLocaleException & e) {
- throw css::uno::RuntimeException(
- (OUString("MalformedLocaleException: ") +
- e.Message),
- static_cast< cppu::OWeakObject * >(this));
- }
+ loc = LanguageTag( locale_).getLocale( false);
}
return loc;
}