Apache OpenOffice (AOO) Bugzilla – Issue 122015
No context menu suggestions for grammar checkers
Last modified: 2022-10-28 12:54:23 UTC
LanguageTool(1) and LightProof(2) extensions have problems with the latest builds from the build bot but they work without issues on 3.4.1. To test the problem, after installing the extension and restarting AOO type some text with grammar errors like a repeated word. The grammar error will be underlined with a blue wavy line on all versions, but if you right click on it you'll get suggestions only on 3.4.1, not on the 4.0 dev builds. Running the full spell and grammar check (F7) will work, only the context menu have problems and only for grammar errors: a right click over a spell error will show suggestions. As suggested on previous discussion on dev mailing list(3), this problem seems a regression. (1) http://languagetool.org/ (2) http://extensions.openoffice.org/project/lightproof (3) http://markmail.org/message/icqslzkswdvb6cat
The regression is introduced by the fix for bug 119421 with revision 1455480 if( (rError.nErrorStart <= rErrorPosInText) && (rErrorPosInText + nLen < rError.nErrorStart + rError.nErrorLength)) when you right-click on a word with grammar errors, rErrorPosInText is equal to rError.nErrorStart, and nLen is equal to rError.nErrorLength, this makes the second part of the condition evaluate to false: (rErrorPosInText + nLen < rError.nErrorStart + rError.nErrorLength) because rErrorPosInText + nLen is equal to rError.nErrorStart + rError.nErrorLength
Test case: Precondition: user interface is in locale "English (USA)" - Download http://extensions.openoffice.org/project/lightproof it is a zip file - Unzip the downloaded file, inside the folder you'll find several extensions. Install the one named lightproof-en_US-0.1.oxt ("Tools" - "Extension Manager" - button "Add", browse to that file) - Create a new Writer document - Insert dummy text AutoText (type dt and press F3) The grammar checker will underline in blue the following errors: didn't who'd night's he'd - Right click on each every grammar error - Expected behavior: a context menu should pop up, the first menu item should be a message explaining the type of error ("Typographic apostrophe." for the four errors). The second menu item should be the suggestion (the respective error but with the apostrophe replaced). The text messages and the suggestions should match the ones if pressing F7 (or menu "Tools" - "Spelling and Grammar...").
Fixed on trunk with revision 1465509