https://bugs.documentfoundation.org/show_bug.cgi?id=138026
--- Comment #9 from BogdanB <[email protected]> --- (In reply to Mike Kaganski from comment #8) > Created attachment 197049 [details] > A minimized sample > > This sample does not hang; however, it has in it the problematic piece, that > results in the "Looping Louie" loop control triggered after 256 attempts > (which happens very quickly here, unlike the original document, where it > would take ~forever). The specific problem is: the paragraphs have "after > paragraph spacing" making the cell not fit to the page, while when moving to > the next page, and already having a follow, the same line is no more the > last - and has no "after paragraph" spacing, thus fits. This oscillates, but > I can't find a way to fix it yet. > > I don't know if this is the single problem making the file hang; but fixing > it is necessary to see if there are other problems. Mike Kaganski, the way this table from comment 8 is rendered between pages changes with this commit. BUT, the main file from the description still hangs. commit b6fd70f75475df692a3f050114b91d8c166b2122 Author: Mike Kaganski <[email protected]> Date: Wed Jun 17 15:09:04 2026 +0500 cool#15942: consider last-in-cell line's lower space when joining to precede When a cell spans across pages, and its text has a "below paragraph" spacing, that spacing is included into the last follow text frame's bottom margin, not into precede's. Reformat will check if the follow text could be joined back; and in that check, it checked if the space available on the previous page was enough for text height plus the existing bottom margin of the precede. That could lead to oscillation, when the following join would add the spacing to the precede, and then the frame became too tall, causing split; in the end, a loop guard would stop the layout and produce inconsistent result. This change takes the lower spacing into account. To check that the line is indeed the last line in cell, it uses a call to GetIndNext(), as already done in other places. This is only an approximation: GetIndNext() returns the next sibling within the same cell frame, so it cannot see a following paragraph that has moved wholly to a later page. It seems acceptable: it is likely that if a line from the following page will fit to the previous one, then its next paragraph's line (if any) already were on the same page as that line. Signed-off-by: Mike Kaganski <[email protected]> Change-Id: Ifc3b9487a85fdd373c92187064b99ebfb65b68a4 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4733 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CPCI <[email protected]> (cherry picked from commit 459f7b6e4c532cf7abd2acb3975e380b90bdc5a0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206995 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit ae87e358260bc3c785cf8b072ed4754b562e4ef6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207011 -- You are receiving this mail because: You are the assignee for the bug.
