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/06 11:24:06 UTC

svn commit: r553809 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java

Author: vhennebert
Date: Fri Jul  6 02:24:06 2007
New Revision: 553809

URL: http://svn.apache.org/viewvc?view=rev&rev=553809
Log:
Remove decrease of activeRowIndex when backtracking

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=553809&r1=553808&r2=553809
==============================================================================
--- 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 Fri Jul  6 02:24:06 2007
@@ -208,7 +208,7 @@
                         getTableLM().getHalfBorderSeparationBPD(), rowGroup));
             }
         }
-        for (int i = activeRowIndex + 1; i < rowGroup.length; i++) {
+        for (int i = activeRowIndex + (rowBacktrackForLastStep ? 0 : 1); i < rowGroup.length; i++) {
             maxW += rowGroup[i].getHeight().opt;
         }
         log.debug("maxRemainingHeight=" + maxW);
@@ -258,11 +258,6 @@
         LinkedList returnList = new LinkedList();
         while ((step = getNextStep()) >= 0) {
             int normalRow = activeRowIndex;
-            if (rowBacktrackForLastStep) {
-                //Even though we've already switched to the next row, we have to 
-                //calculate as if we were still on the previous row
-                activeRowIndex--;
-            }
             int increase = step - laststep;
             int penaltyLen = step + getMaxRemainingHeight() - totalHeight;
             int boxLen = step - addedBoxLen - penaltyLen;
@@ -394,10 +389,6 @@
             }
 
             laststep = step;
-            if (rowBacktrackForLastStep) {
-                //If row was set to previous, restore now
-                activeRowIndex++;
-            }
         }
         if (signalKeepWithNext) {
             //Last step signalled a keep-with-next. Since the last penalty will be removed,



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org