| Index: source/i18n/plurrule.cpp
|
| diff --git a/source/i18n/plurrule.cpp b/source/i18n/plurrule.cpp
|
| index ab9fba451406ea1fc59771cdaf64b2c03cee27ab..0f1ff8d6c4c177e1011e7e46708236d0e3257eb3 100644
|
| --- a/source/i18n/plurrule.cpp
|
| +++ b/source/i18n/plurrule.cpp
|
| @@ -1,6 +1,6 @@
|
| /*
|
| *******************************************************************************
|
| -* Copyright (C) 2007-2014, International Business Machines Corporation and
|
| +* Copyright (C) 2007-2015, International Business Machines Corporation and
|
| * others. All Rights Reserved.
|
| *******************************************************************************
|
| *
|
| @@ -31,6 +31,9 @@
|
| #include "uvectr32.h"
|
| #include "sharedpluralrules.h"
|
| #include "unifiedcache.h"
|
| +#include "digitinterval.h"
|
| +#include "visibledigits.h"
|
| +
|
|
|
| #if !UCONFIG_NO_FORMATTING
|
|
|
| @@ -253,6 +256,16 @@ PluralRules::select(const FixedDecimal &number) const {
|
| }
|
| }
|
|
|
| +UnicodeString
|
| +PluralRules::select(const VisibleDigitsWithExponent &number) const {
|
| + if (number.getExponent() != NULL) {
|
| + return UnicodeString(TRUE, PLURAL_DEFAULT_RULE, -1);
|
| + }
|
| + return select(FixedDecimal(number.getMantissa()));
|
| +}
|
| +
|
| +
|
| +
|
| StringEnumeration*
|
| PluralRules::getKeywords(UErrorCode& status) const {
|
| if (U_FAILURE(status)) return NULL;
|
| @@ -1370,7 +1383,14 @@ PluralKeywordEnumeration::count(UErrorCode& /*status*/) const {
|
| PluralKeywordEnumeration::~PluralKeywordEnumeration() {
|
| }
|
|
|
| -
|
| +FixedDecimal::FixedDecimal(const VisibleDigits &digits) {
|
| + digits.getFixedDecimal(
|
| + source, intValue, decimalDigits,
|
| + decimalDigitsWithoutTrailingZeros,
|
| + visibleDecimalDigitCount, hasIntegerValue);
|
| + isNegative = digits.isNegative();
|
| + isNanOrInfinity = digits.isNaNOrInfinity();
|
| +}
|
|
|
| FixedDecimal::FixedDecimal(double n, int32_t v, int64_t f) {
|
| init(n, v, f);
|
|
|