]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
pageSequence field now stored as FoPageSequence,
authorPeter Bernard West <pbwest@apache.org>
Mon, 10 May 2004 11:50:02 +0000 (11:50 +0000)
committerPeter Bernard West <pbwest@apache.org>
Mon, 10 May 2004 11:50:02 +0000 (11:50 +0000)
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

src/java/org/apache/fop/fo/FOPageSeqNode.java

index c322a8ec9193cb8476af3c2030ea890756005989..5187314fd3db825d4b5a2668d40d1724cc4f3f70 100644 (file)
@@ -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 <code>FoPageSequence</code> ancestor of this node. */
-    protected final FONode pageSequence;
+    protected final FoPageSequence pageSequence;
     /**
      * Comment for <code>childContext</code>
      */
@@ -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;
     }