From cd44f70dd34be3b001f10cfd8ed12efa9575057f Mon Sep 17 00:00:00 2001 From: Doug Felt Date: Wed, 7 Nov 2001 00:01:56 +0000 Subject: [PATCH] ICU-1413 return RuleBasedNumberFormat for unum_open when handed the style UNUM_SPELLOUT X-SVN-Rev: 6651 --- icu4c/source/i18n/unum.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/icu4c/source/i18n/unum.cpp b/icu4c/source/i18n/unum.cpp index 952bc42670..80e3f3f504 100644 --- a/icu4c/source/i18n/unum.cpp +++ b/icu4c/source/i18n/unum.cpp @@ -15,7 +15,7 @@ #include "unicode/uloc.h" #include "unicode/numfmt.h" #include "unicode/decimfmt.h" -//#include "spellfmt.h" +#include "unicode/rbnf.h" #include "unicode/ustring.h" #include "cpputils.h" #include "unicode/fmtable.h" @@ -129,11 +129,7 @@ unum_open( UNumberFormatStyle style, break; case UNUM_SPELLOUT: - // Todo: TBD: Add spellout support - //retVal = (UNumberFormat*)new NumberSpelloutFormat(); - //break; - *status = U_UNSUPPORTED_ERROR; - return 0; + return (UNumberFormat*)new RuleBasedNumberFormat(URBNF_SPELLOUT, Locale(locale), *status); default: *status = U_UNSUPPORTED_ERROR; @@ -147,6 +143,7 @@ unum_open( UNumberFormatStyle style, return retVal; }else{ + /* we don't support RBNF patterns yet */ UParseError tErr; int32_t len = (patternLength == -1 ? u_strlen(pattern) : patternLength); const UnicodeString pat((UChar*)pattern, len, len);