summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-09-30 21:14:36 +0200
committerEike Rathke <erack@redhat.com>2017-09-30 21:15:14 +0200
commitc3819630e0205a372899ef67d689619657bbbf33 (patch)
tree2ab59c1203f8f30e6a9c135be729c281d98fc8fe /svl
parent79c28873d6e1175c4b33352dd5c1dbba81d2c3ee (diff)
Number scanner: accept negative year ISO 8601 input with 'T' time separator
This is valid input: -1999-11-23T12:34:56 Change-Id: I0464b623b76fb55c1d2b848d0db9278e9589a4d8
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforfind.cxx5
1 files changed, 3 insertions, 2 deletions
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] == ':')