From e7d73b42bd71aaab862c3e519348507a84f74754 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 15 Jun 2013 16:27:05 +0200 Subject: use proper offset for additional locale data formats, fdo#64947 related Old number formats had predefined formats from 0..49, locale data could define additional formats from index 50 on. Internal (fractional) formats were added to the number formatter, shifting the number of predefined entries NF_INDEX_TABLE_ENTRIES by two that was also used as an offset to determine whether a format needed to be added additionally. As a consequece, formats defined with index values 50 and 51 in locale data were ignored and not available in the dialog. Introduced a new enum constant NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS to use as the old offset value for not having to change all locale data definitions everytime an internally generated format is added. Change-Id: I94bdaabf360f7b9c253b1e3f5b73087f0c45fb44 --- xmloff/source/style/xmlnumfi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xmloff') 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, -- cgit