From: Peter Bernard West Date: Fri, 16 Apr 2004 05:15:16 +0000 (+0000) Subject: Eliminated currently unused code X-Git-Tag: Defoe_export~229 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=54303b8ad88f73d9186e6c339e6a9e92d44763f3;p=xmlgraphics-fop.git Eliminated currently unused code git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197512 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/area/PageRefArea.java b/src/java/org/apache/fop/area/PageRefArea.java index 9f5be318e..e8e70664d 100644 --- a/src/java/org/apache/fop/area/PageRefArea.java +++ b/src/java/org/apache/fop/area/PageRefArea.java @@ -18,22 +18,14 @@ package org.apache.fop.area; import java.io.Serializable; -import java.util.Map; +//import java.util.Map; import org.apache.fop.datastructs.Node; import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** - * The page. - * This holds the contents of the page. Each region is added. - * The unresolved references area added so that if the page is - * serialized then it will handle the resolving properly after - * being reloaded. - * This is serializable so it can be saved to cache to save - * memory if there are forward references. - * The page is cloneable so the page master can make copies of - * the top level page and regions. + * This holds the contents of the page. * * @author The Apache XML-FOP sub-project * @author pbw @@ -49,8 +41,8 @@ implements ReferenceArea, Serializable { private RegionStartVport regionStart = null; private RegionEndVport regionEnd = null; - // temporary map of unresolved objects used when serializing the page - private Map unresolved = null; +// // temporary map of unresolved objects used when serializing the page +// private Map unresolved = null; public PageRefArea( FoPageSequence pageSeq, @@ -60,25 +52,25 @@ implements ReferenceArea, Serializable { super(pageSeq, generatedBy, parent, sync); } - /** - * Set the unresolved references on this page for serializing. - * - * @param unres the map of unresolved objects - */ - public void setUnresolvedReferences(Map unres) { - unresolved = unres; - } - - /** - * Get the map unresolved references from this page. - * This should be called after deserializing to retrieve - * the map of unresolved references that were serialized. - * - * @return the de-serialized map of unresolved objects - */ - public Map getUnresolvedReferences() { - return unresolved; - } +// /** +// * Set the unresolved references on this page for serializing. +// * +// * @param unres the map of unresolved objects +// */ +// public void setUnresolvedReferences(Map unres) { +// unresolved = unres; +// } +// +// /** +// * Get the map unresolved references from this page. +// * This should be called after deserializing to retrieve +// * the map of unresolved references that were serialized. +// * +// * @return the de-serialized map of unresolved objects +// */ +// public Map getUnresolvedReferences() { +// return unresolved; +// } /** * @return the regionAfter diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java index 5b1f61de2..c9657aeb6 100644 --- a/src/java/org/apache/fop/area/PageViewport.java +++ b/src/java/org/apache/fop/area/PageViewport.java @@ -18,9 +18,9 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; -import java.io.IOException; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; +//import java.io.IOException; +//import java.io.ObjectOutputStream; +//import java.io.ObjectInputStream; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -89,7 +89,7 @@ implements Viewport, Resolveable { /** * Create a page viewport. * @param parent node of this viewport - * @param sync object on which teh Area is synchronized + * @param sync object on which the Area is synchronized * @param pageId the unique identifier of this page * @param p the page reference area for the contents of this page * @param bounds the dimensions of the viewport @@ -371,48 +371,48 @@ implements Viewport, Resolveable { } } - /** - * Save the viewport pageRefArea to an object stream. - * The map of unresolved references are set on the pageRefArea so that - * the resolvers can be properly serialized and reloaded. - * @param out the object output stream to write the contents - */ - public void savePage(ObjectOutputStream out) { - // set the unresolved references so they are serialized - synchronized (sync) { - ((PageRefArea)refArea).setUnresolvedReferences(unresolved); - try { - out.writeObject(refArea); - } catch (IOException e) { - throw new RuntimeException(e); - } - refArea = null; - } - } +// /** +// * Save the viewport pageRefArea to an object stream. +// * The map of unresolved references are set on the pageRefArea so that +// * the resolvers can be properly serialized and reloaded. +// * @param out the object output stream to write the contents +// */ +// public void savePage(ObjectOutputStream out) { +// // set the unresolved references so they are serialized +// synchronized (sync) { +// ((PageRefArea)refArea).setUnresolvedReferences(unresolved); +// try { +// out.writeObject(refArea); +// } catch (IOException e) { +// throw new RuntimeException(e); +// } +// refArea = null; +// } +// } - /** - * Load the viewport pageRefArea from an object stream. - * This loads the pageRefArea from the stream and - * if there are any unresolved references that were resolved - * while saved they will be resolved on the page contents. - * @param in the object input stream to read the pageRefArea from - * @throws Exception if there is an error loading the pageRefArea - */ - public void loadPage(ObjectInputStream in) throws Exception { - synchronized (sync) { - PageRefArea pageRefArea = (PageRefArea) in.readObject(); - refArea = pageRefArea; - unresolved = pageRefArea.getUnresolvedReferences(); - if (unresolved != null && pendingResolved != null) { - for (Iterator iter = pendingResolved.keySet().iterator(); - iter.hasNext();) { - String id = (String) iter.next(); - resolve(id, (List)pendingResolved.get(id)); - } - pendingResolved = null; - } - } - } +// /** +// * Load the viewport pageRefArea from an object stream. +// * This loads the pageRefArea from the stream and +// * if there are any unresolved references that were resolved +// * while saved they will be resolved on the page contents. +// * @param in the object input stream to read the pageRefArea from +// * @throws Exception if there is an error loading the pageRefArea +// */ +// public void loadPage(ObjectInputStream in) throws Exception { +// synchronized (sync) { +// PageRefArea pageRefArea = (PageRefArea) in.readObject(); +// refArea = pageRefArea; +// unresolved = pageRefArea.getUnresolvedReferences(); +// if (unresolved != null && pendingResolved != null) { +// for (Iterator iter = pendingResolved.keySet().iterator(); +// iter.hasNext();) { +// String id = (String) iter.next(); +// resolve(id, (List)pendingResolved.get(id)); +// } +// pendingResolved = null; +// } +// } +// } /** * Clone this page.