aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-01-11 05:00:25 +0000
committerKeiron Liddle <keiron@apache.org>2001-01-11 05:00:25 +0000
commit90c4f67b1d76f2702a4d21eb3eb1e0ee0eb1ff6b (patch)
tree125c093bf1d0a1680b96a3985554a85cee1dd221
parent55d1123d4d31562b2705bfcc7d3b92d6e6631a37 (diff)
downloadxmlgraphics-fop-90c4f67b1d76f2702a4d21eb3eb1e0ee0eb1ff6b.tar.gz
xmlgraphics-fop-90c4f67b1d76f2702a4d21eb3eb1e0ee0eb1ff6b.zip
handles orphans properly
fixed a keep problem git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193965 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/org/apache/fop/fo/flow/TableBody.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/org/apache/fop/fo/flow/TableBody.java b/src/org/apache/fop/fo/flow/TableBody.java
index da393004d..87c317ad4 100644
--- a/src/org/apache/fop/fo/flow/TableBody.java
+++ b/src/org/apache/fop/fo/flow/TableBody.java
@@ -192,9 +192,8 @@ 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) {
+ if(endKeepGroup && keepWith.size() > 0) {
keepWith = new Vector();
}
}
@@ -227,9 +226,9 @@ public class TableBody extends FObj {
resetMarker();
return new Status(Status.AREA_FULL_NONE);
}
- if (numChildren - i < orphans && numChildren > orphans) {
- for (int count = numChildren - orphans - i;
- count > 0; count--) {
+ if (numChildren - i < orphans && numChildren >= orphans) {
+ for (int count = i;
+ count > numChildren - orphans - 1; count--) {
row = (TableRow) children.elementAt(count);
row.removeLayout(areaContainer);
i--;
@@ -261,9 +260,7 @@ public class TableBody extends FObj {
keepWith.addElement(row);
endKeepGroup = false;
} else {
- if (keepWith.size() > 0 && row.getKeepWithPrevious().getType() == KeepValue.KEEP_WITH_AUTO) {
- endKeepGroup = true;
- }
+ endKeepGroup = true;
}
lastRow = row;
}
@@ -286,10 +283,6 @@ public class TableBody extends FObj {
return new Status(Status.OK);
}
-/* public int getAreaHeight() {
- return areaContainer.getHeight();
- }*/
-
public void removeLayout(Area area) {
area.removeChild(areaContainer);
if (spaceBefore != 0) {