void ICULocale::initializeDecimalFormat() { if (m_didCreateDecimalFormat) return; m_didCreateDecimalFormat = true; UErrorCode status = U_ZERO_ERROR; m_numberFormat = unum_open(UNUM_DECIMAL, 0, 0, m_locale.data(), 0, &status); if (!U_SUCCESS(status)) return; setDecimalSymbol(0, UNUM_ZERO_DIGIT_SYMBOL); setDecimalSymbol(1, UNUM_ONE_DIGIT_SYMBOL); setDecimalSymbol(2, UNUM_TWO_DIGIT_SYMBOL); setDecimalSymbol(3, UNUM_THREE_DIGIT_SYMBOL); setDecimalSymbol(4, UNUM_FOUR_DIGIT_SYMBOL); setDecimalSymbol(5, UNUM_FIVE_DIGIT_SYMBOL); setDecimalSymbol(6, UNUM_SIX_DIGIT_SYMBOL); setDecimalSymbol(7, UNUM_SEVEN_DIGIT_SYMBOL); setDecimalSymbol(8, UNUM_EIGHT_DIGIT_SYMBOL); setDecimalSymbol(9, UNUM_NINE_DIGIT_SYMBOL); setDecimalSymbol(DecimalSeparatorIndex, UNUM_DECIMAL_SEPARATOR_SYMBOL); setDecimalSymbol(GroupSeparatorIndex, UNUM_GROUPING_SEPARATOR_SYMBOL); setDecimalTextAttribute(m_positivePrefix, UNUM_POSITIVE_PREFIX); setDecimalTextAttribute(m_positiveSuffix, UNUM_POSITIVE_SUFFIX); setDecimalTextAttribute(m_negativePrefix, UNUM_NEGATIVE_PREFIX); setDecimalTextAttribute(m_negativeSuffix, UNUM_NEGATIVE_SUFFIX); ASSERT(!m_positivePrefix.isEmpty() || !m_positiveSuffix.isEmpty() || !m_negativePrefix.isEmpty() || !m_negativeSuffix.isEmpty()); }
void KLocale::setDecimalSymbol(const QString &symbol) { d->setDecimalSymbol(symbol); }