diff options
author | Eike Rathke <erack@redhat.com> | 2021-09-21 17:09:28 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-09-21 18:46:32 +0200 |
commit | e430d82ec56f34fb5ae45a50eb12cd03c7e40ba3 (patch) | |
tree | 9bcdf1e05333770ad082fd9b840cd864899f198f /svl | |
parent | 915d3eebc1dc4f18d7a1992db801ee8313ee46c0 (diff) |
SvNumberformat: preserve error position if already set
ImpSvNumberformatScan::ScanType() may already return an error
position in which case FinalScan() is not executed but
nResultStringsCnt is set only there and otherwise 0, so after
ScanFormat() force a different error position only if both are 0.
This in the dialog positions the error selection correctly instead
of after the first character.
Change-Id: Icb87b212fe8465da8f885514ffa3a3ecc7cd69a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122399
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 22a377a6cc69..0f618e75ca02 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1112,7 +1112,7 @@ SvNumberformat::SvNumberformat(OUString& rString, } sal_Int32 nStrPos = pSc->ScanFormat( sStr); sal_uInt16 nCnt = pSc->GetResultStringsCnt(); - if (nCnt == 0) // error + if (nCnt == 0 && nStrPos == 0) // error { nStrPos = 1; } |