Bug 164828 - table layout: minimum height no longer respected when row splits across page
Summary: table layout: minimum height no longer respected when row splits across page
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.2.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:doc, regression
Depends on:
Blocks: DOC-Tables
  Show dependency treegraph
 
Reported: 2025-01-23 20:16 UTC by Justin L
Modified: 2025-01-28 14:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
fdo60500-1.doc_mso.pdf: how it looks in Word 2019 (158.27 KB, application/pdf)
2025-01-23 20:16 UTC, Justin L
Details
ooo115355-1.doc: first page should be almost empty. 2nd row is atLeast 24.13cm (30.00 KB, application/msword)
2025-01-23 20:20 UTC, Justin L
Details
forum-mso-de-7029.doc: row is exactly 25.2cm (35.00 KB, application/msword)
2025-01-23 20:23 UTC, Justin L
Details
fdo66165-1.doc_mso.pdf: How facture.doc looks in MS Word 2019. (163.96 KB, application/pdf)
2025-01-27 12:37 UTC, Justin L
Details
fdo74652-1.docx_mso.pdf: how 1- Assgnt 1 DM_Julia-Inci-Yasemin looks in Word 2019 (573.12 KB, application/pdf)
2025-01-28 14:57 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-01-23 20:16:54 UTC
Created attachment 198714 [details]
fdo60500-1.doc_mso.pdf: how it looks in Word 2019

A table row was incorrectly allowed to split in order to fill some empty space on the previous page. While the row IS set to be allowed to split across pages, it also has a minimum height, but that isn't being honoured.

Steps to reproduce:
1.) open appendix3.doc (attachment 74435 [details] from bug 60500) - macros can be ignored

Look at the bottom of page 1. The last row should be a tall, 10cm row,
and page 2 should start with the entire row "Dates proposed for the Internship".
Word 2010 indicates that this row is "at least 2.68cm". In Word 2010, only when the row less than "at least 1.11cm", will it move to  page 1. 

This started in 25.2 (backported to 24.8.2) with
commit c1020d1ebb95615b68ffda0adf936f38fb2a06af
Author: Mike Kaganski on Wed Sep 18 13:01:44 2024 +0500
    Related: tdf#152298 Consider bottom margin in remaining space calculation

Found by Collabora's mso-test
Comment 1 Justin L 2025-01-23 20:20:08 UTC
Created attachment 198715 [details]
ooo115355-1.doc: first page should be almost empty. 2nd row is atLeast 24.13cm
Comment 2 Justin L 2025-01-23 20:23:46 UTC
Created attachment 198717 [details]
forum-mso-de-7029.doc: row is exactly 25.2cm

This example is different from the others, but comes from the same commit. The table is only supposed to be on the first page, but after comment 0's commit, it takes up 4 pages.
Comment 3 Mike Kaganski 2025-01-23 20:47:32 UTC
I believe (without debugging) that c1020d1ebb95615b68ffda0adf936f38fb2a06af simply caused the change from commit 6f5024de2e1a5cc533527e45b33d9a415467c48d to work as expected (for comments 0 and 1). And I remember the discussion, that Word does unreasonable things here; and when deciding how to fix that layout loop, the decision was to do a saner thing.
Comment 4 Justin L 2025-01-27 12:37:24 UTC
Created attachment 198782 [details]
fdo66165-1.doc_mso.pdf: How facture.doc looks in MS Word 2019.

Another example is facture.doc (attachment 81420 [details] from bug 66165). Look at the last page. The entire table (consisting of a single row specified as atLeast 4.23 cm) should be on the last page, but now a part of it has flowed back to the previous page.
Comment 5 Justin L 2025-01-28 14:57:56 UTC
Created attachment 198803 [details]
fdo74652-1.docx_mso.pdf: how 1- Assgnt 1 DM_Julia-Inci-Yasemin looks in Word 2019

It isn't must DOC format either (of course).
1- Assgnt 1 DM_Julia-Inci-Yasemin.docx (attachment 89528 [details] from bug 71834) is a docx example, where on page 1, a row requesting atLeast 1.57cm is now split across two pages.

(In reply to Mike Kaganski from comment #3)
> And I remember the discussion, that Word does unreasonable things here
In some extreme cases (where the size is larger than the page area) it might be unreasonable, but in almost all of these cases, it simply asks for a small amount - which should never cause any problems.