From 9b14d2ca8f0c11feb991142e1a0da819aa0e5c38 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 2 Oct 2017 17:21:59 +0200 Subject: Number scanner: accept fractional seconds in ISO 8601 also for ',' comma ... if comma is the group separator (or some other separator). Strictly only if 'T' separator was encountered. Change-Id: I4df55235a6a416f0719752dfcde659d846ac208e --- svl/source/numbers/zforfind.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'svl') diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 14a027efa64a..c051dd5d9053 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -2353,6 +2353,14 @@ bool ImpSvNumberInputScan::ScanMidString( const OUString& rString, return MatchedReturn(); } nDecPos = 2; // . in mid string + + // If this is exactly an ISO 8601 fractional seconds separator, bail + // out early to not get confused by later checks for group separator or + // other. + if (bIso8601Tsep && nPos == rString.getLength() && + eScannedType == css::util::NumberFormat::DATETIME && (rString == "." || rString == ",")) + return true; + SkipBlanks(rString, nPos); } -- cgit