Logo Search packages:      
Sourcecode: icu version File versions

void DecimalFormat::applyPattern ( const UnicodeString pattern,
UBool  localized,
UParseError parseError,
UErrorCode status 
) [private]

Does the real work of applying a pattern.

Parameters:
patternThe pattern to be applied.
localizedIf true, the pattern is localized; else false.
parseErrorStruct to recieve information on position of error if an error is encountered
statusOutput param set to success/failure code on exit. If the pattern is invalid, this will be set to a failure result.

Definition at line 4501 of file decimfmt.cpp.

References FALSE, DecimalFormatSymbols::getLocale(), UnicodeString::indexOf(), and NULL.

{
    // do the following re-set first. since they change private data by
    // apply pattern again.
    if (pattern.indexOf(kCurrencySign) != -1) {
        if (fCurrencyPluralInfo == NULL) {
            // initialize currencyPluralInfo if needed
            fCurrencyPluralInfo = new CurrencyPluralInfo(fSymbols->getLocale(), status);
        }
        if (fAffixPatternsForCurrency == NULL) {
            setupCurrencyAffixPatterns(status);
        }
        if (pattern.indexOf(fgTripleCurrencySign, 3, 0) != -1) {
            // only setup the affixes of the current pattern.
            setupCurrencyAffixes(pattern, TRUE, FALSE, status);
        }
    }
    applyPatternWithoutExpandAffix(pattern, localized, parseError, status);
    expandAffixAdjustWidth(NULL);
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index