[Libreoffice-commits] core.git: svl/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 23 15:17:41 UTC 2021


 svl/source/numbers/zforlist.cxx |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit c8d66a4d53acf1b0c0de45335015b72ee72cd0fd
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Thu Sep 23 16:23:47 2021 +0200
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Thu Sep 23 17:17:02 2021 +0200

    Reorder the internal ZF_STANDARD_DATETIME offsets to a more logical sequence
    
    These once were to be strictly kept for the binary file format but
    nowadays only serve as a position / key index offset within the
    numberformat map.
    
    Change-Id: I7c61852cc26463b1d4d67a6152501d521440abe1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122530
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins

diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index ae6710ee18f1..721c71ce8b0a 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -160,7 +160,7 @@ sal_uInt32 const indexTable[NF_INDEX_TABLE_ENTRIES] = {
     ZF_STANDARD_DATETIME + 1, // NF_DATETIME_SYS_DDMMYYYY_HHMMSS
     ZF_STANDARD_LOGICAL, // NF_BOOLEAN
     ZF_STANDARD_TEXT, // NF_TEXT
-    ZF_STANDARD_DATETIME + 4, // NF_DATETIME_SYS_DDMMYYYY_HHMM
+    ZF_STANDARD_DATETIME + 2, // NF_DATETIME_SYS_DDMMYYYY_HHMM
     ZF_STANDARD_FRACTION + 2, // NF_FRACTION_3D
     ZF_STANDARD_FRACTION + 3, // NF_FRACTION_2
     ZF_STANDARD_FRACTION + 4, // NF_FRACTION_4
@@ -168,10 +168,10 @@ sal_uInt32 const indexTable[NF_INDEX_TABLE_ENTRIES] = {
     ZF_STANDARD_FRACTION + 6, // NF_FRACTION_16
     ZF_STANDARD_FRACTION + 7, // NF_FRACTION_10
     ZF_STANDARD_FRACTION + 8, // NF_FRACTION_100
-    ZF_STANDARD_DATETIME + 2, // NF_DATETIME_ISO_YYYYMMDD_HHMMSS
-    ZF_STANDARD_DATETIME + 6, // NF_DATETIME_ISO_YYYYMMDD_HHMMSS000
-    ZF_STANDARD_DATETIME + 3, // NF_DATETIME_ISO_YYYYMMDDTHHMMSS
-    ZF_STANDARD_DATETIME + 5  // NF_DATETIME_ISO_YYYYMMDDTHHMMSS000
+    ZF_STANDARD_DATETIME + 3, // NF_DATETIME_ISO_YYYYMMDD_HHMMSS
+    ZF_STANDARD_DATETIME + 4, // NF_DATETIME_ISO_YYYYMMDD_HHMMSS000
+    ZF_STANDARD_DATETIME + 5, // NF_DATETIME_ISO_YYYYMMDDTHHMMSS
+    ZF_STANDARD_DATETIME + 6  // NF_DATETIME_ISO_YYYYMMDDTHHMMSS000
 };
 
 /**
@@ -2875,7 +2875,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
     // DD.MM.YYYY HH:MM   System
     nIdx = ImpGetFormatCodeIndex( aFormatSeq, NF_DATETIME_SYS_DDMMYYYY_HHMM );
     ImpInsertFormat( aFormatSeq[nIdx],
-                     CLOffset + ZF_STANDARD_DATETIME+4 /* NF_DATETIME_SYS_DDMMYYYY_HHMM */ );
+                     CLOffset + ZF_STANDARD_DATETIME+2 /* NF_DATETIME_SYS_DDMMYYYY_HHMM */ );
 
     const NfKeywordTable & rKeyword = pFormatScanner->GetKeywords();
     i18n::NumberFormatCode aSingleFormatCode;
@@ -2890,7 +2890,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
         rKeyword[NF_KEY_MMI] + ":" +
         rKeyword[NF_KEY_SS];
     SvNumberformat* pFormat = ImpInsertFormat( aSingleFormatCode,
-                     CLOffset + ZF_STANDARD_DATETIME+2 /* NF_DATETIME_ISO_YYYYMMDD_HHMMSS */ );
+                     CLOffset + ZF_STANDARD_DATETIME+3 /* NF_DATETIME_ISO_YYYYMMDD_HHMMSS */ );
     assert(pFormat);
 
     // YYYY-MM-DD HH:MM:SS,000   ISO (with blank instead of 'T') and
@@ -2904,7 +2904,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
         rKeyword[NF_KEY_SS] + GetLocaleData()->getTime100SecSep() +
         "000";
     pFormat = ImpInsertFormat( aSingleFormatCode,
-                     CLOffset + ZF_STANDARD_DATETIME+6 /* NF_DATETIME_ISO_YYYYMMDD_HHMMSS000 */ );
+                     CLOffset + ZF_STANDARD_DATETIME+4 /* NF_DATETIME_ISO_YYYYMMDD_HHMMSS000 */ );
     assert(pFormat);
 
     // YYYY-MM-DD"T"HH:MM:SS   ISO
@@ -2916,7 +2916,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
         rKeyword[NF_KEY_MMI] + ":" +
         rKeyword[NF_KEY_SS];
     pFormat = ImpInsertFormat( aSingleFormatCode,
-                     CLOffset + ZF_STANDARD_DATETIME+3 /* NF_DATETIME_ISO_YYYYMMDDTHHMMSS */ );
+                     CLOffset + ZF_STANDARD_DATETIME+5 /* NF_DATETIME_ISO_YYYYMMDDTHHMMSS */ );
     assert(pFormat);
     pFormat->SetComment("ISO 8601");    // not to be localized
 
@@ -2930,7 +2930,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
         rKeyword[NF_KEY_SS] + (GetLocaleData()->getTime100SecSep() == "." ? "." : ",") +
         "000";
     pFormat = ImpInsertFormat( aSingleFormatCode,
-                     CLOffset + ZF_STANDARD_DATETIME+5 /* NF_DATETIME_ISO_YYYYMMDDTHHMMSS000 */ );
+                     CLOffset + ZF_STANDARD_DATETIME+6 /* NF_DATETIME_ISO_YYYYMMDDTHHMMSS000 */ );
     assert(pFormat);
     pFormat->SetComment("ISO 8601");    // not to be localized
 


More information about the Libreoffice-commits mailing list