diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-12-01 21:56:02 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-12-01 21:56:02 +0000 |
commit | 704df31665917b2518434171c76eaab86d571145 (patch) | |
tree | 3e8820a4724e09fc282e9fb6be05aaea316cf8ee /src/java/org/apache/fop | |
parent | e2c211b7fbe6de49f0cfa3d161cf0c2255b1d446 (diff) | |
download | xmlgraphics-fop-704df31665917b2518434171c76eaab86d571145.tar.gz xmlgraphics-fop-704df31665917b2518434171c76eaab86d571145.zip |
Fixing two NPEs occurring with a completely empty table where not even the table-cell has at least one block element and relaxed validation is enabled.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@351491 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/TableCell.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/table/TableStepper.java | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/flow/TableCell.java b/src/java/org/apache/fop/fo/flow/TableCell.java index 4e53ed09a..5c20982bb 100644 --- a/src/java/org/apache/fop/fo/flow/TableCell.java +++ b/src/java/org/apache/fop/fo/flow/TableCell.java @@ -171,7 +171,7 @@ public class TableCell extends TableFObj { if (!blockItemFound) { if (getUserAgent().validateStrictly()) { missingChildElementError("marker* (%block;)+"); - } else if (childNodes.size() > 0) { + } else if (childNodes != null && childNodes.size() > 0) { getLogger().warn("fo:table-cell content that is not enclosed by a " + "fo:block will be dropped/ignored."); } diff --git a/src/java/org/apache/fop/layoutmgr/table/TableStepper.java b/src/java/org/apache/fop/layoutmgr/table/TableStepper.java index d27684b49..f290c175a 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableStepper.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableStepper.java @@ -380,7 +380,9 @@ public class TableStepper { if (isBreakCondition()) { ((BreakElement)returnList.getLast()).setPenaltyValue(-KnuthPenalty.INFINITE); } - lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true); + if (lastTCPos != null) { + lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true); + } return returnList; } |