Bug 39721 - Moving a section with the up/down arrows of the "Bullets and Numbering" toolbar resurrects deleted text when "Record Changes" and "Show Changes" are enabled
Summary: Moving a section with the up/down arrows of the "Bullets and Numbering" toolb...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: Other All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on: 38745
Blocks: Track-Changes
  Show dependency treegraph
 
Reported: 2011-08-01 08:31 UTC by K.M.
Modified: 2021-02-08 11:34 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Simplified example file to demonstrate the problem (10.96 KB, application/vnd.oasis.opendocument.text)
2020-10-28 08:58 UTC, NISZ LibreOffice Team
Details
The example file in current Writer (30.98 KB, image/png)
2020-10-28 09:05 UTC, NISZ LibreOffice Team
Details
The example file after moving the first paragraphs down (33.64 KB, image/png)
2020-10-28 09:08 UTC, NISZ LibreOffice Team
Details
The example file after moving the first sentences down (11.65 KB, application/vnd.oasis.opendocument.text)
2020-10-28 09:08 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description K.M. 2011-08-01 08:31:29 UTC
Tested with LibreOffice 3.4.2 OOO340m1 (Build:203) on Linux

How to reproduce:

1. create an empty text document in writer
2. disable "Edit->Changes->Record"
3. disable "Edit->Changes->Show"
4. enable "View->Toolbars->Bullets and Numbering"
5. Type a paragraph, e.g. "the quick brown flying fox jumped over the lazy dog"
6. Start a new paragraph hitting enter key
7. Type another paragraph, e.g. "Franz jagt im komplett verwahrlosten Taxi quer durch Bayern"
8. enable "Edit->Changes->Record"
9. enable "Edit->Changes->Show"
10. Move the cursor into the first line, delete some text, e.g. the word "flying " - leave the cursor in that line
11. Use "ctrl-alt-cursor-down" (equivalent to the single down arrow of the Bullets and Numbering toolbar) to move the first paragraph down under the second paragraph
12. Since Record & Show Changes is enabled the first paragraph gets crossed out (as expected)
13. the text is moved down (as expected) but
14. ups, the deleted text is back in this moved paragraph, so I get "the quick brown flying fox jumped over the lazy dog" and need to correct it again....

In step 14 I expected either 

1. the 1st paragraph including the deleted text still marked as deleted text; or

2. the 1st paragraph but the previously deleted text "flying " being completely forgotten - since in terms of the Record Changes logic I guess this is all new text at its new position except for the previously deleted text.

If I "simulate" the "ctrl-alt-cursor-down" function by the sequence of marking the complete 1st paragraph, ctlr-x it and move the cursor down under the last paragraph and ctrl-v it I get the second option of what I expected.

On a side note this seems to be connected to Bug 38745 since I also get that crash when messing with the undo/redo function afterwards.
Comment 1 Björn Michaelsen 2011-12-23 12:27:21 UTC Comment hidden (obsolete)
Comment 2 sasha.libreoffice 2012-01-30 04:12:50 UTC
reproduced in LibO 3.6.0 master on Fedora 64 bit
Comment 3 K.M. 2013-02-05 14:50:45 UTC
Just reproduced in LO Version 3.6.5.2 (Build ID: 5b93205).
Comment 4 Timur 2013-08-28 12:40:09 UTC Comment hidden (obsolete)
Comment 5 Timur 2014-10-13 17:47:06 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2015-10-14 19:57:57 UTC Comment hidden (obsolete)
Comment 7 Timur 2015-10-15 07:03:45 UTC
Same behavior in 5.1+.
Comment 8 QA Administrators 2016-11-08 11:32:07 UTC Comment hidden (obsolete)
Comment 9 K.M. 2016-11-08 12:24:52 UTC
Still the same behavior in LibreOffice 5.2.3.2 on Xubuntu LTR 16.04.1.
Comment 10 QA Administrators 2018-06-05 02:38:41 UTC Comment hidden (obsolete)
Comment 11 K.M. 2018-06-19 15:05:44 UTC Comment hidden (obsolete)
Comment 12 K.M. 2019-02-26 10:04:05 UTC
Still reproducable on LODev daily build:

Version: 6.2.2.0.0+
Build-ID: ba5e640cc4880ef023b5ea501b1b99e0a3ba25bd
CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-2, Time: 2019-02-13_04:26:01
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: CL
Comment 13 László Németh 2020-10-27 18:27:41 UTC
It seems, this ugly bug was solved during the sw_redlinehide development.
Comment 14 NISZ LibreOffice Team 2020-10-28 08:58:31 UTC
Created attachment 166793 [details]
Simplified example file to demonstrate the problem
Comment 15 NISZ LibreOffice Team 2020-10-28 09:05:03 UTC
Created attachment 166794 [details]
The example file in current Writer

This file has two lists of two bulleted paragraphs, separated by an empty one.
One word is deleted from all lines. Moving them will have some funny side effects...

Version: 7.1.0.0.alpha1+ (x64)
Build ID: f27c4ec5c864395f4cdaec32d7e95ff24e4f43c8
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 16 NISZ LibreOffice Team 2020-10-28 09:08:11 UTC
Created attachment 166795 [details]
The example file after moving the first paragraphs down

Moving down the first paragraph in the first bulleted list makes the deleted word accepted (and the empty line appears as changed), while in the second bulleted list it makes the deleted word rejected.
Comment 17 NISZ LibreOffice Team 2020-10-28 09:08:47 UTC
Created attachment 166796 [details]
The example file after moving the first sentences down
Comment 18 NISZ LibreOffice Team 2020-10-28 09:09:28 UTC
Back to NEW.
Comment 19 Commit Notification 2021-01-14 17:19:21 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b5ab4836c03e9428aff6a48843f2a054ceff0f85

tdf#39721 sw change tracking: fix move down

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 20 NISZ LibreOffice Team 2021-02-08 11:34:05 UTC
Verified in
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 44b914b1e2616ca8f70e896e653a46ca93610234
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded