Bug 57667 - Immediately apply AutoCorrection when added per Spelling and Grammar dialog
Summary: Immediately apply AutoCorrection when added per Spelling and Grammar dialog
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.3.2 release
Hardware: All All
: medium enhancement
Assignee: Quan
URL:
Whiteboard: BSA target:7.2.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks: Spell-Checking-Dialog
  Show dependency treegraph
 
Reported: 2012-11-28 21:49 UTC by John Smith
Modified: 2021-12-07 12:01 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2012-11-28 21:49:45 UTC
Problem description: When using the Spelling and Grammar dialog box to correct an error by using the AutoCorrect button, the control fails to fully execute the function.

Steps to reproduce:
1. In a new document with text entered containing a spelling error, select the Spelling and Grammar button (or F7)from the Standard toolbar.
2. Select a replacement word in the suggestions pane of the dialog box.
3. Select the AutoCorrect button.

Current behavior:The word pair is entered into the Replace table in the AutoCorrect list as it should be. The word is not replaced in the document with the selected word.A Change button has to be selected.

Expected behavior: The word in the document should be replaced by the selected word without further action.

              
Operating System: Windows XP
Comment 1 A (Andy) 2013-04-15 20:11:05 UTC
reproducible with LO 4.0.2.2 (Win7 Home, 64bit)

Currently the result is that you choose AUTOCORRECT in the SPELLING AND GRAMMAR dialogue box and apparently nothing happens unless you choose afterwards CHANGE to correct that word.  
But you will now find that word in the autocorrect list (go to the menu TOOLS -> AUTOCORRECT OPTIONS -> tab REPLACE).
Comment 2 Kumāra 2013-09-23 10:34:20 UTC
I agree that "Always correct" should logically also correct as highlighted.
Comment 3 QA Administrators 2015-04-01 14:41:10 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-04-23 11:34:13 UTC
Reproduced.
Note: "Autocorrect" = "Always correct"

Ubuntu 14.10 64-bit 
Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US
Comment 5 QA Administrators 2016-09-20 09:33:50 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2019-12-03 14:08:22 UTC Comment hidden (obsolete)
Comment 7 sdc.blanco 2021-02-01 00:11:40 UTC
I believe this should be classified as an enhancement request, not a bug report. Asking NeedsUXEval
Comment 8 Heiko Tietze 2021-02-01 11:17:11 UTC
Agree, S&G > AutoCorrect (formerly known as Always Correct, see bug 75923) should immediately be applied to the text.
Comment 9 Heiko Tietze 2021-02-01 11:26:09 UTC
Code pointer:

In cui/source/dialogs/SpellDialog.cxx, m_xAutoCorrPB (the "Add to AutoCorrect" button) calls IMPL_LINK( SpellDialog, ExtClickHdl, weld::Button&, rBtn, void ) while m_xChangePB (the button for "Correct") runs IMPL_LINK_NOARG(SpellDialog, ChangeHdl, weld::Button&, void). So simply adding ChangeHdl(*m_xAutoCorrPB); to the ExtClickHdl could do the trick.
Comment 10 Quan 2021-02-09 05:13:10 UTC
I've submitted a patch here: https://gerrit.libreoffice.org/c/core/+/110618
Comment 11 Commit Notification 2021-02-18 07:11:26 UTC
Quan Nguyen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8a1c2a3353f2542703b6f82a14cd84c336a45991

tdf#57667 Add to autocorrect button should fix the wrong word when clicked

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Stéphane Guillou (stragu) 2021-12-07 12:01:36 UTC
verified as fixed in:

Version: 7.2.0.2 / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded