| commit | c2d838598add1daff8c7429432715a8dd78231f0 | [log] |
|---|---|---|
| author | Eike Rathke <erack@redhat.com> | Mon Sep 13 11:42:39 2021 +0200 |
| committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | Mon Sep 13 15:14:54 2021 +0200 |
| tree | 2d6717c477f5da23bf2a1911da66a3519ec51dbc | |
| parent | 3d190edd71ac8f5a78b683ab82e5fa23e198afbb [diff] |
Resolves: tdf#116184 Check that there is no trailing number behind a match ... without being separated by a blank so the match is rejected if it doesn't possibly form a date+time input and input can be accepted as decimal fraction. Change-Id: Iabd1d216366ecb8454c59822ce58f112bfa6091e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122024 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit eb0b4ab2d3b86d77ee0edb652d4486343e5b3b1f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122054 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index 121b9bd..9d3c3ba 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx
@@ -1487,8 +1487,9 @@ bool ImpSvNumberInputScan::IsAcceptedDatePattern( sal_uInt16 nStartPatternAt ) if (!IsNum[nCheck]) { // Trailing (or separating if time follows) blanks are ok. SkipBlanks( sStrArray[nCheck], nPos); if (nPos == sStrArray[nCheck].getLength()) // No blank and a following number is not. const bool bBlanks = SkipBlanks( sStrArray[nCheck], nPos); if (nPos == sStrArray[nCheck].getLength() && (bBlanks || !IsNum[nNext])) { nAcceptedDatePattern = nPattern; return true;