LEFT | RIGHT |
(no file at all) | |
1 // © 2017 and later: Unicode, Inc. and others. | 1 // © 2017 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html | 2 // License & terms of use: http://www.unicode.org/copyright.html |
3 | 3 |
4 #include "unicode/utypes.h" | 4 #include "unicode/utypes.h" |
5 | 5 |
6 #if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT | 6 #if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT |
7 | 7 |
8 #include "cstring.h" | 8 #include "cstring.h" |
9 #include "unicode/ures.h" | 9 #include "unicode/ures.h" |
10 #include "uresimp.h" | 10 #include "uresimp.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 chain = patternModifier; | 301 chain = patternModifier; |
302 } | 302 } |
303 | 303 |
304 // Outer modifier (CLDR units and currency long names) | 304 // Outer modifier (CLDR units and currency long names) |
305 if (isCldrUnit) { | 305 if (isCldrUnit) { |
306 fLongNameHandler.adoptInstead( | 306 fLongNameHandler.adoptInstead( |
307 new LongNameHandler( | 307 new LongNameHandler( |
308 LongNameHandler::forMeasureUnit( | 308 LongNameHandler::forMeasureUnit( |
309 macros.locale, | 309 macros.locale, |
310 macros.unit, | 310 macros.unit, |
| 311 macros.perUnit, |
311 unitWidth, | 312 unitWidth, |
312 resolvePluralRules(macros.rules, macros.locale,
status), | 313 resolvePluralRules(macros.rules, macros.locale,
status), |
313 chain, | 314 chain, |
314 status))); | 315 status))); |
315 chain = fLongNameHandler.getAlias(); | 316 chain = fLongNameHandler.getAlias(); |
316 } else if (isCurrency && unitWidth == UNUM_UNIT_WIDTH_FULL_NAME) { | 317 } else if (isCurrency && unitWidth == UNUM_UNIT_WIDTH_FULL_NAME) { |
317 fLongNameHandler.adoptInstead( | 318 fLongNameHandler.adoptInstead( |
318 new LongNameHandler( | 319 new LongNameHandler( |
319 LongNameHandler::forCurrencyLongNames( | 320 LongNameHandler::forCurrencyLongNames( |
320 macros.locale, | 321 macros.locale, |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 for (int i = 0; i < fractionCount; i++) { | 456 for (int i = 0; i < fractionCount; i++) { |
456 // Get and append the next digit value | 457 // Get and append the next digit value |
457 int8_t nextDigit = quantity.getDigit(-i - 1); | 458 int8_t nextDigit = quantity.getDigit(-i - 1); |
458 length += string.append( | 459 length += string.append( |
459 getDigitFromSymbols(nextDigit, *micros.symbols), UNUM_FRACTION_F
IELD, status); | 460 getDigitFromSymbols(nextDigit, *micros.symbols), UNUM_FRACTION_F
IELD, status); |
460 } | 461 } |
461 return length; | 462 return length; |
462 } | 463 } |
463 | 464 |
464 #endif /* #if !UCONFIG_NO_FORMATTING */ | 465 #endif /* #if !UCONFIG_NO_FORMATTING */ |
LEFT | RIGHT |