diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-07-15 20:52:47 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-07-15 20:52:47 +0000 |
commit | 40cebcc945e2ab04730e07b928b6be5789ce94a4 (patch) | |
tree | 953ce29669996d95c6526afb6e46291b975a3ecd /src | |
parent | dfc42a33aa07661f895d7ad1666591dbb64f21c5 (diff) | |
download | xmlgraphics-fop-40cebcc945e2ab04730e07b928b6be5789ce94a4.tar.gz xmlgraphics-fop-40cebcc945e2ab04730e07b928b6be5789ce94a4.zip |
Fix for allowing empty table-cells (for relaxed validation).
Row heights were not always set, especially when there was no content to make the effective rows grow in height.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@219247 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java index 4ac134309..72c44f2ad 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java @@ -455,7 +455,8 @@ public class TableContentLayoutManager { } ElementListObserver.observe(elems, "table-cell", primary.getCell().getId()); - if (((KnuthElement)elems.getLast()).isPenalty() + if ((elems.size() > 0) + && ((KnuthElement)elems.getLast()).isPenalty() && ((KnuthPenalty)elems.getLast()).getP() == -KnuthElement.INFINITE) { // a descendant of this block has break-after @@ -514,7 +515,6 @@ public class TableContentLayoutManager { if (effRowHeight > rowHeights[rgi].min) { //This is the new height of the (grid) row MinOptMaxUtil.extendMinimum(rowHeights[rgi], effRowHeight, false); - row.setHeight(rowHeights[rgi]); } } @@ -524,6 +524,7 @@ 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 " |