[libreoffice/f20] Resolves: tdf#89500 catch ISO 8601 datetime in all locales

Eike Rathke erack at fedoraproject.org
Fri Feb 20 14:38:47 UTC 2015


commit 0da26edb5b3dd2b08d861998d9daa80d5c6d95fb
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Feb 20 15:37:18 2015 +0100

    Resolves: tdf#89500 catch ISO 8601 datetime in all locales

 ...f-89500-catch-ISO-8601-datetime-in-all-lo.patch | 86 ++++++++++++++++++++++
 libreoffice.spec                                   |  2 +
 2 files changed, 88 insertions(+)
---
diff --git a/0001-Resolves-tdf-89500-catch-ISO-8601-datetime-in-all-lo.patch b/0001-Resolves-tdf-89500-catch-ISO-8601-datetime-in-all-lo.patch
new file mode 100644
index 0000000..908f773
--- /dev/null
+++ b/0001-Resolves-tdf-89500-catch-ISO-8601-datetime-in-all-lo.patch
@@ -0,0 +1,86 @@
+From d665a7510e42a124d240eb453c224932a5c876e7 Mon Sep 17 00:00:00 2001
+Message-Id: <d665a7510e42a124d240eb453c224932a5c876e7.1424442690.git.erack at redhat.com>
+From: Eike Rathke <erack at redhat.com>
+Date: Fri, 20 Feb 2015 15:11:36 +0100
+Subject: [PATCH] Resolves: tdf#89500 catch ISO 8601 datetime in all locales
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
+
+This is a multi-part message in MIME format.
+--------------erAck-patch-parts
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+
+Change-Id: I906ebdc6aa5c365df98a29e9e0f319f89f6833c6
+(cherry picked from commit 5d572e673dec3396487b14bb1f9e86aa8ab86786)
+---
+ svl/source/numbers/zforfind.cxx | 33 ++++++++++++++++++++++++++-------
+ 1 file changed, 26 insertions(+), 7 deletions(-)
+
+
+--------------erAck-patch-parts
+Content-Type: text/x-patch; name="0001-Resolves-tdf-89500-catch-ISO-8601-datetime-in-all-lo.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-Resolves-tdf-89500-catch-ISO-8601-datetime-in-all-lo.patch"
+
+diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
+index 5aee40d..f709cfe 100644
+--- a/svl/source/numbers/zforfind.cxx
++++ b/svl/source/numbers/zforfind.cxx
+@@ -2439,16 +2439,35 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
+                     SkipBlanks( rString, nPos );
+                 }
+             }
+-            else if (nStringPos == 5 && nPos == 0 && rString.getLength() == 1 &&
+-                     rString[ 0 ] == 'T' && MayBeIso8601())
++            else if (nPos == 0 && rString.getLength() == 1 && MayBeIso8601())
+             {
+-                // ISO 8601 combined date and time, yyyy-mm-ddThh:mm
+-                ++nPos;
++                if (nStringPos == 5 && rString[0] == 'T')
++                {
++                    // ISO 8601 combined date and time, yyyy-mm-ddThh:mm
++                    ++nPos;
++                }
++                else if (nStringPos == 7 && rString[0] == ':')
++                {
++                    // ISO 8601 combined date and time, the time part; we reach
++                    // here if the locale's separator is not ':' so it couldn't
++                    // be detected above in the time block.
++                    if (nAnzNums >= 5)
++                        eScannedType = NUMBERFORMAT_DATETIME;
++                    ++nPos;
++                }
+             }
+             break;
+-#if NF_RECOGNIZE_ISO8601_TIMEZONES
+         case NUMBERFORMAT_DATETIME:
+-            if (nPos == 0 && rString.getLength() == 1 && nStringPos >= 9 && MayBeIso8601())
++            if (nPos == 0 && rString.getLength() == 1 && MayBeIso8601())
++            {
++                if (nStringPos == 9 && rString[0] == ':')
++                {
++                    // ISO 8601 combined date and time, the time part continued.
++                    ++nPos;
++                }
++            }
++#if NF_RECOGNIZE_ISO8601_TIMEZONES
++            else if (nPos == 0 && rString.getLength() == 1 && nStringPos >= 9 && MayBeIso8601())
+             {
+                 // ISO 8601 timezone offset
+                 switch (rString[ 0 ])
+@@ -2475,8 +2494,8 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
+                     break;
+                 }
+             }
+-            break;
+ #endif
++            break;
+         }
+     }
+ 
+
+--------------erAck-patch-parts--
+
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 7e2519f..e315cfa 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -348,6 +348,7 @@ Patch92: 0001-don-t-strip-font-names-of-apparent-script-suffixes-a.patch
 Patch93: 0001-various-indic-short-cuts.patch
 Patch94: 0001-Resolves-tdf-83461-do-not-override-MatColsRows-if-al.patch
 Patch95: 0001-fdo-87199-sw-fix-root-cause-of-a11y-crash-when-mergi.patch
+Patch96: 0001-Resolves-tdf-89500-catch-ISO-8601-datetime-in-all-lo.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -2288,6 +2289,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 * Fri Feb 06 2015 Eike Rathke <erack at redhat.com> - 1:4.2.8.2-6-UNBUILT
 - Resolves: tdf#83461 do not override MatColsRows if already set
 - Resolves: rhbz#1190657 tdf#87199 Writer crashes when merging table cells
+- Resolves: tdf#89500 catch ISO 8601 datetime in all locales
 
 * Thu Jan 29 2015 Caolán McNamara <caolanm at redhat.com> - 1:4.2.8.2-5
 - Resolves: rhbz#1134841 bn/ml "close without saving" short-cuts


More information about the scm-commits mailing list