Bug 77559 - Writer: Undo on a section delete returns the additional duplicated text
Summary: Writer: Undo on a section delete returns the additional duplicated text
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2014-04-17 07:48 UTC by sworddragon2
Modified: 2019-12-07 16:23 UTC (History)
1 user (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 sworddragon2 2014-04-17 07:48:47 UTC
If a section gets deleted but the action is then undone there is often a delay of ~1-2 seconds and after this time the returned text is wrong. Here are the steps to reproduce:

1. Open a new Writer document.
2. Write the 3 lines "Test1", "Test2" and "Test3".
3. Select "Test2".
4. Go to Insert -> Section, enable the checkbox "Hide", insert the condition "hidden==1" without doublequotes and click on "Insert".
5. Delete the section.
6. Press CTRL + Z.
6.1. The second line will now be empty and after a delay the section does appear.
7. Press CTRL + Z.
7.1 Test2 appears now again in the section but this line got duplicated as non-section.
Comment 1 sophie 2014-04-29 13:33:11 UTC
Reproduce using version 4.2.4.1 Ubuntu 14.04 - Set as New - Sophie
Comment 2 Gordo 2015-06-05 17:22:22 UTC
Could not reproduce.

1. New Text Document.
2. Type “test1”, Enter, “test2”, Enter, and “test3”.
3. Select “test2”.
4. Insert → Section, check Hide, type “hidden=1” (without quotes) in With Condition box, and Insert.
Note:
“test2” is hidden and in Navigator, “Section 1” is greyed out.
5. Format → Sections, select “Section 1”, Remove and OK.
Note:
“test2” is no longer hidden and section has been deleted.
6. Undo.
Note:
“test2” is hidden and in Navigator, “Section 1” is greyed out.
7. Undo.
Note:
“test2” is no longer hidden and section has been deleted.
Result:
Document is at state prior to insert section.

When “hidden==1” is used then it is just a regular section and the result is the same.

Windows Vista 64
Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16

Can someone retest on Linux with a more recent version?
Comment 3 sworddragon2 2015-06-05 20:40:15 UTC
I'm still able to reproduce this issue with LibreOffice 4.4.2.2 on Linux.
Comment 4 QA Administrators 2016-09-20 09:45:56 UTC Comment hidden (obsolete)
Comment 5 Timur 2018-03-13 14:59:13 UTC
I reproduced with 6.1+ like this:
1. Open a new Writer document.
2. Write the 4 lines "Test1", "Test2", "Test3", "Test4".
3. Select "Test2".
Go to Insert -> Section, enable the checkbox "Hide", insert the condition "hidden==1" without doublequotes and click on "Insert".
4. Select "Test4".
Go to Insert -> Section and click on "Insert".
5. Put cursor before "Test2" and press Delete to delete text and than again to delete the section.
6. Press CTRL + Z to Undo.
The second line will now be empty.
7. Press CTRL + Z to Undo again.
Test2 appears now again in the section but this line got duplicated as non-section at the end.
Comment 6 QA Administrators 2019-03-15 03:55:19 UTC Comment hidden (obsolete)
Comment 7 Timur 2019-12-07 16:23:32 UTC
One of those happy moments when you retest and find out that some mysterious dev has resolved this, maybe without even intending it. 

No repro LO 6.3.3 and 6.5+.