Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: source/i18n/unicode/dcfmtsym.h

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/unicode/datefmt.h ('k') | source/i18n/unicode/decimfmt.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/unicode/dcfmtsym.h
diff --git a/source/i18n/unicode/dcfmtsym.h b/source/i18n/unicode/dcfmtsym.h
index dd62a92e420d611e0bbaee63c2de90f198245e83..046bc1475b651bb53d4fa5fada168436168502e9 100644
--- a/source/i18n/unicode/dcfmtsym.h
+++ b/source/i18n/unicode/dcfmtsym.h
@@ -1,6 +1,6 @@
/*
********************************************************************************
-* Copyright (C) 1997-2014, International Business Machines
+* Copyright (C) 1997-2015, International Business Machines
* Corporation and others. All Rights Reserved.
********************************************************************************
*
@@ -164,11 +164,11 @@ public:
*/
kNineDigitSymbol,
/** Multiplication sign.
- * @draft ICU 54
+ * @stable ICU 54
*/
kExponentMultiplicationSymbol,
/** count symbol constants */
- kFormatSymbolCount
+ kFormatSymbolCount = kNineDigitSymbol + 2
};
/**
@@ -354,6 +354,23 @@ private:
void setCurrencyForSymbols();
public:
+
+#ifndef U_HIDE_INTERNAL_API
+ /**
+ * @internal For ICU use only
+ */
+ inline UBool isCustomCurrencySymbol() const {
+ return fIsCustomCurrencySymbol;
+ }
+
+ /**
+ * @internal For ICU use only
+ */
+ inline UBool isCustomIntlCurrencySymbol() const {
+ return fIsCustomIntlCurrencySymbol;
+ }
+#endif /* U_HIDE_INTERNAL_API */
+
/**
* _Internal_ function - more efficient version of getSymbol,
* returning a const reference to one of the symbol strings.
@@ -408,6 +425,8 @@ private:
UnicodeString currencySpcBeforeSym[UNUM_CURRENCY_SPACING_COUNT];
UnicodeString currencySpcAfterSym[UNUM_CURRENCY_SPACING_COUNT];
+ UBool fIsCustomCurrencySymbol;
+ UBool fIsCustomIntlCurrencySymbol;
};
// -------------------------------------
@@ -443,6 +462,12 @@ DecimalFormatSymbols::getConstSymbol(ENumberFormatSymbol symbol) const {
inline void
DecimalFormatSymbols::setSymbol(ENumberFormatSymbol symbol, const UnicodeString &value, const UBool propogateDigits = TRUE) {
+ if (symbol == kCurrencySymbol) {
+ fIsCustomCurrencySymbol = TRUE;
+ }
+ else if (symbol == kIntlCurrencySymbol) {
+ fIsCustomIntlCurrencySymbol = TRUE;
+ }
if(symbol<kFormatSymbolCount) {
fSymbols[symbol]=value;
}
« no previous file with comments | « source/i18n/unicode/datefmt.h ('k') | source/i18n/unicode/decimfmt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698