diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-05-20 23:51:08 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2018-01-17 16:50:03 +0100 |
commit | 315ca98841f5812bb8fbde8b315a0f55025f311d (patch) | |
tree | 9564a41c01a4ea1b3c3a99219f625cc9138bbd22 | |
parent | edfac327f69ae50d73dcaaffcbde5152e16e6e89 (diff) |
Lightproof: do not return invalid nBehindEndOfSentencePosition
For a paragraph with a space at the end, this assertion is triggered:
linguistic/source/gciterator.cxx:162: lcl_SkipWhiteSpaces: illegal
arguments
Cause is the loop in doProofReading that gets the last character of the
paragraph and increments nStartOfNextSentencePosition even if it's
already at end of the text.
(regression from 080424980483bcc29a3556cf1a681c45cd5c50fc in
LibreOffice, and regression from 3c86dfa381ff4243d279ff488133426af3ffaaa8
in Lightproof)
(original LibreOffice commit in libreoffice/dictionaries
submodule: commit 8952e8055690417e60d75e4e4adf3c85a1029e7c)
-rw-r--r-- | Lightproof.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lightproof.py b/Lightproof.py index 8fc61cd..47a265f 100644 --- a/Lightproof.py +++ b/Lightproof.py @@ -123,7 +123,7 @@ class Lightproof( unohelper.Base, XProofreader, XServiceInfo, XServiceName, XSer if 'PYUNO_LOGLEVEL' in os.environ: print(traceback.format_exc()) - l = rText[nSuggestedSentenceEndPos:nSuggestedSentenceEndPos+1] + l = rText[aRes.nStartOfNextSentencePosition:aRes.nStartOfNextSentencePosition+1] while l == " ": aRes.nStartOfNextSentencePosition = aRes.nStartOfNextSentencePosition + 1 l = rText[aRes.nStartOfNextSentencePosition:aRes.nStartOfNextSentencePosition+1] |