You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by sp...@apache.org on 2004/11/30 21:20:59 UTC
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow Marker.java
spepping 2004/11/30 12:20:59
Modified: src/java/org/apache/fop/fo/flow Marker.java
Log:
Fixed a ClassCastException in rebind
Revision Changes Path
1.20 +7 -2 xml-fop/src/java/org/apache/fop/fo/flow/Marker.java
Index: Marker.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Marker.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Marker.java 28 Oct 2004 10:00:21 -0000 1.19
+++ Marker.java 30 Nov 2004 20:20:59 -0000 1.20
@@ -26,6 +26,7 @@
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 @@
// 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);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org
Re: cvs commit: xml-fop/src/java/org/apache/fop/fo/flow Marker.java
Posted by Glen Mazza <gr...@yahoo.com>.
Finn (or anyone else), given that FOText nodes (and possibly other
non-formatting object nodes in the future) also have properties, any
objections if we move FObj.bind() to FONode.bind()? That would
simplify the below code a bit.
Thanks,
Glen
spepping@apache.org schrieb:
>spepping 2004/11/30 12:20:59
>
> Modified: src/java/org/apache/fop/fo/flow Marker.java
> Log:
> Fixed a ClassCastException in rebind
>
> Revision Changes Path
> 1.20 +7 -2 xml-fop/src/java/org/apache/fop/fo/flow/Marker.java
>
> Index: Marker.java
> ===================================================================
> RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Marker.java,v
> retrieving revision 1.19
> retrieving revision 1.20
> diff -u -r1.19 -r1.20
> --- Marker.java 28 Oct 2004 10:00:21 -0000 1.19
> +++ Marker.java 30 Nov 2004 20:20:59 -0000 1.20
> @@ -26,6 +26,7 @@
> 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 @@
> // 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);
> + }
> }
> }
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-cvs-help@xml.apache.org
>
>
>
>