aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/table
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-07-19 13:53:05 +0000
committerJeremias Maerki <jeremias@apache.org>2005-07-19 13:53:05 +0000
commit12408dd7499da05cbefce3070c2bf9035794508f (patch)
tree4f3ed94998ed36086576d05fe8307733f5bb5614 /src/java/org/apache/fop/layoutmgr/table
parentc5d54602fa18f05bb46acaee056dfa4ec62d00e6 (diff)
downloadxmlgraphics-fop-12408dd7499da05cbefce3070c2bf9035794508f.tar.gz
xmlgraphics-fop-12408dd7499da05cbefce3070c2bf9035794508f.zip
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
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/table')
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java15
1 files changed, 10 insertions, 5 deletions
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()) {