Bug 150606 - Undo of table in columns adds multiple additional pages + broken layout
Summary: Undo of table in columns adds multiple additional pages + broken layout
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.6.0 target:7.5.5 target:24.2...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2022-08-25 13:43 UTC by Telesto
Modified: 2023-09-14 11:09 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (101.62 KB, application/vnd.oasis.opendocument.text)
2022-08-25 13:43 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-08-25 13:43:31 UTC
Description:
Undo of table in columns adds multiple additional pages

Steps to Reproduce:
1. Open the attached file
2. Scroll to page 8 (Tabella1 in Navigator)
3. Delete the table (delete table button)
4. CTRL+Z

Actual Results:
Multiple additional pages/ distorted table layout

Expected Results:
Same as before undo


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1c1647e6ee252fe68d7406d01043e88f1721590f
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

Still fine in
Version: 7.1.8.0.0+ (x64) / LibreOffice Community
Build ID: a94b58277c7aeaa83ce14347cd0b8f7137969d03
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
Comment 1 Telesto 2022-08-25 13:43:56 UTC
Created attachment 182018 [details]
Example file
Comment 2 Dieter 2022-09-08 16:25:12 UTC
I confirm it with

Version: 7.4.0.3 (x64) / LibreOffice Community
Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Might be document related. Telesto, could you reproduce the problem with some more general steps?
=> NEEDINFO
Comment 3 Telesto 2022-09-08 18:59:46 UTC
Well it seems far easier to do a bibisect and having some commit as reference, compared to blind search for the cause.. 

The source file comes from the bug tracker: attachment 182008 [details]
Comment 4 Maneesh 2022-09-11 05:44:17 UTC Comment hidden (obsolete)
Comment 5 vengatesh 2022-09-11 06:54:46 UTC Comment hidden (obsolete)
Comment 6 raal 2022-09-18 16:25:24 UTC
bibisect-linux-64-6.2 - oldest - bug is not here
bibisect-linux-64-6.2- master - crash when ctrl+z
bibisect-linux-64-6.3 - oldest - crash when ctrl+z

bibisect-linux-64-6.4 oldest  - bug is here
Comment 7 Stéphane Guillou (stragu) 2023-01-18 13:31:39 UTC
Can't reproduce on Ubuntu 20.04:

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.4.2 / LibreOffice Community
Build ID: 85569322deea74ec9134968a29af2df5663baa21
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

But I can reproduce on Windows 10:

Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

Vengatesh, are you sure you were able to see the completely different table and many extra blank pages after undoing on Linux?
To me, it looks like a Windows-only issue.
Comment 8 BogdanB 2023-01-18 15:35:32 UTC
I marked comment 4 and comment 5 as obsolete, and also I marked this as a Windows specific.
Comment 9 raal 2023-01-29 09:30:49 UTC
at this commit ctrl+z stopped working, nothing happens after ctrl+z 203f805ec2622f0dcd6c871a6efc5af848b08e72 is the first bad commit
commit 203f805ec2622f0dcd6c871a6efc5af848b08e72
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Sep 19 15:46:34 2018 -0700

    source 723728cd358693b8f4bc9d913541aa4479f2bd48
https://git.libreoffice.org/core/+/723728cd358693b8f4bc9d913541aa4479f2bd48

at this commit ctrl+z started working again, but with broken layout as described in bug. 94e9a9c925c8b9d2404c61785b28935dfba5d3ec is the first bad commit
commit 94e9a9c925c8b9d2404c61785b28935dfba5d3ec
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Nov 16 03:34:48 2018 -0800

    source 68880a3004623553bf1920ad8a4a4d2be4bca234

https://git.libreoffice.org/core/+/68880a3004623553bf1920ad8a4a4d2be4bca234
Comment 10 Michael Stahl (allotropia) 2023-05-31 14:33:03 UTC
the problem appears to be this code in CalcContent prevents table from going to previous page or column:

                if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() &&
                     ( !pSect || pSect == pFrame->FindSctFrame() ) )
                {
                    static_cast<SwTabFrame*>(pFrame)->m_bLockBackMove = true;
                }
Comment 11 Commit Notification 2023-06-01 18:16:34 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/59987d3c77ec7dbf59fbea9f47cc226f4e8903f9

tdf#150606 sw: layout: leave follow SwTabFrame invalid in columns

It will be available in 7.6.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 12 Michael Stahl (allotropia) 2023-06-01 18:17:02 UTC
fixed on master
Comment 13 Commit Notification 2023-06-23 20:51:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/560b94971b656914d17c9d1befdad2dbd3f1119a

tdf#150606 sw: layout: leave follow SwTabFrame invalid in columns

It will be available in 7.5.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.
Comment 14 Commit Notification 2023-08-08 13:12:25 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#156551 tdf#150606 sw: layout: only invalidate SwTabFrame if it...

It will be available in 24.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 15 Commit Notification 2023-08-14 09:22:38 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/1808306db7bec6cd668b5840eb8a0121ee89991f

tdf#156551 tdf#150606 sw: layout: only invalidate SwTabFrame if it...

It will be available in 7.6.1.

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 16 Commit Notification 2023-08-16 09:13:54 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/0bd916a78dc9e586d78dffdf57e6fa80b955eef6

tdf#156551 tdf#150606 sw: layout: only invalidate SwTabFrame if it...

It will be available in 7.5.6.

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 17 Mumphi 2023-09-08 03:48:09 UTC Comment hidden (spam)
Comment 18 Michael Stahl (allotropia) 2023-09-14 11:09:06 UTC
closing to prevent more spam