Created attachment 169286 [details] Writer file demonstrating an UNDO bug Version: 7.0.4.2 (x64) Build ID: dcf040e67528d9187c66b2379df5ea4407429775 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: en-GB (en_GB); UI: en-GB Calc: threaded This worked in previous versions, so presumably a very recent regression. 1. Open the attached Writer file. It consists of a series of short paragraphs. 2. Ensure the cursor is at the start, and open Find and replace. Tick "Regular expressions", put $ in the Find box and a space in the Replace box. 3. Press "Find Next", then keep pressing "Replace" until all sentences are separated by a space and in a single paragraph. 3. Put cursor focus back on document page (or close F&R dialog). Press Ctrl + Z (UNDO) and repeat … EXPECTED RESULT: After each undo the sentence should appear as a separate paragraph. ACTUAL RESULT: The paragraph breaks are lost!
Confirm in Version: 7.0.4.2 Build ID: dcf040e67528d9187c66b2379df5ea4407429775 CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded The undo steps are lost.
In my reaserch this is the first bad version Version: 6.4.6.2 Build ID: 0ce51a4fd21bff07a5c061082cc82c5ed232f115 CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3; Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US Calc: threaded --- here is the change causing the bug In my reaserch this is the last good version Version: 6.4.5.2 Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6 CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3; Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US Calc: threaded
Bisected it in win64-6.4 1263e46cce67d5a3e00360c11fec4dbe1cf87bff is the first bad commit commit 1263e46cce67d5a3e00360c11fec4dbe1cf87bff Author: Norbert Thiebaud <nthiebaud@gmail.com> Date: Sun Jun 14 13:07:41 2020 -0700 source d6b0e84b236b78f4b21bd16e46dda3fa0876096d source d6b0e84b236b78f4b21bd16e46dda3fa0876096d https://git.libreoffice.org/core/+/d6b0e84b236b78f4b21bd16e46dda3fa0876096d commit d6b0e84b236b78f4b21bd16e46dda3fa0876096d [log] author Michael Stahl <Michael.Stahl@cib.de> Fri Jun 12 14:17:20 2020 +0200 committer Caolán McNamara <caolanm@redhat.com> Sun Jun 14 21:56:25 2020 +0200 tree 58f1f6c91777fff8c10df2f0d9b24d327c661c74 parent 2c2820b98c62e8de0806fd79c34b5fcf37f00c7e [diff] Adding Cc: to Michael Stahl
Bisected to: tdf#131912 sw: fix spell check correct deleting flys * SwEditShell::ApplyChangedSentence() should not call DeleteAndJoin() + InsertString() but ReplaceRange() * ReplaceRange() and SwUndoReplace need to set a new flag DelContentType::Replace to tell SwUndoSaveContent::DelContentIndex() not to delete flys but instead record the previous anchor positions * SwUndoReplace::UndoImpl() should also not call DeleteAndJoin() + InsertString(); instead call ReplaceRange() for the start node and then DeleteAndJoin() for any regex "\n" that were inserted (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5) Change-Id: I485d79510ae233213cb4b208533871934c5e5ec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96201 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit e1629c210ad78310e3d48c0756723134a27b89df) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96204 Reviewed-by: Caolán McNamara <caolanm@redhat.com> https://git.libreoffice.org/core/+/d6b0e84b236b78f4b21bd16e46dda3fa0876096d
(In reply to pavlog from comment #3) > Bisected it in win64-6.4 > > 1263e46cce67d5a3e00360c11fec4dbe1cf87bff is the first bad commit > commit 1263e46cce67d5a3e00360c11fec4dbe1cf87bff > Author: Norbert Thiebaud <nthiebaud@gmail.com> > Date: Sun Jun 14 13:07:41 2020 -0700 > > source d6b0e84b236b78f4b21bd16e46dda3fa0876096d > > source d6b0e84b236b78f4b21bd16e46dda3fa0876096d > > https://git.libreoffice.org/core/+/d6b0e84b236b78f4b21bd16e46dda3fa0876096d > > commit d6b0e84b236b78f4b21bd16e46dda3fa0876096d [log] > author Michael Stahl <Michael.Stahl@cib.de> Fri Jun 12 14:17:20 2020 +0200 > committer Caolán McNamara <caolanm@redhat.com> Sun Jun 14 21:56:25 2020 +0200 > tree 58f1f6c91777fff8c10df2f0d9b24d327c661c74 > parent 2c2820b98c62e8de0806fd79c34b5fcf37f00c7e [diff] > > Adding Cc: to Michael Stahl
*** Bug 146274 has been marked as a duplicate of this bug. ***
*** Bug 146796 has been marked as a duplicate of this bug. ***
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/45613274794636ba98d0e978fe872511297d275d tdf#140007 sw: fix SwUndoReplace It will be available in 7.4.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, just before branchoff...
> fixed on master, just before branchoff... It seems the commit is just after the branchoff.
(In reply to Roland Kurmann from comment #10) > > fixed on master, just before branchoff... > > It seems the commit is just after the branchoff. you're right, it's before the branchoff only in time, not in the git log ... fortunately Xisco already uploaded it to gerrit for libreoffice-7-4
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/ceb01278d8593ab4d2562f934af4fb196342bdf8 tdf#140007 sw: fix SwUndoReplace It will be available in 7.4.0.0.beta2. 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.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/7df50ecd9dea623058dc7bf9095fd13d9bb49860 tdf#140007 sw: fix SwUndoReplace It will be available in 7.3.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.
*** Bug 149793 has been marked as a duplicate of this bug. ***
Verified in Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 4e2ce2a460458f17ee4360c45a2da2fc4b4d753e CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: en-US (hu_HU); UI: en-US Calc: threaded Undo restores paragraph markers correctly.