Hi, I was asked to post my patch from https://bugs.freedesktop.org/show_bug.cgi?id=49605 here:
Problem: having two grammar errors that partly overlap confuses writer, it will show the same error message for both. I think that's because only the first error is considered, as the error's end position is ignored. The attached patch seems to fix this. See the issue for a description of how to reproduce this. Feedback is welcome. Regards Daniel -- http://www.danielnaber.de
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 34fc195..53d9e3d 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -1162,7 +1162,7 @@ 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) + rErrorPosInText + nLen <= rError.nErrorStart + rError.nErrorLength) { rSuggestions = rError.aSuggestions; rErrorIndexInResult = i;
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice