aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/FOTreeBuilder.java
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-08-16 06:43:51 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-08-16 06:43:51 +0000
commit47daa474f7f92a928541f809058637d8cc4de499 (patch)
treebfd93df313e2b7fecb097dd8fcbe131244e04b4b /src/java/org/apache/fop/fo/FOTreeBuilder.java
parent903caae0117f923fd80ca820b75f358462b13c48 (diff)
downloadxmlgraphics-fop-47daa474f7f92a928541f809058637d8cc4de499.tar.gz
xmlgraphics-fop-47daa474f7f92a928541f809058637d8cc4de499.zip
1. tie Document to fo.FOTreeBuilder and fo.pagination.Root
2. add getDocument() method to FONode (using this.parent for all nodes except Root) 3. start using getDocument() to gain access to font collections stored in Document git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196808 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/FOTreeBuilder.java')
-rw-r--r--src/java/org/apache/fop/fo/FOTreeBuilder.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/FOTreeBuilder.java b/src/java/org/apache/fop/fo/FOTreeBuilder.java
index bb50b23be..1af4d795f 100644
--- a/src/java/org/apache/fop/fo/FOTreeBuilder.java
+++ b/src/java/org/apache/fop/fo/FOTreeBuilder.java
@@ -54,6 +54,8 @@ package org.apache.fop.fo;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import org.apache.fop.control.Document;
+import org.apache.fop.fo.pagination.Root;
// SAX
import org.apache.avalon.framework.logger.Logger;
@@ -110,7 +112,7 @@ public class FOTreeBuilder extends DefaultHandler {
/**
* The root of the formatting object tree
*/
- protected FONode rootFObj = null;
+ protected Root rootFObj = null;
/**
* The class that handles formatting and rendering to a stream
@@ -120,6 +122,8 @@ public class FOTreeBuilder extends DefaultHandler {
private FOUserAgent userAgent;
+ public Document document;
+
/**
* Default constructor
*/
@@ -290,7 +294,8 @@ public class FOTreeBuilder extends DefaultHandler {
+ " be fo:root, not "
+ fobj.getName()));
}
- rootFObj = fobj;
+ rootFObj = (Root)fobj;
+ rootFObj.setDocument(document);
} else {
currentFObj.addChild(fobj);
}