From d706d3413b2509f7f5ff9e1f127b1aa37f447624 Mon Sep 17 00:00:00 2001 From: Glen Mazza Date: Thu, 17 Jun 2004 04:46:08 +0000 Subject: [PATCH] No-constructor loader created for Area Tree. 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 | 2 +- src/java/org/apache/fop/area/AreaTree.java | 18 ++++++++---------- .../org/apache/fop/tools/AreaTreeBuilder.java | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/java/org/apache/fop/apps/Driver.java b/src/java/org/apache/fop/apps/Driver.java index 95175958b..07478a7b7 100644 --- a/src/java/org/apache/fop/apps/Driver.java +++ b/src/java/org/apache/fop/apps/Driver.java @@ -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); diff --git a/src/java/org/apache/fop/area/AreaTree.java b/src/java/org/apache/fop/area/AreaTree.java index 35f72fa51..2c5d57b05 100644 --- a/src/java/org/apache/fop/area/AreaTree.java +++ b/src/java/org/apache/fop/area/AreaTree.java @@ -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; - } - } diff --git a/src/java/org/apache/fop/tools/AreaTreeBuilder.java b/src/java/org/apache/fop/tools/AreaTreeBuilder.java index 109a28e59..71b36ecbf 100644 --- a/src/java/org/apache/fop/tools/AreaTreeBuilder.java +++ b/src/java/org/apache/fop/tools/AreaTreeBuilder.java @@ -271,7 +271,7 @@ class TreeLoader { Element root = null; root = doc.getDocumentElement(); - areaTree = new AreaTree(document); + areaTree = new AreaTree(); areaTree.setTreeModel(model); readAreaTree(root); -- 2.39.5