]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Store the index of the last spanned row, instead of the starting row. That latter...
authorVincent Hennebert <vhennebert@apache.org>
Tue, 17 Jul 2007 17:57:40 +0000 (17:57 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Tue, 17 Jul 2007 17:57:40 +0000 (17:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@556997 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/table/ActiveCell.java

index b19426f460e75221de52f743e39c0a56cb2a585d..f9b100ddb7c8879298ad82798c1ce7feb7efde0b 100644 (file)
@@ -31,8 +31,8 @@ class ActiveCell {
         /** Knuth elements for this active cell. */
         private List elementList;
         private boolean prevIsBox = false;
-        /** Number of the row where the row-span begins, zero-based. */
-        private int startRow;
+        /** Number of the row where the row-span ends, zero-based. */
+        private int endRow;
         /** Index, in the list of Knuth elements, of the element starting the current step. */
         private int start;
         /** Index, in the list of Knuth elements, of the element ending the current step. */
@@ -97,14 +97,14 @@ class ActiveCell {
             paddingAfter = pgu.getBorders().getPaddingAfter(false, pgu.getCellLM());
             start = 0;
             end = -1;
-            startRow = rowIndex;
+            endRow = rowIndex + pgu.getCell().getNumberRowsSpanned() - 1;
             keepWithNextSignal = false;
             remainingLength = totalLength;
             goToNextLegalBreak();
         }
 
         boolean endsOnRow(int rowIndex) {
-            return rowIndex == startRow + pgu.getCell().getNumberRowsSpanned() - 1;
+            return rowIndex == endRow;
         }
 
         int getRemainingHeight(int activeRowIndex, EffRow[] rowGroup) {