From 0ba4f7c84b93d706ba93c139f5eacc2ba4515bae Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Tue, 5 Nov 2002 11:19:52 +0000 Subject: [PATCH] set all cells to the row height git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195420 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/layoutmgr/table/Cell.java | 12 ++++++++++++ src/org/apache/fop/layoutmgr/table/Row.java | 8 +++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/org/apache/fop/layoutmgr/table/Cell.java b/src/org/apache/fop/layoutmgr/table/Cell.java index 6a51b56b5..c471a81a4 100644 --- a/src/org/apache/fop/layoutmgr/table/Cell.java +++ b/src/org/apache/fop/layoutmgr/table/Cell.java @@ -41,6 +41,7 @@ public class Cell extends BlockStackingLayoutManager { private int xoffset; private int yoffset; private int cellIPD; + private int height; /** * Create a new Cell layout manager. @@ -136,6 +137,15 @@ public class Cell extends BlockStackingLayoutManager { xoffset = off; } + /** + * Set the row height that contains this cell. + * + * @param h the height of the row + */ + public void setRowHeight(int h) { + height = h; + } + /** * Add the areas for the break points. * The cell contains block stacking layout managers @@ -171,6 +181,8 @@ public class Cell extends BlockStackingLayoutManager { addBackground(curBlockArea, backgroundProps); } + curBlockArea.setHeight(height); + flush(); childBreaks.clear(); diff --git a/src/org/apache/fop/layoutmgr/table/Row.java b/src/org/apache/fop/layoutmgr/table/Row.java index 3784bb984..dfedc6315 100644 --- a/src/org/apache/fop/layoutmgr/table/Row.java +++ b/src/org/apache/fop/layoutmgr/table/Row.java @@ -60,6 +60,11 @@ public class Row extends BlockStackingLayoutManager { super(fobj); } + /** + * Initialize properties for this layout manager. + * + * @param propMgr the property manager for the fo + */ protected void initProperties(PropertyManager propMgr) { borderProps = propMgr.getBorderAndPadding(); backgroundProps = propMgr.getBackgroundProps(); @@ -167,7 +172,7 @@ public class Row extends BlockStackingLayoutManager { if (stackSize.min > min) { min = stackSize.min; } - // the optimum is the minimum of all optimums + // the optimum is the maximum of all optimums if (stackSize.opt > opt) { opt = stackSize.opt; } @@ -238,6 +243,7 @@ public class Row extends BlockStackingLayoutManager { while ((childLM = (Cell)breakPosIter.getNextChildLM()) != null) { childLM.setXOffset(xoffset); childLM.setYOffset(yoffset); + childLM.setRowHeight(rowHeight); childLM.addAreas(breakPosIter, lc); } xoffset += col.getWidth(); -- 2.39.5