]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fixes a keep-with-previous problem
authorKeiron Liddle <keiron@apache.org>
Wed, 10 Jan 2001 00:18:43 +0000 (00:18 +0000)
committerKeiron Liddle <keiron@apache.org>
Wed, 10 Jan 2001 00:18:43 +0000 (00:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193959 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/flow/TableBody.java

index 46a340e30272dc76b0d1f0e9e78ef170942dc784..da393004d8916c13442a6cb0a7ccc8a932749ff6 100644 (file)
@@ -183,6 +183,7 @@ public class TableBody extends FObj {
         Vector keepWith = new Vector();
         int numChildren = this.children.size();
         TableRow lastRow = null;
+        boolean endKeepGroup = true;
         for (int i = this.marker; i < numChildren; i++) {
             TableRow row = (TableRow) children.elementAt(i);
 
@@ -191,6 +192,11 @@ public class TableBody extends FObj {
             if (row.getKeepWithPrevious().getType() != KeepValue.KEEP_WITH_AUTO && lastRow != null &&
                     keepWith.indexOf(lastRow) == -1) {
                 keepWith.addElement(lastRow);
+                endKeepGroup = false;
+            } else {
+                if(endKeepGroup) {
+                    keepWith = new Vector();
+                }
             }
 
             Status status;
@@ -253,9 +259,10 @@ public class TableBody extends FObj {
                 return status;
             } else if (status.getCode() == Status.KEEP_WITH_NEXT) {
                 keepWith.addElement(row);
+                endKeepGroup = false;
             } else {
                 if (keepWith.size() > 0 && row.getKeepWithPrevious().getType() == KeepValue.KEEP_WITH_AUTO) {
-                    keepWith = new Vector();
+                    endKeepGroup = true;
                 }
             }
             lastRow = row;