[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - svl/source

Eike Rathke erack at redhat.com
Sun Oct 1 19:03:23 UTC 2017


 svl/source/numbers/zforfind.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit cdb9610b74d13a3b974c66e7201d782291a7f3b1
Author: Eike Rathke <erack at redhat.com>
Date:   Sat Sep 30 21:14:36 2017 +0200

    Number scanner: accept negative year ISO 8601 input with 'T' time separator
    
    This is valid input: -1999-11-23T12:34:56
    
    Change-Id: I0464b623b76fb55c1d2b848d0db9278e9589a4d8
    (cherry picked from commit c3819630e0205a372899ef67d689619657bbbf33)
    Reviewed-on: https://gerrit.libreoffice.org/42972
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index b900f3856296..a411d08ac06b 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -2553,9 +2553,10 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString,
             }
             else if (nPos == 0 && rString.getLength() == 1 && MayBeIso8601())
             {
-                if (nStringPos == 5 && rString[0] == 'T')
+                if (    (nStringPos == 5 && rString[0] == 'T') ||
+                        (nStringPos == 6 && rString[0] == 'T' && sStrArray[0] == "-"))
                 {
-                    // ISO 8601 combined date and time, yyyy-mm-ddThh:mm
+                    // ISO 8601 combined date and time, yyyy-mm-ddThh:mm or -yyyy-mm-ddThh:mm
                     ++nPos;
                 }
                 else if (nStringPos == 7 && rString[0] == ':')


More information about the Libreoffice-commits mailing list