mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 23:10:40 +00:00
ICU-7817 Reinstate useLastResortData for dcfmtsyms
X-SVN-Rev: 28355
This commit is contained in:
parent
ac4c3c9f3a
commit
6f17ff12b4
2 changed files with 7 additions and 5 deletions
|
@ -60,7 +60,7 @@ DecimalFormatSymbols::DecimalFormatSymbols(UErrorCode& status)
|
|||
: UObject(),
|
||||
locale()
|
||||
{
|
||||
initialize(locale, status);
|
||||
initialize(locale, status, TRUE);
|
||||
}
|
||||
|
||||
// -------------------------------------
|
||||
|
@ -139,7 +139,7 @@ DecimalFormatSymbols::operator==(const DecimalFormatSymbols& that) const
|
|||
// -------------------------------------
|
||||
|
||||
void
|
||||
DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status)
|
||||
DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status, UBool useLastResortData)
|
||||
{
|
||||
static const char *gNumberElementKeys[kFormatSymbolCount] = {
|
||||
"decimal",
|
||||
|
@ -178,8 +178,10 @@ DecimalFormatSymbols::initialize(const Locale& loc, UErrorCode& status)
|
|||
UResourceBundle *numberElementsRes = ures_getByKeyWithFallback(resource, gNumberElements, NULL, &status);
|
||||
|
||||
if (U_FAILURE(status)) {
|
||||
status = U_USING_FALLBACK_WARNING;
|
||||
initialize();
|
||||
if ( useLastResortData ) {
|
||||
status = U_USING_FALLBACK_WARNING;
|
||||
initialize();
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ private:
|
|||
* failure code upon return.
|
||||
* @param useLastResortData determine if use last resort data
|
||||
*/
|
||||
void initialize(const Locale& locale, UErrorCode& success);
|
||||
void initialize(const Locale& locale, UErrorCode& success, UBool useLastResortData = FALSE);
|
||||
|
||||
/**
|
||||
* Initialize the symbols with default values.
|
||||
|
|
Loading…
Add table
Reference in a new issue