diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2007-04-26 15:32:37 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2007-04-26 15:32:37 +0000 |
commit | 361470baa8019e77f2942c0c0997f1f00c5f08b7 (patch) | |
tree | 955953809fb558cd205718e8b1fac959be78e5a4 /src/java/org/apache/fop/layoutmgr/table | |
parent | c4e62b9f84065e5607ec383194ae0e337b4b73cb (diff) | |
download | xmlgraphics-fop-361470baa8019e77f2942c0c0997f1f00c5f08b7.tar.gz xmlgraphics-fop-361470baa8019e77f2942c0c0997f1f00c5f08b7.zip |
Fix a NPE when break-before is specified on the first row of a table, and when that row contains a row-spanning cell.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@532780 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/table')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java | 11 | ||||
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java | 7 |
2 files changed, 2 insertions, 16 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java index c3e1a41da..9794c7310 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java @@ -69,7 +69,6 @@ public class TableContentLayoutManager implements PercentBaseContext { private LinkedList footerList; private int headerNetHeight = 0; private int footerNetHeight = 0; - private boolean firstBreakBeforeServed = false; private int startXOffset; private int usedBPD; @@ -220,16 +219,10 @@ public class TableContentLayoutManager implements PercentBaseContext { breakPoss.setBreakClass(rowFO.getBreakBefore()); } } else { - if (!firstBreakBeforeServed) { - returnList.add(new BreakElement(new Position(getTableLM()), - 0, -KnuthPenalty.INFINITE, rowFO.getBreakBefore(), context)); - iter.backToPreviousRow(); - firstBreakBeforeServed = true; - break; - } + returnList.add(new BreakElement(new Position(getTableLM()), + 0, -KnuthPenalty.INFINITE, rowFO.getBreakBefore(), context)); } } - firstBreakBeforeServed = true; //Border resolution if (!isSeparateBorderModel()) { diff --git a/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java b/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java index f8cedd7de..0f7604f20 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java @@ -212,13 +212,6 @@ public class TableRowIterator { } /** - * Sets the iterator to the previous row. - */ - public void backToPreviousRow() { - iteratorIndex--; - } - - /** * Returns the first effective row. * @return the requested effective row. */ |