You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/03/12 11:57:41 UTC

svn commit: r1455480 - /openoffice/trunk/main/sw/source/core/edit/edlingu.cxx

Author: hdu
Date: Tue Mar 12 10:57:41 2013
New Revision: 1455480

URL: http://svn.apache.org/r1455480
Log:
#i119421# fix Writer confusion caused by overlapping grammar errors

Patch by: Daniel Naber <mi...@danielnaber.de>
Review by: Herbert Duerr

Modified:
    openoffice/trunk/main/sw/source/core/edit/edlingu.cxx

Modified: openoffice/trunk/main/sw/source/core/edit/edlingu.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/edit/edlingu.cxx?rev=1455480&r1=1455479&r2=1455480&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/edit/edlingu.cxx (original)
+++ openoffice/trunk/main/sw/source/core/edit/edlingu.cxx Tue Mar 12 10:57:41 2013
@@ -1180,8 +1180,8 @@ bool SwEditShell::GetGrammarCorrection( 
                 {
                     // return suggestions for first error that includes the given error position
                     const linguistic2::SingleProofreadingError &rError = rResult.aErrors[i];
-                    if (rError.nErrorStart <= rErrorPosInText && 
-                        rErrorPosInText < rError.nErrorStart + rError.nErrorLength)
+                    if( (rError.nErrorStart <= rErrorPosInText) &&
+                        (rErrorPosInText + nLen < rError.nErrorStart + rError.nErrorLength))
                     {
                         rSuggestions = rError.aSuggestions;
                         rErrorIndexInResult = i;