diff options
author | Simon Pepping <spepping@apache.org> | 2004-11-30 20:20:59 +0000 |
---|---|---|
committer | Simon Pepping <spepping@apache.org> | 2004-11-30 20:20:59 +0000 |
commit | c25439898af3201381a87360faeccaada821b508 (patch) | |
tree | 0a884b77d9e3eaa751e16bc4bdc150186d189952 /src | |
parent | dfd1847b1fed73be9aacc97f62ed236bf879ad94 (diff) | |
download | xmlgraphics-fop-c25439898af3201381a87360faeccaada821b508.tar.gz xmlgraphics-fop-c25439898af3201381a87360faeccaada821b508.zip |
Fixed a ClassCastException in rebind
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198180 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/Marker.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/flow/Marker.java b/src/java/org/apache/fop/fo/flow/Marker.java index cb008d889..2af16dbb4 100644 --- a/src/java/org/apache/fop/fo/flow/Marker.java +++ b/src/java/org/apache/fop/fo/flow/Marker.java @@ -26,6 +26,7 @@ import org.xml.sax.Locator; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.FOEventHandler; import org.apache.fop.fo.FONode; +import org.apache.fop.fo.FOText; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FObjMixed; import org.apache.fop.fo.PropertyList; @@ -69,9 +70,13 @@ public class Marker extends FObjMixed { // Set a new parent property list and bind all the children again. propertyList.setParentPropertyList(parentPropertyList); for (Iterator i = children.keySet().iterator(); i.hasNext(); ) { - FObj child = (FObj) i.next(); + Object child = i.next(); PropertyList childList = (PropertyList) children.get(child); - child.bind(childList); + if (child instanceof FObj) { + ((FObj) child).bind(childList); + } else if (child instanceof FOText) { + ((FOText) child).bind(childList); + } } } |