Apache OpenOffice (AOO) Bugzilla – Issue 119421
[PATCH] Writer confused by overlapping grammar errors
Last modified: 2017-05-20 09:01:31 UTC
Created attachment 77604 [details] fix for the problem - I agree to publish this under the Apache License 2.0 or later Having two errors that partly overlap confuses writer, it will show the same error message for both. That's because only the first error is considered, the end position is ignored. The attached patch seems to fix this. If you want to reproduce: download and install http://www.languagetool.org/download/test/LanguageTool-20120507-snapshot-overlapping-bug-demo.oxt, create a German document with this text: "Die falle schnappte zu." You will see two underlines (looks like one because of the overlap): right click on "falle", then on "schnappte" -> you will get the same error texts and suggestions, although there are two errors. With the patch, the error does not occur anymore. (for reference, this bug also exists in LO at https://bugs.freedesktop.org/show_bug.cgi?id=49605)
no reproduce pls refernce the capture.png the step: download and install http://www.languagetool.org/download/test/LanguageTool-20120507-snapshot-overlapping-bug-demo.oxt, create a German document with this text: "Die falle schnappte zu." You will see two underlines (looks like one because of the overlap): right click on "falle", then on "schnappte" -> get the correct error texts and suggestions
Created attachment 78324 [details] capture.png
For some reason you are seeing spelling errors, not the grammar errors from LT. Did you restart OO after installation of LT? Did you make sure the text language is set to German?
Thanks for the patch! But shouldn't this be a "less-or-equal" in the changed line, else a perfectly matching error would be ignored?
I'm adding this comment to all open issues with Issue Type == PATCH. We have 220 such issues, many of them quite old. I apologize for that. We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0. If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know. On the other hand, if the patch is no longer relevant, please let us know that as well. If you have any general questions or want to discuss this further, please send a note to our dev mailing list: dev@openoffice.apache.org Thanks! -Rob
@Rob: this patch is still applicable to AOO 4.0, I think.
"hdu" committed SVN revision 1455480 into trunk: #i119421# fix Writer confusion caused by overlapping grammar errors
Thanks Daniel! I applied this for the next target AOO4.0.
The patch does not work, it causes regression described in bug 122015 Looks like it wasn't tested with a grammar checker before committing it.
Created attachment 80504 [details] Bug doc Right-clicking in falle should display a grammar context menu, right-clicking in schnappte should display a different grammar context menu. Currently, right-clicking in schnappte display a common context menu, not the grammar context menu.
"arielch" committed SVN revision 1465509 into trunk: i119421 - Use the right comparison operator
Fixed on trunk. When verifying, please test that there is no regression, with the steps in bug 122015 comment 2