private SpanInfo spanInfo[];
+ private boolean ignoreKeeps = false;
+
public RowSpanMgr(int numCols) {
this.spanInfo = new SpanInfo[numCols];
}
return false;
}
+ /**
+ * helper method to prevent infinite loops if
+ * keeps or spans are not fitting on a page
+ * @param <code>true</code> if keeps and spans should be ignored
+ */
+ public void setIgnoreKeeps(boolean ignoreKeeps) {
+ this.ignoreKeeps = ignoreKeeps;
+ }
+
+ /**
+ * helper method (i.e. hack ;-) to prevent infinite loops if
+ * keeps or spans are not fitting on a page
+ * @return true if keeps or spans should be ignored
+ */
+ public boolean ignoreKeeps() {
+ return ignoreKeeps;
+ }
+
}
}
return status;
}
- if (keepWith.size()
- > 0) { // && status.getCode() == Status.AREA_FULL_NONE
+ if ((keepWith.size() > 0)
+ && (!rowSpanMgr.ignoreKeeps())) {
+ // && status.getCode() == Status.AREA_FULL_NONE
// FIXME!!! Handle rows spans!!!
row.removeLayout(areaContainer);
for (Enumeration e = keepWith.elements();
}
if (i == 0) {
resetMarker();
+
+ // Fix for infinite loop bug if keeps are too big for page
+ rowSpanMgr.setIgnoreKeeps(true);
+
return new Status(Status.AREA_FULL_NONE);
}
}
area.increaseHeight(areaContainer.getHeight());
area.setAbsoluteHeight(areaContainer.getAbsoluteHeight());
}
+
+ // Fix for infinite loop bug if spanned rows are too big for page
+ rowSpanMgr.setIgnoreKeeps(true);
+
return status;
} else if (status.getCode() == Status.KEEP_WITH_NEXT
|| rowSpanMgr.hasUnfinishedSpans()) {