File Metadata

Author
danders
Created
Dec 12 2018, 2:23 PM
diff --git a/libs/textlayout/KoTextLayoutTableArea.cpp b/libs/textlayout/KoTextLayoutTableArea.cpp
index 2980c53903b..6e15d4a37bf 100644
--- a/libs/textlayout/KoTextLayoutTableArea.cpp
+++ b/libs/textlayout/KoTextLayoutTableArea.cpp
@@ -432,11 +432,11 @@ bool KoTextLayoutTableArea::layoutTable(TableIterator *cursor)
bottomBorderWidth = nextBottomBorderWidth;
- if (complete) {
+ if (!d->totalMisFit && complete) {
setVirginPage(false);
cursor->row++;
}
- } while (complete && cursor->row < d->table->rows());
+ } while (!d->totalMisFit && complete && cursor->row < d->table->rows());
if (cursor->row == d->table->rows()) {
d->lastRowHasSomething = false;
@@ -746,9 +746,9 @@ bool KoTextLayoutTableArea::layoutRow(TableIterator *cursor, qreal topBorderWidt
FrameIterator *cellCursor = cursor->frameIterator(col);
+
bool cellFully = cellArea->layout(cellCursor);
allCellsFullyDone = allCellsFullyDone && (cellFully || rowHasExactHeight);
-
noCellsFitted = noCellsFitted && (cellArea->top() >= cellArea->bottom()) && !ignoreMisFittingCell;
if (!rowHasExactHeight) {

it's not wrong to break off, because normally it should then try again with this row on the following page where there is more room. so this change is wrong and will break other cases