ICU-4189 Fix for UCONFIG_NO_CONVERSION

X-SVN-Rev: 17308
This commit is contained in:
George Rhoten 2005-03-09 23:50:26 +00:00
parent 8ccebb0c07
commit f9baa59b7b
2 changed files with 5 additions and 3 deletions

View file

@ -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);

View file

@ -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);