You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/07/28 23:22:42 UTC
svn commit: r225893 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
Author: jeremias
Date: Thu Jul 28 14:22:37 2005
New Revision: 225893
URL: http://svn.apache.org/viewcvs?rev=225893&view=rev
Log:
Bugfix: Fixes table-cell7 where padding wasn't handled correctly while adding table areas.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java?rev=225893&r1=225892&r2=225893&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java Thu Jul 28 14:22:37 2005
@@ -491,12 +491,17 @@
effCellContentHeight = Math.max(effCellContentHeight,
bpd.getMinimum().getLength().getValue());
}
+ if (!bpd.getOptimum().isAuto()) {
+ effCellContentHeight = Math.max(effCellContentHeight,
+ bpd.getOptimum().getLength().getValue());
+ }
if (gu.getRowSpanIndex() == 0) {
//TODO ATM only non-row-spanned cells are taken for this
MinOptMaxUtil.restrict(explicitRowHeights[rgi], bpd);
}
effCellContentHeight = Math.max(effCellContentHeight,
primary.getContentLength());
+
int borderWidths;
if (isSeparateBorderModel()) {
borderWidths = primary.getBorders().getBorderBeforeWidth(false)
@@ -787,8 +792,27 @@
gridUnits[i].getElements(), start[i], end[i]);
partLength[i] = len;
log.debug("len of part: " + len);
- if (start[i] == 0 && lastRow.getExplicitHeight().min > 0) {
- len = Math.max(len, lastRow.getExplicitHeight().opt);
+ if (start[i] == 0) {
+ LengthRangeProperty bpd = gridUnits[i].getCell()
+ .getBlockProgressionDimension();
+ if (!bpd.getMinimum().isAuto()) {
+ if (bpd.getMinimum().getLength().getValue() > 0) {
+ len = Math.max(len, bpd.getMinimum().getLength().getValue());
+ }
+ }
+ if (!bpd.getOptimum().isAuto()) {
+ if (bpd.getOptimum().getLength().getValue() > 0) {
+ len = Math.max(len, bpd.getOptimum().getLength().getValue());
+ }
+ }
+ if (gridUnits[i].getRow() != null) {
+ bpd = gridUnits[i].getRow().getBlockProgressionDimension();
+ if (!bpd.getMinimum().isAuto()) {
+ if (bpd.getMinimum().getLength().getValue() > 0) {
+ len = Math.max(len, bpd.getMinimum().getLength().getValue());
+ }
+ }
+ }
}
//Now add the borders to the contentLength
@@ -796,6 +820,8 @@
len += gridUnits[i].getBorders().getBorderBeforeWidth(false);
len += gridUnits[i].getBorders().getBorderAfterWidth(false);
}
+ len += gridUnits[i].getBorders().getPaddingBefore(false);
+ len += gridUnits[i].getBorders().getPaddingAfter(false);
int startRow = Math.max(gridUnits[i].getStartRow(), firstRow[bt]);
Integer storedOffset = (Integer)rowOffsets[bt].get(new Integer(startRow));
int effYOffset;
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org