ICU-2334 add UNUM_SIGNIFICANT_DIGITS_USED
X-SVN-Rev: 14942
This commit is contained in:
parent
e1b4d36b9f
commit
f667e25fdf
@ -494,6 +494,9 @@ typedef enum UNumberFormatAttribute {
|
|||||||
UNUM_PADDING_POSITION,
|
UNUM_PADDING_POSITION,
|
||||||
/** Secondary grouping size */
|
/** Secondary grouping size */
|
||||||
UNUM_SECONDARY_GROUPING_SIZE,
|
UNUM_SECONDARY_GROUPING_SIZE,
|
||||||
|
/** Use significant digits
|
||||||
|
* @draft ICU 3.0 */
|
||||||
|
UNUM_SIGNIFICANT_DIGITS_USED,
|
||||||
/** Minimum significant digits
|
/** Minimum significant digits
|
||||||
* @draft ICU 3.0 */
|
* @draft ICU 3.0 */
|
||||||
UNUM_MIN_SIGNIFICANT_DIGITS,
|
UNUM_MIN_SIGNIFICANT_DIGITS,
|
||||||
|
@ -363,6 +363,9 @@ unum_getAttribute(const UNumberFormat* fmt,
|
|||||||
// TBD: what should this return?
|
// TBD: what should this return?
|
||||||
return df->getMinimumFractionDigits();
|
return df->getMinimumFractionDigits();
|
||||||
|
|
||||||
|
case UNUM_SIGNIFICANT_DIGITS_USED:
|
||||||
|
return df->areSignificantDigitsUsed();
|
||||||
|
|
||||||
case UNUM_MAX_SIGNIFICANT_DIGITS:
|
case UNUM_MAX_SIGNIFICANT_DIGITS:
|
||||||
return df->getMaximumSignificantDigits();
|
return df->getMaximumSignificantDigits();
|
||||||
|
|
||||||
@ -407,15 +410,15 @@ unum_setAttribute( UNumberFormat* fmt,
|
|||||||
DecimalFormat* df = (DecimalFormat*) fmt;
|
DecimalFormat* df = (DecimalFormat*) fmt;
|
||||||
switch(attr) {
|
switch(attr) {
|
||||||
case UNUM_PARSE_INT_ONLY:
|
case UNUM_PARSE_INT_ONLY:
|
||||||
df->setParseIntegerOnly((UBool)newValue);
|
df->setParseIntegerOnly(newValue!=0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNUM_GROUPING_USED:
|
case UNUM_GROUPING_USED:
|
||||||
df->setGroupingUsed((UBool)newValue);
|
df->setGroupingUsed(newValue!=0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNUM_DECIMAL_ALWAYS_SHOWN:
|
case UNUM_DECIMAL_ALWAYS_SHOWN:
|
||||||
df->setDecimalSeparatorAlwaysShown((UBool)newValue);
|
df->setDecimalSeparatorAlwaysShown(newValue!=0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNUM_MAX_INTEGER_DIGITS:
|
case UNUM_MAX_INTEGER_DIGITS:
|
||||||
@ -444,6 +447,10 @@ unum_setAttribute( UNumberFormat* fmt,
|
|||||||
df->setMaximumFractionDigits(newValue);
|
df->setMaximumFractionDigits(newValue);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case UNUM_SIGNIFICANT_DIGITS_USED:
|
||||||
|
df->setSignificantDigitsUsed(newValue!=0);
|
||||||
|
break;
|
||||||
|
|
||||||
case UNUM_MAX_SIGNIFICANT_DIGITS:
|
case UNUM_MAX_SIGNIFICANT_DIGITS:
|
||||||
df->setMaximumSignificantDigits(newValue);
|
df->setMaximumSignificantDigits(newValue);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user