summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-10-02 17:21:59 +0200
committerEike Rathke <erack@redhat.com>2017-10-02 17:36:30 +0200
commit9b14d2ca8f0c11feb991142e1a0da819aa0e5c38 (patch)
tree809ab09f1de7ed3dc9deda97dcc09ac2abdf16a0 /svl
parent21dde7a09e2cfe7b48d2fec1edc7a94fa94af5c3 (diff)
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
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforfind.cxx8
1 files changed, 8 insertions, 0 deletions
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);
}