Bug 144752 - Misspelled word is not marked this way after undo of suggestion
Summary: Misspelled word is not marked this way after undo of suggestion
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Spell-Checking
  Show dependency treegraph
 
Reported: 2021-09-27 18:17 UTC by Telesto
Modified: 2024-06-06 02:26 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Bibisect log (3.20 KB, text/plain)
2021-09-27 18:57 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-09-27 18:17:53 UTC
Description:
Misspelled word is not marked this way after undo of suggestion

Steps to Reproduce:
1. Open attachment 164442 [details]
2. Right click "nervously" and replace it with Wonderfull  (assuming German Dictionary
3. CTRL+Z
4. Notice "nervously" not being misspelled.. You need to type something to trigger the red underlining

Kind of annoying if you picked the wrong item in the list.. 

Actual Results:
No dirty flag (misspelled) straight away

Expected Results:
Ideally yes


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d5e55d204b71710eb5eb5d2c683dd6698626df3c
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (nl_NL); UI: en-US
Calc: CL

still fine with
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL
Comment 1 Telesto 2021-09-27 18:28:50 UTC
Also in
Version: 7.1.0.0.beta1+ (x64)
Build ID: f9fab4203c1aa0b9a3f27ce2713b6d5addc7df19
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL

not in
7.0
Comment 2 Telesto 2021-09-27 18:57:04 UTC
Created attachment 175299 [details]
Bibisect log

Bisected to:
author	Michael Stahl <Michael.Stahl@cib.de>	2020-08-19 18:55:27 +0200
committer	Michael Stahl <michael.stahl@cib.de>	2020-08-20 13:47:08 +0200
commit ec579354af954867b829e7d08e4d752518c83728 (patch)
tree e2fea1fd4729fedf648f129a0e927674b4235c7a
parent 6274fbe13c8fa556916b5aed695c6921ef6ff84f (diff)
tdf#135721 sw: fix spell check context menu deleting flys
Kind of similar to e1629c210ad78310e3d48c0756723134a27b89df
but the problem is at a higher level: SwTextShell::Execute() with
SID_SPELLCHECK_APPLY_SUGGESTION should not DelLeft() + Insert() but
just Replace().

(regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5)

https://cgit.freedesktop.org/libreoffice/core/commit/?id=ec579354af954867b829e7d08e4d752518c83728
Comment 3 Dieter 2021-10-12 07:15:15 UTC
Tested with

Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Mispelled words are only underlined after right click. So the problem you describe is in line with a more general problem(Automatic Spell Checking is enabled, but doesn't seem to work correct)
Comment 4 Telesto 2022-02-15 09:38:36 UTC
(In reply to Dieter from comment #3)
Is this a conformation? Or..
Comment 5 Dieter 2022-02-15 21:52:58 UTC
Tested again with

Version: 7.3.0.3 (x64) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps to Reproduce:
1. Open attachment 164442 [details]. Document language is German. None of the words is marked as misspelled (for me that is not expected)
2. Right click "nervously" => words are marked as misspelled
3. Replace "vervously" with "wundervoll"
4. CTRL+Z
5. "nervously" not being misspelled. If you click right, is is marked as misspelled again.

Conclusion
Behaviour in step 5 is in line with step 1. So either behaviour in step 1 is the bug (I think so) or it's the expected behaviour.
Comment 6 Jean-Baptiste Faure 2022-05-14 15:29:07 UTC
Reproducible for me with both current master and version 7.3.4.0.0+

Version: 7.3.4.0.0+ / LibreOffice Community
Build ID: f668663d63d5b0f37d4727b54585c3b67ab92162
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu_20.04_x86-64
Calc: threaded

Set status at NEW.

Best regards. JBF
Comment 7 QA Administrators 2024-05-14 03:15:23 UTC Comment hidden (noise, obsolete)
Comment 8 Mike Kaganski 2024-06-05 05:47:58 UTC
The problem here is that the undone/redone content isn't selected. Compare the new Undo behavior, which doesn't select the restored "nervously", with what happens when you e.g. type "foo bar" then three backspaces then Ctrl+Z. In the latter case, the restored "foo" gets selected.

Before the fix to bug 136294, the selection wouldn't be enough to get the underline back. Now it should work.

https://gerrit.libreoffice.org/c/core/+/168423
Comment 9 Commit Notification 2024-06-05 10:40:32 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/31f46cec1406bb39453f5d909da1321980b0e405

tdf#144752: UNDO/REDO: make sure to select the replaced content

It will be available in 24.8.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 10 Commit Notification 2024-06-06 02:26:23 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/258c34bddb0a1da09a3bb0ccccf2bd673be377b1

tdf#144752: UNDO/REDO: make sure to select the replaced content

It will be available in 24.2.5.

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.