mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-11 08:01:32 +00:00
ICU-4189 Fix for UCONFIG_NO_CONVERSION
X-SVN-Rev: 17308
This commit is contained in:
parent
8ccebb0c07
commit
f9baa59b7b
2 changed files with 5 additions and 3 deletions
|
@ -406,7 +406,9 @@ UnicodeString& U_EXPORT2 Collator::getDisplayName(const Locale& objectLocale,
|
|||
{
|
||||
#if !UCONFIG_NO_SERVICE
|
||||
if (hasService()) {
|
||||
return gService->getDisplayName(objectLocale.getName(), name, displayLocale);
|
||||
UnicodeString locNameStr;
|
||||
LocaleUtility::initNameFromLocale(objectLocale, locNameStr);
|
||||
return gService->getDisplayName(locNameStr, name, displayLocale);
|
||||
}
|
||||
#endif
|
||||
return objectLocale.getDisplayName(displayLocale, name);
|
||||
|
|
|
@ -99,8 +99,8 @@ UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(NumberFormat)
|
|||
NumberFormatFactory::~NumberFormatFactory() {}
|
||||
SimpleNumberFormatFactory::SimpleNumberFormatFactory(const Locale& locale, UBool visible)
|
||||
: _visible(visible)
|
||||
, _id(locale.getName())
|
||||
{
|
||||
LocaleUtility::initNameFromLocale(locale, _id);
|
||||
}
|
||||
|
||||
SimpleNumberFormatFactory::~SimpleNumberFormatFactory() {}
|
||||
|
@ -555,7 +555,7 @@ protected:
|
|||
class ICUNumberFormatService : public ICULocaleService {
|
||||
public:
|
||||
ICUNumberFormatService()
|
||||
: ICULocaleService("Number Format")
|
||||
: ICULocaleService(UNICODE_STRING_SIMPLE("Number Format"))
|
||||
{
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
registerFactory(new ICUNumberFormatFactory(), status);
|
||||
|
|
Loading…
Add table
Reference in a new issue