From: Jeremias Maerki Date: Tue, 19 Jul 2005 13:53:05 +0000 (+0000) Subject: Buzilla #35787 X-Git-Tag: fop-0_90-alpha1~484 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=12408dd7499da05cbefce3070c2bf9035794508f;p=xmlgraphics-fop.git Buzilla #35787 When checking for content overflow, don't include border and padding. Clearer warning message in case of height constraint violation on table-rows. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@219685 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java index 932e7be28..1fad67657 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java @@ -406,6 +406,7 @@ public class TableContentLayoutManager { TableRow tableRow = null; int minContentHeight = 0; int maxCellHeight = 0; + int effRowContentHeight = 0; for (int j = 0; j < row.getGridUnits().size(); j++) { maxColumnCount = Math.max(maxColumnCount, row.getGridUnits().size()); GridUnit gu = row.getGridUnit(j); @@ -504,6 +505,8 @@ public class TableContentLayoutManager { borderWidths = primary.getHalfMaxBorderWidth(); } int padding = 0; + effRowContentHeight = Math.max(effRowContentHeight, + effCellContentHeight); CommonBorderPaddingBackground cbpb = primary.getCell().getCommonBorderPaddingBackground(); padding += cbpb.getPaddingBefore(false); @@ -526,11 +529,13 @@ public class TableContentLayoutManager { row.setHeight(rowHeights[rgi]); row.setExplicitHeight(explicitRowHeights[rgi]); - if (row.getHeight().opt > row.getExplicitHeight().max) { - log.warn("Contents of row " + row.getIndex() + " violate a maximum constraint " - + "in block-progression-dimension. Due to its contents the row grows " - + "to " + row.getHeight().opt + " millipoints. The row constraint resolve " - + "to " + row.getExplicitHeight()); + if (effRowContentHeight > row.getExplicitHeight().max) { + log.warn("The contents of row " + (row.getIndex() + 1) + + " are taller than they should be (there is a" + + " block-progression-dimension or height constraint on the indicated row)." + + " Due to its contents the row grows" + + " to " + effRowContentHeight + " millipoints, but the row shouldn't get" + + " any taller than " + row.getExplicitHeight() + " millipoints."); } } if (log.isDebugEnabled()) {