[Libreoffice-commits] core.git: svl/source
Eike Rathke
erack at redhat.com
Sat Sep 30 19:15:37 UTC 2017
svl/source/numbers/zforfind.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit c3819630e0205a372899ef67d689619657bbbf33
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
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index e1059936ea41..796f2fe1f5df 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -2544,9 +2544,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