From: Andreas L. Delmelle Date: Wed, 31 Jan 2007 20:34:08 +0000 (+0000) Subject: Fix for bugzilla 41503: X-Git-Tag: fop-0_94~231 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=14e63efe0a40c52b353afdf7fbc046897b0683bf;p=xmlgraphics-fop.git Fix for bugzilla 41503: take into account that column-numbers need not be monotonically increasing git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@501977 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/flow/TableFObj.java b/src/java/org/apache/fop/fo/flow/TableFObj.java index 65d32b76a..359530cdc 100644 --- a/src/java/org/apache/fop/fo/flow/TableFObj.java +++ b/src/java/org/apache/fop/fo/flow/TableFObj.java @@ -148,7 +148,8 @@ public abstract class TableFObj extends FObj { TableRow row = (TableRow) this; - for (i = colSpan; --i >= 0;) { + for (i = colSpan; + --i >= 0 || row.pendingSpans.size() < cell.getColumnNumber();) { row.pendingSpans.add(null); } diff --git a/test/fotree/testcases/column-number_bug41503.fo b/test/fotree/testcases/column-number_bug41503.fo new file mode 100644 index 000000000..cc7aedd6d --- /dev/null +++ b/test/fotree/testcases/column-number_bug41503.fo @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + column 1 + + + + column 3 + + + + + + column 1 + + + + column 2 + + + + + + + +