From 080424980483bcc29a3556cf1a681c45cd5c50fc Mon Sep 17 00:00:00 2001 From: Olivier R Date: Fri, 22 Aug 2014 15:55:06 +0200 Subject: Lightproof: restore paragraph based proofreading Instead of the sentences suggested by the incomplete sentence boundary detection of LibreOffice (enabled in version 4), Lightproof works on full paragraph text again, allowing more precise analysis of the text. See http://nabble.documentfoundation.org/Grammar-checker-Undocumented-change-in-the-API-for-LO-4-td4030639.html Change-Id: Ifc967e5b3f27da5b0edeebdb73b8f0b97c938280 --- en/Lightproof.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'en/Lightproof.py') diff --git a/en/Lightproof.py b/en/Lightproof.py index e2974fd..e7cde2f 100644 --- a/en/Lightproof.py +++ b/en/Lightproof.py @@ -77,6 +77,11 @@ class Lightproof( unohelper.Base, XProofreader, XServiceInfo, XServiceName, XSer aRes.aProperties = () aRes.xProofreader = self aRes.aErrors = () + # PATCH FOR LO 4 + # Fix for http://nabble.documentfoundation.org/Grammar-checker-Undocumented-change-in-the-API-for-LO-4-td4030639.html + if nStartOfSentencePos != 0: + return aRes + aRes.nStartOfNextSentencePosition = len(rText) if len(rProperties) > 0 and rProperties[0].Name == "Update": try: import lightproof_compile_en -- cgit