[Libreoffice-commits] dictionaries.git: en/Lightproof.py

Michael Stahl mstahl at redhat.com
Fri May 22 01:56:48 PDT 2015


 en/Lightproof.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8952e8055690417e60d75e4e4adf3c85a1029e7c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed May 20 23:51:08 2015 +0200

    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)
    
    Change-Id: I58bd10d168f75f9d365cb33c0ade770750ff57ef
    Reviewed-on: https://gerrit.libreoffice.org/15834
    Reviewed-by: László Németh <nemeth at numbertext.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/en/Lightproof.py b/en/Lightproof.py
index e7cde2f..3003810 100644
--- a/en/Lightproof.py
+++ b/en/Lightproof.py
@@ -121,7 +121,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]


More information about the Libreoffice-commits mailing list