]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
No-constructor loader created for Area Tree.
authorGlen Mazza <gmazza@apache.org>
Thu, 17 Jun 2004 04:46:08 +0000 (04:46 +0000)
committerGlen Mazza <gmazza@apache.org>
Thu, 17 Jun 2004 04:46:08 +0000 (04:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197721 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/apps/Driver.java
src/java/org/apache/fop/area/AreaTree.java
src/java/org/apache/fop/tools/AreaTreeBuilder.java

index 95175958b911c9b08cd2d327b3efa3104e414154..07478a7b77bf4bf1a9506dfccd01c34ad1e96054 100644 (file)
@@ -490,7 +490,7 @@ public class Driver {
                         "Renderer not set when using standard foInputHandler");
             }
             foInputHandler = new FOTreeHandler(currentDocument, true);
-            currentDocument.areaTree = new AreaTree(currentDocument);
+            currentDocument.areaTree = new AreaTree();
             currentDocument.atModel = new RenderPagesModel(renderer);
             //this.atModel = new CachedRenderPagesModel(renderer);
             currentDocument.areaTree.setTreeModel(currentDocument.atModel);
index 35f72fa518df2e185d1687924871d6e55ce5e578..2c5d57b05a886e5e4a9bac2d7d395d69b876bb6c 100644 (file)
@@ -18,7 +18,6 @@
 
 package org.apache.fop.area;
 
-import org.apache.fop.apps.Document;
 import org.apache.fop.area.extensions.BookmarkData;
 import org.apache.fop.fo.extensions.Outline;
 import org.apache.fop.fo.extensions.Bookmarks;
@@ -31,6 +30,10 @@ import java.util.Set;
 import java.util.HashSet;
 import java.util.Iterator;
 
+// Commons-Logging
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * Area tree for formatting objects.
  *
@@ -52,7 +55,6 @@ public class AreaTree {
     // allows for different models to deal with adding/rendering
     // in different situations
     private AreaTreeModel model;
-    private Document document;
 
     // hashmap of arraylists containing pages with id area
     private Map idLocations = new HashMap();
@@ -60,12 +62,12 @@ public class AreaTree {
     private Map resolve = new HashMap();
     private List treeExtensions = new ArrayList();
 
+    private static Log log = LogFactory.getLog(AreaTree.class);
+
     /**
      * Constructor.
-     * @param document the apps.Document object controlling this AreaTree
      */
-    public AreaTree (Document document) {
-        this.document = document;
+    public AreaTree () {
     }
 
 
@@ -225,7 +227,7 @@ public class AreaTree {
             return;
         }
 
-        document.getDriver().getLogger().debug("adding bookmarks to area tree");
+        log.debug("adding bookmarks to area tree");
         BookmarkData data = new BookmarkData();
         for (int count = 0; count < bookmarks.getOutlines().size(); count++) {
             Outline out = (Outline)(bookmarks.getOutlines()).get(count);
@@ -254,8 +256,4 @@ public class AreaTree {
         return data;
     }
 
-    public Document getDocument() {
-        return document;
-    }
-
 }
index 109a28e594551170bc74c90ec214ea9ff9a5804e..71b36ecbf55eb188ad871ee3c18fab5866d62a7f 100644 (file)
@@ -271,7 +271,7 @@ class TreeLoader {
         Element root = null;
         root = doc.getDocumentElement();
 
-        areaTree = new AreaTree(document);
+        areaTree = new AreaTree();
         areaTree.setTreeModel(model);
 
         readAreaTree(root);