From: Peter Bernard West Date: Mon, 10 May 2004 11:50:02 +0000 (+0000) Subject: pageSequence field now stored as FoPageSequence, X-Git-Tag: Defoe_export~173 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d11b04baf7f8b4d0ea9f0f35d65739991518574;p=xmlgraphics-fop.git pageSequence field now stored as FoPageSequence, not as FONode git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197582 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/FOPageSeqNode.java b/src/java/org/apache/fop/fo/FOPageSeqNode.java index c322a8ec9..5187314fd 100644 --- a/src/java/org/apache/fop/fo/FOPageSeqNode.java +++ b/src/java/org/apache/fop/fo/FOPageSeqNode.java @@ -24,6 +24,7 @@ import org.apache.fop.area.Area; import org.apache.fop.datastructs.TreeException; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.flow.FoMarker; +import org.apache.fop.fo.flow.FoPageSequence; import org.apache.fop.xml.FoXmlEvent; import org.apache.fop.xml.XmlEvent; @@ -34,7 +35,7 @@ import org.apache.fop.xml.XmlEvent; public class FOPageSeqNode extends FONode { /** The FoPageSequence ancestor of this node. */ - protected final FONode pageSequence; + protected final FoPageSequence pageSequence; /** * Comment for childContext */ @@ -78,8 +79,12 @@ public class FOPageSeqNode extends FONode { stateFlags, sparsePropsMap, sparseIndices); - - this.pageSequence = pageSequence; + if (pageSequence.type != FObjectNames.PAGE_SEQUENCE) { + throw new RuntimeException( + "FOPageSeqNode constructor expects FoPageSequence; got " + + nodeType()); + } + this.pageSequence = (FoPageSequence)pageSequence; } @@ -113,19 +118,18 @@ public class FOPageSeqNode extends FONode { int[] sparsePropsMap, int[] sparseIndices) throws TreeException, FOPException, PropertyException { - super( + this( foTree, type, pageSequence, + pageSequence, event, stateFlags, sparsePropsMap, sparseIndices); - - this.pageSequence = pageSequence; } - public FONode getPageSequence() { + public FoPageSequence getPageSequence() { return pageSequence; }