pbwest 2004/04/15 22:15:17
Modified: src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
PageViewport.java PageRefArea.java
Log:
Eliminated currently unused code
Revision Changes Path
No revision
No revision
1.2.2.4 +46 -46 xml-fop/src/java/org/apache/fop/area/PageViewport.java
Index: PageViewport.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/PageViewport.java,v
retrieving revision 1.2.2.3
retrieving revision 1.2.2.4
diff -u -r1.2.2.3 -r1.2.2.4
--- PageViewport.java 28 Feb 2004 02:06:44 -0000 1.2.2.3
+++ PageViewport.java 16 Apr 2004 05:15:16 -0000 1.2.2.4
@@ -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 @@
/**
* 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 @@
}
}
- /**
- * 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;
- }
- }
- }
+// /**
+// * 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;
+// }
+// }
+// }
/**
* Clone this page.
1.1.2.3 +25 -33 xml-fop/src/java/org/apache/fop/area/Attic/PageRefArea.java
Index: PageRefArea.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/PageRefArea.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- PageRefArea.java 28 Feb 2004 02:06:44 -0000 1.1.2.2
+++ PageRefArea.java 16 Apr 2004 05:15:16 -0000 1.1.2.3
@@ -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 @@
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 @@
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]