diff options
author | Eike Rathke <erack@redhat.com> | 2013-03-27 22:49:35 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-03-28 01:39:07 +0100 |
commit | 4f79c03ba8ca14c3b9798565272a82e4e14ac3d0 (patch) | |
tree | de0895da089ef89e72b11497e5d2d0295346cf23 /configmgr/source/configurationprovider.cxx | |
parent | efc5995170f2ffe98374acb16a4f851bede6842d (diff) |
use LanguageTag instead of comphelper::Locale
Change-Id: I98cac783ff1db94d1d7135dd0db8ee0d809b3457
Diffstat (limited to 'configmgr/source/configurationprovider.cxx')
-rw-r--r-- | configmgr/source/configurationprovider.cxx | 16 |
1 files changed, 4 insertions, 12 deletions
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; } |