Bug 152971

Summary: Table row stays visible after redo of deletion (track changes enabled)
Product: LibreOffice Reporter: Telesto <telesto>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: kelemeng, nemeth, stephane.guillou
Priority: medium Keywords: bibisected, bisected, regression
Version: 7.3.7.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=152964
https://bugs.documentfoundation.org/show_bug.cgi?id=148228
Whiteboard:
Crash report or crash signature: Regression By: László Németh
Bug Depends on:    
Bug Blocks: 105948, 143002    
Attachments: example

Description Telesto 2023-01-10 21:07:15 UTC
Description:
Table row stays visible after redo of deletion (track changes enabled)

Steps to Reproduce:
1. Open the attached file
2. Put cursor in the bottom row of the table
3. Press delete table row button (2x)
4. CTRL+Z (2x)
5. CTRL+Y (2)

Actual Results:
Still a table row visible

Expected Results:
No table row visible


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 12e8d57e791bb1befc0716d4d02af7d1d1ccb4ae
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Telesto 2023-01-10 21:07:29 UTC
Created attachment 184568 [details]
example
Comment 2 Telesto 2023-01-10 21:09:11 UTC
This might be gone when fixing bug 152964
Comment 3 Telesto 2023-01-10 22:46:45 UTC
For an assert 

1. Open the attached file
2. Put cursor in the bottom row of the table
3. Press delete table row button (2x)
4. CTRL+Z (2x)
5. CTRL+Y (2)
6. Press delete table
7. CTRL-Z
8. CTRL-Y

    frame #4: 0x00000001746b237c libswlo.dylib`sw::UpdateFramesForAddDeleteRedline(rDoc=0x000000010dcab450, rPam=0x000000010dcec460) at DocumentRedlineManager.cxx:209:17
   206 	            if (frames.empty())
   207 	            {
   208 	                auto const& layouts(rDoc.GetAllLayouts());
-> 209 	                assert(std::none_of(layouts.begin(), layouts.end(),
   210 	                    [](SwRootFrame const*const pLayout) { return pLayout->IsHideRedlines(); }));
   211 	                (void) layouts;
   212 	                break;
Comment 4 Stéphane Guillou (stragu) 2023-01-11 08:40:16 UTC
Reproduced:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5b3fd1af1247d4096451e5a768c3438fbccec2b2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Also in:

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.4.3.2 / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Regression after 7.2, although behaviour back then was differently buggy: deleting a row needed two presses of the button.

Not reproduced in:

Version: 7.2.7.2 / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 5 Gabor Kelemen (allotropia) 2023-02-14 09:14:38 UTC
Current behavior seems to have started in 7.3 with:

https://git.libreoffice.org/core/+/8baae1fe3de398f1e6a01d1941f78e4088c0a697

author	László Németh <nemeth@numbertext.org>	Mon Mar 28 11:35:35 2022 +0200
committer	Xisco Fauli <xiscofauli@libreoffice.org>	Mon Mar 28 20:53:15 2022 +0200

tdf#148228 sw: fix Undo of tracked table deletion in Hide Changes mode

Before this the undo did not even restore the table, so it was even worse :).
This is side effect from starting to change track table structure changes.