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 <misc2...@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;