Issue 119421 - [PATCH] Writer confused by overlapping grammar errors
[PATCH] Writer confused by overlapping grammar errors
Status: RESOLVED FIXED
Product: lingucomponent
Classification: Code
Component: other
OOo 3.4 Beta
All All
: P3 normal (vote)
: AOO 4.0
Assigned To: AOO issues mailing list
:
Depends on:
Blocks: 122015
  Show dependency treegraph
 
Reported: 2012-05-26 09:22 UTC by misc2006
Modified: 2013-04-07 23:28 UTC (History)
4 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
fix for the problem - I agree to publish this under the Apache License 2.0 or later (745 bytes, patch)
2012-05-26 09:22 UTC, misc2006
no flags Details | Diff
capture.png (296.23 KB, image/png)
2012-06-14 09:39 UTC, liuping
no flags Details
Bug doc (45.88 KB, application/vnd.oasis.opendocument.text)
2013-04-07 23:19 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description misc2006 2012-05-26 09:22:14 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)
Comment 1 liuping 2012-06-14 09:37:53 UTC
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
Comment 2 liuping 2012-06-14 09:39:06 UTC
Created attachment 78324 [details]
capture.png
Comment 3 misc2006 2012-06-14 13:55:09 UTC
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?
Comment 4 hdu@apache.org 2012-06-22 13:40:06 UTC
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?
Comment 5 Rob Weir 2013-03-11 15:02:52 UTC
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
Comment 6 misc2006 2013-03-11 17:45:00 UTC
@Rob: this patch is still applicable to AOO 4.0, I think.
Comment 7 SVN Robot 2013-03-12 10:57:41 UTC
"hdu" committed SVN revision 1455480 into trunk:
#i119421# fix Writer confusion caused by overlapping grammar errors
Comment 8 hdu@apache.org 2013-03-12 10:58:47 UTC
Thanks Daniel! I applied this for the next target AOO4.0.
Comment 9 Ariel Constenla-Haile 2013-04-07 17:37:45 UTC
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.
Comment 10 Ariel Constenla-Haile 2013-04-07 23:19:44 UTC
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.
Comment 11 SVN Robot 2013-04-07 23:25:58 UTC
"arielch" committed SVN revision 1465509 into trunk:
i119421 - Use the right comparison operator
Comment 12 Ariel Constenla-Haile 2013-04-07 23:28:32 UTC
Fixed on trunk.

When verifying, please test that there is no regression, with the steps in bug 122015 comment 2