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 ke...@apache.org on 2001/03/18 02:18:22 UTC
cvs commit: xml-fop/src/org/apache/fop/fo FOTreeBuilder.java
kellyc 01/03/17 17:18:22
Modified: src/org/apache/fop/apps Driver.java
src/org/apache/fop/fo FOTreeBuilder.java
Log:
Driver reset patch
Submitted by: Art Welch
Revision Changes Path
1.23 +12 -5 xml-fop/src/org/apache/fop/apps/Driver.java
Index: Driver.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/Driver.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Driver.java 2001/03/10 19:02:09 1.22
+++ Driver.java 2001/03/18 01:18:22 1.23
@@ -132,7 +132,9 @@
/** create a new Driver */
public Driver() {
- reset();
+ _stream = null;
+ _treeBuilder = new FOTreeBuilder();
+ setupDefaultMappings();
}
public Driver(InputSource source, OutputStream stream) {
@@ -142,14 +144,19 @@
}
/**
- * Resets the Driver so it can be reused. Property and element mappings are reset to defaults.
+ * Resets the Driver so it can be reused. Property and element
+ * mappings are reset to defaults.
* The output stream is cleared. The renderer is cleared.
*/
public synchronized void reset()
{
- _stream = null;
- _treeBuilder = new FOTreeBuilder();
- setupDefaultMappings();
+ _areaTree = null;
+ _treeBuilder.reset();
+ }
+
+ public boolean hasData()
+ {
+ return(_treeBuilder.hasData());
}
/**
1.16 +13 -1 xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java
Index: FOTreeBuilder.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FOTreeBuilder.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- FOTreeBuilder.java 2000/11/12 22:11:34 1.15
+++ FOTreeBuilder.java 2001/03/18 01:18:22 1.16
@@ -1,4 +1,4 @@
-/*-- $Id: FOTreeBuilder.java,v 1.15 2000/11/12 22:11:34 fotis Exp $ --
+/*-- $Id: FOTreeBuilder.java,v 1.16 2001/03/18 01:18:22 kellyc Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -298,4 +298,16 @@
MessageHandler.logln("formatting FOs into areas");
((Root) this.rootFObj).format(areaTree);
}
+
+ public void reset()
+ {
+ currentFObj = null;
+ rootFObj = null;
+ }
+
+ public boolean hasData()
+ {
+ return (rootFObj != null);
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org