Description: After a "Replace All" command in which the replacement string is empty, "Undo" does not correctly restore the previous state. In some cases (as in the steps to reproduce here), "Undo" does nothing at all. In others, I've seen it change some formatting but still not restore the previous state. Steps to Reproduce: 1. Create a new Writer document. 2. Type in the single character "x". 3. Go to "Edit" -> "Find and Replace". 4. In "Find", type "x". Leave "Replace" empty. 5. Click "Replace All" and then close the dialog box. 6. Click "Undo" on the toolbar. Actual Results: "Undo" does nothing. Expected Results: "Undo" brings back the "x" that was removed by "Replace All". Reproducible: Always User Profile Reset: Yes Additional Info: Bug reproduced in: - libreoffice-6.4.6.2-1.fc32.x86_64 (Fedora 32) - libreoffice7.0-7.0.1.2-2.x86_64 downloaded from the home page today - Nightly build master~2020-09-07_09.02.58_LibreOfficeDev_7.1.0.0.alpha0_Linux_x86-64_rpm.tar.gz Bug does not occur in: - Apache_OpenOffice_4.1.7_Linux_x86-64_install-rpm_en-US.tar.gz
*** Bug 136580 has been marked as a duplicate of this bug. ***
Version: 7.1.0.0.alpha0+ (x64) Build ID: e8b8e7be0b2ad693224cd94062a55610eb69df7e CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL
Bibisected using bibisect-win64-7.1 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=e1629c210ad78310e3d48c0756723134a27b89df author: Michael Stahl <Michael.Stahl@cib.de> committer: Michael Stahl <Michael.Stahl@cib.de> summary: tdf#131912 sw: fix spell check correct deleting flys Adding CC: Michael Stahl
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d3eca4177a78c3db17b4699ea6e071e52488c46f tdf#136577 sw: fix Undo of Replace with nothing It will be available in 7.1.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.
fixed on master
Thanks Michael! I felt bad for you with your sequence of commits, each of which caused a regression that had to be fixed by the next one, which doesn't surprise me with this staggeringly complex codebase. I'm glad this fix was so simple; hopefully it will be the last of this particular sequence. :) I imagine you've already tested the code, but FWIW, I'll test the nightly build with the fix when it comes out.
I should add, thanks to everyone who helped triage the issue too.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/ba5584a3ce86c2db52e2e4a4b91254741b2616ec tdf#136577 sw: fix Undo of Replace with nothing It will be available in 7.0.3. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c064766901722082df0d759c95434c1460fcdba5 tdf#136577: sw: Add UItest It will be available in 7.1.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.
Verified in Version: 7.1.0.0.alpha0+ Build ID: e897fdc46b07f211c4c96de103cfa494b645035a CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded @Michael Stahl, thanks for fixing this issue!!
I verified the fix too in master~2020-10-19_17.49.49_LibreOfficeDev_7.1.0.0.alpha0_Linux_x86-64_rpm.tar.gz .