Created attachment 116836 [details] screenshot see my screenshot... it describes the situation when you type a misspelled word which is identified as an error by the spell checking engine and you right click on it to get autocorrect suggestions. in the case the misspelled word is "auematnate" instead of "aumentate" but as you may see the autocorrect suggestions that LibO provides two non matching items like "emanate" and "anatema". if you wanna set the desired "auematnate" --> "aumentate" autocorrect replacement you have to exit the right click menu then go to the toolbar and click "Tools/AutoCorrect Options..." to open the autocorrect replacement table what I propose it to add an "AutoCorrect Option..." item in the right click spell checking menu show in the screenshot, under the "Always Correct to submenu" just below the autocorrect suggestions along with a line separator... I mean something like this: Always correct to > emanate anatema ---------- AutoCorrect Options... this way when there are no satisfying autocorrect suggestion you are already able to open the autocorrect replacement table without going back to the toolbar IMHO it would be a time saver
(In reply to tommy27 from comment #0) > I mean something like this: > > Always correct to > > not desired option #1 > not desired option n > ---------- > AutoCorrect Options... I appreciate the idea. Thanks!
Hey tommy, If the 'Always Correct to' submenu is related to AutoCorrect, then adding an 'AutoCorrect Options...' as the last entry after a separator would be a suitable thing to do. But i seem to be confused here, as i would assume that correcting a mispelt word should be dictionary related and not autocorrect related. On a separate noted, I think changing 'Always Correct to' to 'AutoCorrect to', 'Auto Correct to', or 'Automatically Correct to' would be good, so users looking through the menu would remember seeing that word combination elsewhere.
(In reply to Yousuf (Jay) Philips from comment #2) > Hey tommy, > > If the 'Always Correct to' submenu is related to AutoCorrect, then adding an > 'AutoCorrect Options...' as the last entry after a separator would be a > suitable thing to do. But i seem to be confused here, as i would assume that > correcting a mispelt word should be dictionary related and not autocorrect > related. IMHO there's no confusion... misspelled words are related to autocorrection... correct words are instead related to dictionary... as you may see there's a "Add to dictionary" item just before "Always correct to" this is needed when you wanna add to dictionary a word that the spellchecker underlines with those squiggly red lines just because it doesn't see it in the dictionary. so the workflow is: - right click on word with red squiggly line - hit "add to dictionary" if the word is correct - hit the "always correct to" item if the word is mispelled and accept one of the autocorrect suggestions - my request is to have "autocorrect options" just below the last suggestion in the case none of them is the desired one > On a separate noted, I think changing 'Always Correct to' to 'AutoCorrect > to', 'Auto Correct to', or 'Automatically Correct to' would be good, so > users looking through the menu would remember seeing that word combination > elsewhere. the "Always Correct to" item has been called that way since OOo era and user already know and remember what is supposed to do. so I don't think this is necessary to rename and have another string change to annoy the translators
@Tommy: +1. @Jay: I think itβs fine that misspellings can be corrected by both dictionaries and the AutoCorrect feature, for several reasons.
so this could be an easy hack, right?
(In reply to tommy27 from comment #5) > so this could be an easy hack, right? Likely could be an easy hack but we have to wait for devs to confirm it and i've added 'needsDevEval' for them to look over it. The spellcheck popup menu is defined in http://opengrok.libreoffice.org/xref/core/sw/source/uibase/lingu/olmenu.src and is likely populated at runtime in http://opengrok.libreoffice.org/xref/core/sw/source/uibase/lingu/olmenu.cxx A simple alternative is to have the AutoCorrect options in the first level of the context menu and separate 'Always Correct to' and it into its own section like so. Ignore Ignore All Add to Dictionary Spelling and Grammar... - separator - Always Correct to > AutoCorrect Options... - separator - If this option is favorable, then i believe i can fix it.
@Jay I'd like that solution too, so you can move on fixing it
any news about the feasibility of this hack?
(In reply to tommy27 from comment #8) > any news about the feasibility of this hack? Seems to be harder than i thought, as i was able to get the entry to appear in the context menu, but clicking it wont open the dialog.
Created attachment 118994 [details] my patch
@Samuel, @Maxim: Can you amend my patch to get it to work. Thanks.
Yousuf Philips committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=837c50d3d8390da359c5f07da3fdd87fc60d9158 tdf#92341 Add AutoCorrect entry in spellcheck context menu It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jay, could you take care to communicate the changes to the help etc?
works fine with LibO 5.1.0.0.alpha1+ (x64) Build ID: 8c7ba16ba4bdedb4354f342b20d5a5de8a132b48 TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-09-24_21:53:09 Locale: it-IT (it_IT) thanks to Jay and Samuel, you did a good job!!! probably this enhancement should be shown in: https://wiki.documentfoundation.org/ReleaseNotes/5.1
(In reply to Samuel Mehrbrodt from comment #13) > Jay, could you take care to communicate the changes to the help etc? Thanks Samuel. Dont know enough about the help to know how context menus are handled. @Adolfo: Any idea about this? (In reply to tommy27 from comment #14) > probably this enhancement should be shown in: > https://wiki.documentfoundation.org/ReleaseNotes/5.1 Please take a screenshot and add it. ;D
Created attachment 119031 [details] screenshot for wiki 5.1 release notes here's a screenshot showing an underlined word which has no good autocorrect suggestions from the right click menu in this case the user could click the new "Autocorrect options..." item to load the autocorrect replacement list. you can use this screenshot but I'd prefer an english mother tongue user to write the description for the 5.1 wiki release notes
@Samuel: The problem with RetrieveLabelFromCommand() is that it doesnt bring over the dots at the end of the entry or the accelerator. Also noticed that non-Writer apps also have a similar context menu that should also be fixed, so i'll create a patch for that as well.
good point Jay. let's set this as REOPENED waiting for similar patches to be applied to Impress, Draw and Calc right click menus
Just like the last patch, i was able to get the entry into the context menu, but unable to get the entry to open the dialog. Hope you can fix the rest @Samuel as the code you added the last time didnt work with adding it into editeng/source/editeng/editview.cxx. :D https://gerrit.libreoffice.org/#/c/18887/
Yousuf Philips committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=81f94235b08996f48485959adc1f3a45e65a3c7f tdf#92341 Add AutoCorrect entry in context menu for non-swriter It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a8a812997f654b47cde547cbf3d97684cd06a9d3 tdf#92341 Make Autocorrect entry actually work It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
edited 5.1.0 release notes with screenshot and description here at: https://wiki.documentfoundation.org/ReleaseNotes/5.1#AutoCorrect_context_menu please feel free to edit the text in better english.
(In reply to Yousuf (Jay) Philips from comment #17) > @Samuel: The problem with RetrieveLabelFromCommand() is that it doesnt bring > over the dots at the end of the entry or the accelerator. > Is there still something to be changed? If so, could you prepare a patch for this, Jay?
tested with LibO 5.1.0.0.alpha1+ Build ID: f830600ece806ec365a4839e79afabe183c5e36d TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-10-06_22:49:09 Locale: it-IT (it_IT) I see the dots in Calc, Draw and Impress (AutoCorrect Options...) while I don't see the dots in Writer (AutoCorrect Options)
(In reply to tommy27 from comment #24) > I see the dots in Calc, Draw and Impress (AutoCorrect Options...) > > while I don't see the dots in Writer (AutoCorrect Options) Yes Samuel is looking into it, as i mentioned this in comment 17 that the command to get the string from elsewhere isnt pulling in the accelerator and dots, while in the non-writer one, i wrote the label in the context menu code.
(In reply to Yousuf (Jay) Philips from comment #25) > isnt pulling in the accelerator It shouldn't, as no context menu anywhere has any accelerators.
(In reply to Yousuf (Jay) Philips from comment #17) > @Samuel: The problem with RetrieveLabelFromCommand() is that it doesnt bring > over the dots at the end of the entry The problem is that RetrieveLabelFromCommand takes the "Name" property instead of "Label".
(In reply to Maxim Monastirsky from comment #26) > It shouldn't, as no context menu anywhere has any accelerators. I must be going blind as i see accelerators in all context menus. https://wiki.documentfoundation.org/File:Autocorrect_context_menu.png (In reply to Maxim Monastirsky from comment #27) > (In reply to Yousuf (Jay) Philips from comment #17) > > @Samuel: The problem with RetrieveLabelFromCommand() is that it doesnt bring > > over the dots at the end of the entry > The problem is that RetrieveLabelFromCommand takes the "Name" property > instead of "Label". Would be useful to have a command to retrieve the label so that we dont have to duplicate the string in the context menu and translators dont have to translate it twice.
(In reply to Yousuf (Jay) Philips from comment #28) > I must be going blind as i see accelerators in all context menus. > https://wiki.documentfoundation.org/File:Autocorrect_context_menu.png Ah sorry, I thought you mean like CTRL+something. > (In reply to Maxim Monastirsky from comment #27) > Would be useful to have a command to retrieve the label RetrieveLabelFromCommand is already up to it. We just need to replace the "Name" string inside it to a "Label". Will look into it once my build will finish.
Maxim Monastirsky committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=998090bf54a8afd5fe9cfc3efdd30864c8e689e9 tdf#92341 Hide in grammar menu and fix label It will be available in 5.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Maxim Monastirsky from comment #29) > > (In reply to Maxim Monastirsky from comment #27) > > Would be useful to have a command to retrieve the label > RetrieveLabelFromCommand is already up to it. We just need to replace the > "Name" string inside it to a "Label". Will look into it once my build will > finish. As RetrieveLabelFromCommand was previously used elsewhere, it would be good to make sure that the change doesnt bring in issues for when other devs wanted the old behaviour. It would be useful to also have RetreiveNameFromCommand() for when that is needed.
(In reply to Yousuf (Jay) Philips from comment #31) > As RetrieveLabelFromCommand was previously used elsewhere, It isn't used elsewhere.
(In reply to Maxim Monastirsky from comment #32) > (In reply to Yousuf (Jay) Philips from comment #31) > > As RetrieveLabelFromCommand was previously used elsewhere, > It isn't used elsewhere. @Maxim: Was skimming through some code and noticed that we have xUICommands->getByName() and wondered if RetrieveLabelFromCommand was doing the same thing. http://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/templdlg.cxx#2502
(In reply to Yousuf (Jay) Philips from comment #33) > @Maxim: Was skimming through some code and noticed that we have > xUICommands->getByName() and wondered if RetrieveLabelFromCommand was doing > the same thing. Yes: http://opengrok.libreoffice.org/xref/core/sw/source/uibase/lingu/olmenu.cxx#242