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 vh...@apache.org on 2007/07/12 15:45:36 UTC
svn commit: r555628 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
Author: vhennebert
Date: Thu Jul 12 06:45:35 2007
New Revision: 555628
URL: http://svn.apache.org/viewvc?view=rev&rev=555628
Log:
Temporary hack to handle cells with content of zero length
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java?view=diff&rev=555628&r1=555627&r2=555628
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java Thu Jul 12 06:45:35 2007
@@ -117,7 +117,7 @@
private void computeBaseWidth(EffRow[] rowGroup) {
width = 0;
- includedLength = 0;
+ includedLength = -1; // Avoid troubles with cells having content of zero length
for (int prevRow = 0; prevRow < startRow; prevRow++) {
width += rowGroup[prevRow].getHeight().opt;
}
@@ -134,7 +134,7 @@
} else if (includedLength == totalLength) {
return 0;
} else {
- return totalLength - includedLength
+ return totalLength - Math.max(0, includedLength)
+ borderBefore + borderAfter + paddingBefore + paddingAfter;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org