aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/apps
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-03-21 09:31:02 +0000
committerKeiron Liddle <keiron@apache.org>2002-03-21 09:31:02 +0000
commit83a7d296b8b9ed22ab0e437787952635d4aef4fe (patch)
tree15b680339308f2f4878d699dba294e92d464454c /src/org/apache/fop/apps
parentbdad2c98ddc9a202fae49f48181cc06ff73a92ce (diff)
downloadxmlgraphics-fop-83a7d296b8b9ed22ab0e437787952635d4aef4fe.tar.gz
xmlgraphics-fop-83a7d296b8b9ed22ab0e437787952635d4aef4fe.zip
initialise driver rather then doing too much in constructor
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194712 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/apps')
-rw-r--r--src/org/apache/fop/apps/CommandLineStarter.java1
-rw-r--r--src/org/apache/fop/apps/Driver.java14
2 files changed, 11 insertions, 4 deletions
diff --git a/src/org/apache/fop/apps/CommandLineStarter.java b/src/org/apache/fop/apps/CommandLineStarter.java
index c2d34c3c2..77260cadb 100644
--- a/src/org/apache/fop/apps/CommandLineStarter.java
+++ b/src/org/apache/fop/apps/CommandLineStarter.java
@@ -58,6 +58,7 @@ public class CommandLineStarter extends Starter {
Driver driver = new Driver();
driver.setLogger(log);
driver.setBufferFile(commandLineOptions.getBufferFile());
+ driver.initialize();
if (errorDump) {
driver.setErrorDump(true);
diff --git a/src/org/apache/fop/apps/Driver.java b/src/org/apache/fop/apps/Driver.java
index 3fd180185..9afb518cc 100644
--- a/src/org/apache/fop/apps/Driver.java
+++ b/src/org/apache/fop/apps/Driver.java
@@ -192,9 +192,6 @@ public class Driver {
*/
public Driver() {
_stream = null;
- _treeBuilder = new FOTreeBuilder();
- _treeBuilder.setUserAgent(getUserAgent());
- setupDefaultMappings();
}
public Driver(InputSource source, OutputStream stream) {
@@ -203,6 +200,13 @@ public class Driver {
_stream = stream;
}
+ public void initialize() {
+ _stream = null;
+ _treeBuilder = new FOTreeBuilder();
+ _treeBuilder.setUserAgent(getUserAgent());
+ setupDefaultMappings();
+ }
+
public void setUserAgent(FOUserAgent agent) {
userAgent = agent;
}
@@ -210,7 +214,9 @@ public class Driver {
private FOUserAgent getUserAgent() {
if(userAgent == null) {
userAgent = new FOUserAgent();
- userAgent.setLogger(log);
+ userAgent.setLogger(getLogger());
+ String base = org.apache.fop.configuration.Configuration.getStringValue("baseDir");
+ userAgent.setBaseURL(base);
}
return userAgent;
}