[Libreoffice-commits] core.git: svl/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 21 16:47:06 UTC 2021
svl/source/numbers/zformat.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e430d82ec56f34fb5ae45a50eb12cd03c7e40ba3
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Tue Sep 21 17:09:28 2021 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Tue Sep 21 18:46:32 2021 +0200
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 at redhat.com>
Tested-by: Jenkins
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;
}
More information about the Libreoffice-commits
mailing list