danders added a comment.
I ended up in the same spot as you: Since all columns in row 0 spans rows, totalMisFit will always be set to true and the whole table is layed out on next page, and next page again and again ... I'm not 100% certain just adding noCellsFitted to the condition covers all bases: We try to layout all headerrows plus 1, but afaics we have to considder spanned rows when first nonheaderrow spans rows. See attached path for a suggested solution. (Maybe also if last headerrow spans rows, but well, probably not a common case ;) Also, if this minimum does not fit on a virgin page, I think we should just lay it out and hope for the best. I added some code for this in the attached patch, but I'm not sure it is the right way, or complete. F6482937: y.diff <https://phabricator.kde.org/F6482937> REPOSITORY R8 Calligra REVISION DETAIL https://phabricator.kde.org/D15428 To: anthonyfieroni, #calligra:_3.0, danders, boemann Cc: Calligra-Devel-list, dcaliste, cochise, vandenoever