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;
Context
- [PATCH] confusion with overlapping grammar errors · Daniel Naber
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.