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 2002/03/21 10:31:02 UTC

cvs commit: xml-fop/src/org/apache/fop/apps CommandLineStarter.java Driver.java

keiron      02/03/21 01:31:02

  Modified:    src/org/apache/fop/apps CommandLineStarter.java Driver.java
  Log:
  initialise driver rather then doing too much in constructor
  
  Revision  Changes    Path
  1.13      +2 -1      xml-fop/src/org/apache/fop/apps/CommandLineStarter.java
  
  Index: CommandLineStarter.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/apps/CommandLineStarter.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CommandLineStarter.java	4 Mar 2002 08:22:27 -0000	1.12
  +++ CommandLineStarter.java	21 Mar 2002 09:31:02 -0000	1.13
  @@ -1,5 +1,5 @@
   /*
  - * $Id: CommandLineStarter.java,v 1.12 2002/03/04 08:22:27 keiron Exp $
  + * $Id: CommandLineStarter.java,v 1.13 2002/03/21 09:31:02 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -58,6 +58,7 @@
           Driver driver = new Driver();
           driver.setLogger(log);
           driver.setBufferFile(commandLineOptions.getBufferFile());
  +        driver.initialize();
   
           if (errorDump) {
               driver.setErrorDump(true);
  
  
  
  1.45      +11 -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.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- Driver.java	18 Mar 2002 12:30:46 -0000	1.44
  +++ Driver.java	21 Mar 2002 09:31:02 -0000	1.45
  @@ -1,5 +1,5 @@
   /*
  - * $Id: Driver.java,v 1.44 2002/03/18 12:30:46 keiron Exp $
  + * $Id: Driver.java,v 1.45 2002/03/21 09:31:02 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -192,9 +192,6 @@
        */
       public Driver() {
           _stream = null;
  -        _treeBuilder = new FOTreeBuilder();
  -        _treeBuilder.setUserAgent(getUserAgent());
  -        setupDefaultMappings();
       }
   
       public Driver(InputSource source, OutputStream stream) {
  @@ -203,6 +200,13 @@
           _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 @@
       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;
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org