]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixed a ClassCastException in rebind
authorSimon Pepping <spepping@apache.org>
Tue, 30 Nov 2004 20:20:59 +0000 (20:20 +0000)
committerSimon Pepping <spepping@apache.org>
Tue, 30 Nov 2004 20:20:59 +0000 (20:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198180 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/flow/Marker.java

index cb008d8894933b7de362f39af1c289ba9d4e59f9..2af16dbb411753cba6ccc93c5ba96e08d2620795 100644 (file)
@@ -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);
+            }
         }
     }