From 14e63efe0a40c52b353afdf7fbc046897b0683bf Mon Sep 17 00:00:00 2001 From: "Andreas L. Delmelle" Date: Wed, 31 Jan 2007 20:34:08 +0000 Subject: [PATCH] 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 --- .../org/apache/fop/fo/flow/TableFObj.java | 3 +- .../testcases/column-number_bug41503.fo | 58 +++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 test/fotree/testcases/column-number_bug41503.fo 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 + + + + + + + + -- 2.39.5