aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/flow
diff options
context:
space:
mode:
authorGlenn Adams <gadams@apache.org>2012-04-11 21:29:51 +0000
committerGlenn Adams <gadams@apache.org>2012-04-11 21:29:51 +0000
commit03f65a7b8b6d294cff0a6888b466e72da83fead2 (patch)
tree837261b00daeb823c60a2bc12f1abf93e4931d2c /src/java/org/apache/fop/fo/flow
parent480aca5871304b1e690f13bafdfe0bb857b0b940 (diff)
downloadxmlgraphics-fop-03f65a7b8b6d294cff0a6888b466e72da83fead2.tar.gz
xmlgraphics-fop-03f65a7b8b6d294cff0a6888b466e72da83fead2.zip
Bugzilla #52763: Support list-block in marker, thus preventing NPE.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1325016 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow')
-rw-r--r--src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java b/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
index 51ae7441d..62c821504 100644
--- a/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
+++ b/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
@@ -103,17 +103,30 @@ public abstract class AbstractRetrieveMarker extends FObjMixed {
pList,
newPropertyList);
addChildTo(newChild, newParent);
- if (newChild.getNameId() == FO_TABLE) {
+ switch ( newChild.getNameId() ) {
+ case FO_TABLE:
Table t = (Table) child;
cloneSubtree(t.getColumns().iterator(),
- newChild, marker, newPropertyList);
+ newChild, marker, newPropertyList);
cloneSingleNode(t.getTableHeader(),
- newChild, marker, newPropertyList);
+ newChild, marker, newPropertyList);
cloneSingleNode(t.getTableFooter(),
- newChild, marker, newPropertyList);
+ newChild, marker, newPropertyList);
+ cloneSubtree(child.getChildNodes(),
+ newChild, marker, newPropertyList);
+ break;
+ case FO_LIST_ITEM:
+ ListItem li = (ListItem) child;
+ cloneSingleNode(li.getLabel(),
+ newChild, marker, newPropertyList);
+ cloneSingleNode(li.getBody(),
+ newChild, marker, newPropertyList);
+ break;
+ default:
+ cloneSubtree(child.getChildNodes(),
+ newChild, marker, newPropertyList);
+ break;
}
- cloneSubtree(child.getChildNodes(), newChild,
- marker, newPropertyList);
} else if (child instanceof FOText) {
FOText ft = (FOText) newChild;
ft.bind(parentPropertyList);