[Libreoffice-commits] core.git: use LanguageTag instead of comphelper::Locale

Stephan Bergmann sbergman at redhat.com
Thu Apr 4 02:41:05 PDT 2013


On 04/02/2013 07:27 PM, Eike Rathke wrote:
> On Thursday, 2013-03-28 18:28:30 +0100, Stephan Bergmann wrote:
>>> --- a/configmgr/source/configurationprovider.cxx
>>> +++ b/configmgr/source/configurationprovider.cxx
>>> @@ -337,20 +339,10 @@ void Service::setLocale(css::lang::Locale const & eLocale)
>>> -    if ( locale_ == "*" ) {
>>> +    if ( locale_ == "*" ) {     /* FIXME-BCP47: WTF is this?!? */
>>
>> A configuration provider can operate in one of two modes with
>> regards to localized properties.  It can either be set up to use a
>> specific locale, and return the best matching localized value for a
>> given localized property.  Or it can be set up (via "*") to treat
>> localized properties like sets, where each individual localized
>> value is accessible under the locale's name.
>
> Oh my ... seeing
> offapi/com/sun/star/configuration/AdministrationProvider.idl and
> offapi/com/sun/star/configuration/*Access.idl we even exposed "*" to the
> outer world and should regard it as "ugly nasty wrong but stable API"

My viewpoint would be that those "locale" parameters used at the 
configmgr API to select its behavior wrt localized properties have 
string values over a grammar of

   "*" | <BCP47 Language-Tag>

The only spoiler is that the concerned UNO objects (somewhat needlessly) 
also implement com.sun.star.lang.XLocalizable, which doesn't fit.

Stephan


More information about the LibreOffice mailing list