aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2007-11-20 16:07:32 +0000
committerVincent Hennebert <vhennebert@apache.org>2007-11-20 16:07:32 +0000
commit22cdf131f207ff063f84622d9f8054b68b9c5f6b (patch)
tree719bbdfba39bd1065f78c86b48081efe6e38b745 /src/java/org/apache/fop
parentc363ede82375f42cd09c6ded9c89041774085ba4 (diff)
downloadxmlgraphics-fop-22cdf131f207ff063f84622d9f8054b68b9c5f6b.tar.gz
xmlgraphics-fop-22cdf131f207ff063f84622d9f8054b68b9c5f6b.zip
Bugfix in tables: wrong element generation by the merging algorithm when glues must be produced to cope with conditional spaces. The corresponding length was added twice: one in the glue itself and one in the following box.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@596727 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r--src/java/org/apache/fop/layoutmgr/table/TableStepper.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableStepper.java b/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
index 7a92dbfd6..98b07778f 100644
--- a/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
+++ b/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
@@ -156,15 +156,15 @@ public class TableStepper {
boolean signalKeepWithNext = false;
int laststep = 0;
int step;
- int addedBoxLen = 0;
+ int cumulateLength = 0; // Length of the content accumulated before the break
TableContentPosition lastTCPos = null;
LinkedList returnList = new LinkedList();
while ((step = getNextStep()) >= 0) {
int normalRow = activeRowIndex;
int increase = step - laststep;
int penaltyOrGlueLen = step + getMaxRemainingHeight() - totalHeight;
- int boxLen = step - addedBoxLen - Math.max(0, penaltyOrGlueLen);
- addedBoxLen += boxLen;
+ int boxLen = step - cumulateLength - Math.max(0, penaltyOrGlueLen)/* the penalty, if any */;
+ cumulateLength += boxLen + Math.max(0, -penaltyOrGlueLen)/* the glue, if any */;
boolean forcedBreak = false;
int breakClass = -1;