diff options
-rw-r--r-- | include/svl/zforlist.hxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx index a18f8f25dac0..311e01369ad5 100644 --- a/include/svl/zforlist.hxx +++ b/include/svl/zforlist.hxx @@ -176,10 +176,12 @@ enum NfIndexTableOffset NF_BOOLEAN, // BOOLEAN NF_TEXT, // @ + NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS, // old number of predefined entries, locale data additions start after this + // From here on are values of new built-in formats that are not in the // original NumberFormatIndex.idl - NF_FRACTION_3, // # ?/4 + NF_FRACTION_3 = NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS, // # ?/4 NF_FRACTION_4, // # ?/100 NF_INDEX_TABLE_ENTRIES diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 1a3438008369..99c3da2596bd 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1825,7 +1825,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const ::com::sun::star::i18n sal_Int16 nOrgIndex ) { String aCodeStr( rCode.Code ); - if ( rCode.Index < NF_INDEX_TABLE_ENTRIES && + if ( rCode.Index < NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS && rCode.Usage == ::com::sun::star::i18n::KNumberFormatUsage::CURRENCY && rCode.Index != NF_CURRENCY_1000DEC2_CCC ) { // strip surrounding [$...] on automatic currency @@ -1865,7 +1865,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const ::com::sun::star::i18n delete pFormat; return NULL; } - if ( rCode.Index >= NF_INDEX_TABLE_ENTRIES ) + if ( rCode.Index >= NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ) { sal_uInt32 nCLOffset = nPos - (nPos % SV_COUNTRY_LANGUAGE_OFFSET); sal_uInt32 nKey = ImpIsEntry( aCodeStr, nCLOffset, ActLnge ); @@ -2714,7 +2714,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, SAL_WARN( "svl.numbers", "ImpGenerateAdditionalFormats: too many formats" ); break; // for } - if ( pFormatArr[j].Index < NF_INDEX_TABLE_ENTRIES && + if ( pFormatArr[j].Index < NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS && pFormatArr[j].Index != NF_CURRENCY_1000DEC2_CCC ) { // Insert only if not already inserted, but internal index must be // above so ImpInsertFormat can distinguish it. @@ -2750,7 +2750,7 @@ void SvNumberFormatter::ImpGenerateAdditionalFormats( sal_uInt32 CLOffset, SAL_WARN( "svl.numbers", "ImpGenerateAdditionalFormats: too many formats" ); break; // for } - if ( pFormatArr[j].Index >= NF_INDEX_TABLE_ENTRIES ) + if ( pFormatArr[j].Index >= NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ) if ( ImpInsertNewStandardFormat( pFormatArr[j], nPos+1, SV_NUMBERFORMATTER_VERSION_ADDITIONAL_I18N_FORMATS, bAfterChangingSystemCL ) ) diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index beb620591c3a..7fc2d973597d 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1612,7 +1612,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) NfIndexTableOffset eFormat = (NfIndexTableOffset) SvXMLNumFmtDefaults::GetDefaultDateFormat( eDateDOW, eDateDay, eDateMonth, eDateYear, eDateHours, eDateMins, eDateSecs, bFromSystem ); - if ( eFormat < NF_INDEX_TABLE_ENTRIES ) + if ( eFormat < NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ) { // #109651# if a date format has the automatic-order attribute and // contains exactly the elements of one of the default date formats, |