Bug 157119 - Third part of multi-page floating tables
Summary: Third part of multi-page floating tables
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:24.2.0 target:7.6.3
Keywords:
Depends on:
Blocks: DOCX-Floatingtable
  Show dependency treegraph
 
Reported: 2023-09-06 13:36 UTC by Miklos Vajna
Modified: 2023-11-06 08:04 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Reproducer document (13.16 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-09-20 06:35 UTC, Miklos Vajna
Details
Simplified reproducer (17.88 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-09-22 14:05 UTC, Miklos Vajna
Details
2 tables reproducer for bug 126449 (18.16 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-09-26 06:35 UTC, Miklos Vajna
Details
Second reproducer for bug 126449 (18.99 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-10-02 07:42 UTC, Miklos Vajna
Details
Smaller reproducer for bug 157590 (25.33 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-10-19 06:57 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2023-09-06 13:36:19 UTC
This bug is meant to document the efforts around multi-page floating tables in Writer. Progress so far was documented in bug 155118, but many related problems are still there.
Comment 1 Miklos Vajna 2023-09-07 06:26:10 UTC
https://gerrit.libreoffice.org/c/core/+/156632 is about nested tables, the layout now handles one bugdoc correctly when opening interactively.
Comment 2 Miklos Vajna 2023-09-08 07:41:41 UTC
https://gerrit.libreoffice.org/c/core/+/156691 nested tables are now exported to PDF correctly.
Comment 3 Miklos Vajna 2023-09-11 06:38:55 UTC
https://gerrit.libreoffice.org/c/core/+/156810 fixes nested floating tables vs overlap support
Comment 4 Miklos Vajna 2023-09-12 06:43:07 UTC
https://gerrit.libreoffice.org/c/core/+/156833 adds DOCX export for nested floating tables
Comment 5 Miklos Vajna 2023-09-13 06:21:32 UTC
https://gerrit.libreoffice.org/c/core/+/156865 adds DOCX import for nested floating tables
Comment 6 Miklos Vajna 2023-09-14 06:31:53 UTC
https://gerrit.libreoffice.org/c/core/+/156904 adds DOCX export for nested floating tables when the inner one is at cell start
Comment 7 Miklos Vajna 2023-09-15 07:14:15 UTC
https://gerrit.libreoffice.org/c/core/+/156937 adds DOCX import for nested floating tables when the inner one is at cell start
Comment 8 Miklos Vajna 2023-09-18 13:22:06 UTC
https://gerrit.libreoffice.org/c/core/+/157006 finishes bug 55160, 2 floattables starting at cell start
Comment 9 Miklos Vajna 2023-09-19 06:34:35 UTC
https://gerrit.libreoffice.org/c/core/+/157039 fixes bug 157005, unexpected overlapping text while editing
Comment 10 Miklos Vajna 2023-09-20 06:35:38 UTC
Created attachment 189710 [details]
Reproducer document

Next problem, steps to reproduce:

1) Go to page 2, at the start of "He tried"

2) Press enter 4 times, so far so good.

3) Press enter for the 5th time.

Actual result: the table split chain is pages 1 -> 4 -> 2.

Expected result: the table fits 2 pages: pages 2 -> 3.

Note that the same 2 -> 3 layout is generated by Word by inserting empty paragraphs at the start of the document.
Comment 11 Miklos Vajna 2023-09-21 06:40:45 UTC
https://gerrit.libreoffice.org/c/core/+/157133 is meant to fix the problem from comment 10.
Comment 12 Commit Notification 2023-09-21 07:46:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#157119 sw floattable: fix moving master of split fly to next page

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 13 Miklos Vajna 2023-09-22 14:05:26 UTC
Created attachment 189761 [details]
Simplified reproducer

Simplified reproducer for bug 157263, which shows that this happens even without floating tables, though I made the problem more visible.
Comment 14 Miklos Vajna 2023-09-25 06:41:02 UTC
https://gerrit.libreoffice.org/c/core/+/157233 is meant to fix 157263 (missing join for multi-page table)
Comment 15 Miklos Vajna 2023-09-26 06:35:11 UTC
Created attachment 189821 [details]
2 tables reproducer for bug 126449

I've started on bug 126449, which is some complicated DOC file. Here is a stripped down DOCX version that just has an inline outer table and a floating inner table. Even this is broken, but this is easier to debug, I hope.
Comment 16 Commit Notification 2023-09-26 15:38:26 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/93a646ddf74ada0bc96107310d50c3da3a4343bc

tdf#157119 sw floattable: fix moving master of split fly to next page

It will be available in 7.6.3.

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 Miklos Vajna 2023-09-27 06:45:54 UTC
https://gerrit.libreoffice.org/c/core/+/157306 does a first fix for bug 126449, floating table on pages 2 & 3 inside an inline table on pages 1 & 2 & 3 are now laid out OK.
Comment 18 Miklos Vajna 2023-09-28 07:04:29 UTC
https://gerrit.libreoffice.org/c/core/+/157347 fixes some warnings on file load, so the remaining warnings are more useful. Still towards fixing bug 126449.
Comment 19 Miklos Vajna 2023-09-29 07:02:04 UTC
https://gerrit.libreoffice.org/c/core/+/157393 is fix 2 for bug 126449, still needs more work.
Comment 20 Miklos Vajna 2023-10-02 07:42:16 UTC
Created attachment 189940 [details]
Second reproducer for bug 126449

The next problem with this bugdoc is that now we have an outer inline table, a middle inline table and an inner floating table. The floating table should be on pages 2 -> 3 -> 4, but for some reason the fly frame of page 4 is still on page 3, leading to overlapping text.
Comment 21 Miklos Vajna 2023-10-03 06:29:41 UTC
https://gerrit.libreoffice.org/c/core/+/157507 the DOCX version of the bug 126449 document now looks OK, DOC needs more work.
Comment 22 Miklos Vajna 2023-10-04 06:30:37 UTC
https://gerrit.libreoffice.org/c/core/+/157550 is the DOC-specific fix for bug 126449, I think I'm done there.
Comment 23 Miklos Vajna 2023-10-05 07:11:55 UTC
https://gerrit.libreoffice.org/c/core/+/157577 fixes fdo56210-3.docx from crashtesting.
Comment 24 Miklos Vajna 2023-10-09 06:37:06 UTC
https://gerrit.libreoffice.org/c/core/+/157691 fixes fdo45193-1.docx from crashtesting, needed to fix bug 157571
Comment 25 Miklos Vajna 2023-10-10 07:41:38 UTC
https://gerrit.libreoffice.org/c/core/+/157743 fixes bug 157571, regression in table render code, from floating table work.
Comment 26 Miklos Vajna 2023-10-11 06:52:38 UTC
https://gerrit.libreoffice.org/c/core/+/157803 fixes ooo91654-1.doc from crashtesting, regression from this work.
Comment 27 Miklos Vajna 2023-10-12 06:35:49 UTC
https://gerrit.libreoffice.org/c/core/+/157855 starts adding doc model + uno api support for the Word allowTextAfterFloatingTableBreak compat flag to wrap on all pages, not just the last one.
Comment 28 Miklos Vajna 2023-10-13 09:05:48 UTC
https://gerrit.libreoffice.org/c/core/+/157902 adds layout for "wrap on all pages", no DOCX import/export yet.
Comment 29 Miklos Vajna 2023-10-16 07:45:38 UTC
https://gerrit.libreoffice.org/c/core/+/158013 adds DOCX filter for "wrap on all pages".
Comment 30 Miklos Vajna 2023-10-17 06:28:47 UTC
https://gerrit.libreoffice.org/c/core/+/158069 adds a missing test before doing changes for bug 157573
Comment 31 Miklos Vajna 2023-10-18 06:53:08 UTC
https://gerrit.libreoffice.org/c/core/+/158103 fixes bug 157573
Comment 32 Miklos Vajna 2023-10-19 06:57:41 UTC
Created attachment 190290 [details]
Smaller reproducer for bug 157590

The original document for bug 157590 is a monster, this one is smaller and still triggers the bug.
Comment 33 Miklos Vajna 2023-10-20 06:57:51 UTC
https://gerrit.libreoffice.org/c/core/+/158228 finishes bug 157590, the rowspan + nested floating table case.
Comment 34 Miklos Vajna 2023-10-24 07:07:39 UTC
https://gerrit.libreoffice.org/c/core/+/158372 fixes bug 155040, unexpected overlapping text in RTF (regression)
Comment 35 Miklos Vajna 2023-10-25 07:37:05 UTC
https://gerrit.libreoffice.org/c/core/+/158413 fixes bug 155682, layout loop due to floating table overlapping with body text in an unexpected way.
Comment 36 Miklos Vajna 2023-10-26 06:33:01 UTC
https://gerrit.libreoffice.org/c/core/+/158414 is a small late fix for bug 157590, originally fixed last week.
Comment 37 Miklos Vajna 2023-10-27 06:18:37 UTC
https://gerrit.libreoffice.org/c/core/+/158520 fixes the layout loop reported in bug 99822
Comment 38 Miklos Vajna 2023-11-06 08:04:26 UTC
Let's continue in bug 158081.