Index: src/org/apache/fop/fo/flow/TableCell.java =================================================================== RCS file: /home/cvspublic/xml-fop/src/org/apache/fop/fo/flow/TableCell.java,v retrieving revision 1.32 diff -u -r1.32 TableCell.java --- src/org/apache/fop/fo/flow/TableCell.java 2001/06/14 21:22:54 1.32 +++ src/org/apache/fop/fo/flow/TableCell.java 2001/06/18 09:37:14 @@ -49,6 +49,7 @@ /* ivan demakov */ protected int borderHeight = 0; + protected int cellHeight = 0; protected int height = 0; protected int top; // Ypos of cell ??? @@ -118,6 +119,7 @@ } else bRelativeAlign = false; // Align on a per-cell basis + this.cellHeight = this.properties.get("height").getLength().mvalue(); } @@ -158,7 +160,7 @@ this.cellArea = new AreaContainer(propMgr.getFontState(area.getFontInfo()), startOffset, beforeOffset, - width, area.spaceLeft()- m_borderSeparation/2 + borderHeight/2, + width, spaceLeft - m_borderSeparation/2 + borderHeight/2, Position.RELATIVE); cellArea.foCreator=this; // G Seshadri @@ -194,6 +196,7 @@ return new Status(Status.AREA_FULL_SOME); } } + area.setMaxHeight(area.getMaxHeight() - spaceLeft + this.cellArea.getMaxHeight()); } @@ -218,7 +221,8 @@ // TableRow calls this. Anyone else? public int getHeight() { // return cellArea.getHeight() + spaceBefore + spaceAfter; - return cellArea.getHeight() + m_borderSeparation - borderHeight / 2; + if (cellHeight > 0) return cellHeight; + return cellArea.getHeight() + m_borderSeparation - borderHeight/2; } /** Called by TableRow to set final size of cell content rectangles and @@ -290,6 +294,10 @@ this.beforeOffset = m_borderSeparation/2 + bp.getBorderTopWidth(false) + bp.getPaddingTop(false); // bp.getBorderBeforeWidth(false) + bp.getPaddingBefore(false); + if (this.cellHeight > 0) { + this.cellHeight += this.beforeOffset + m_borderSeparation/2 + + bp.getBorderBottomWidth(false) + bp.getPaddingBottom(false); + } } else { //System.err.println("Collapse borders"); @@ -332,6 +340,9 @@ this.beforeOffset = borderBefore/2 + bp.getPaddingTop(false); this.borderHeight = borderBefore + borderAfter; + if (this.cellHeight > 0) { + this.cellHeight += this.beforeOffset + borderAfter/2 + bp.getPaddingBottom(false); + } } } } -- ivan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]