git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194838 13f79535-47bb-0310-9956-ffa450edef68pull/30/head
@@ -2,8 +2,7 @@ package org.apache.fop.apps; | |||
import java.io.OutputStream; | |||
import java.io.IOException; | |||
import java.util.Vector; | |||
import java.util.Enumeration; | |||
import java.util.HashSet; | |||
import org.xml.sax.SAXException; | |||
@@ -12,8 +11,6 @@ import org.apache.fop.area.PageViewport; | |||
import org.apache.fop.area.AreaTree; | |||
import org.apache.fop.area.Title; | |||
import org.apache.fop.render.Renderer; | |||
import org.apache.fop.datatypes.IDReferences; | |||
import org.apache.fop.extensions.ExtensionObj; | |||
import org.apache.fop.fo.pagination.PageSequence; | |||
import org.apache.avalon.framework.logger.Logger; | |||
@@ -72,21 +69,10 @@ public class StreamRenderer { | |||
private FontInfo fontInfo = new FontInfo(); | |||
/** | |||
The list of pages waiting to be renderered. | |||
The current set of id's in the FO tree | |||
This is used so we know if the FO tree contains duplicates | |||
*/ | |||
private Vector renderQueue = new Vector(); | |||
/** | |||
The current set of IDReferences, passed to the | |||
areatrees and pages. This is used by the AreaTree | |||
as a single map of all IDs. | |||
*/ | |||
private IDReferences idReferences = new IDReferences(); | |||
/** | |||
* The list of extensions. | |||
*/ | |||
private Vector extensions = new Vector(); | |||
private HashSet idReferences = new HashSet(); | |||
private Logger log; | |||
@@ -109,12 +95,12 @@ public class StreamRenderer { | |||
log = logger; | |||
} | |||
public IDReferences getIDReferences() { | |||
public HashSet getIDReferences() { | |||
return idReferences; | |||
} | |||
public void addExtension(ExtensionObj ext) { | |||
extensions.addElement(ext); | |||
public AreaTree getAreaTree() { | |||
return areaTree; | |||
} | |||
public void startRenderer() | |||
@@ -189,10 +175,6 @@ public class StreamRenderer { | |||
throws FOPException { | |||
//areaTree.setFontInfo(fontInfo); | |||
// for(Enumeration e = extensions.elements(); e.hasMoreElements(); ) { | |||
// ExtensionObj ext = (ExtensionObj)e.nextElement(); | |||
// ext.format(areaTree); | |||
// } | |||
pageSequence.format(areaTree); | |||
} | |||
@@ -219,149 +201,5 @@ public class StreamRenderer { | |||
public FontInfo getFontInfo() { | |||
return this.fontInfo; | |||
} | |||
// COMMENT OUT OLD PAGE MANAGEMENT CODE | |||
// public synchronized void queuePage(Page page) | |||
// throws FOPException, IOException { | |||
// /* | |||
// Try to optimise on the common case that there are | |||
// no pages pending and that all ID references are | |||
// valid on the current pages. This short-cuts the | |||
// pipeline and renders the area immediately. | |||
// */ | |||
// if ((renderQueue.size() == 0) && idReferences.isEveryIdValid()) { | |||
// //renderer.render(page, outputStream); | |||
// } else { | |||
// addToRenderQueue(page); | |||
// } | |||
// pageCount++; | |||
// } | |||
// private synchronized void addToRenderQueue(Page page) | |||
// throws FOPException, IOException { | |||
// RenderQueueEntry entry = new RenderQueueEntry(page); | |||
// renderQueue.addElement(entry); | |||
// /* | |||
// The just-added entry could (possibly) resolve the | |||
// waiting entries, so we try to process the queue | |||
// now to see. | |||
// */ | |||
// processQueue(false); | |||
// } | |||
// /** | |||
// Try to process the queue from the first entry forward. | |||
// If an entry can't be processed, then the queue can't | |||
// move forward, so return. | |||
// */ | |||
// private synchronized void processQueue(boolean force) | |||
// throws FOPException, IOException { | |||
// while (renderQueue.size() > 0) { | |||
// RenderQueueEntry entry = (RenderQueueEntry) renderQueue.elementAt(0); | |||
// if ((!force) && (!entry.isResolved())) | |||
// break; | |||
// //renderer.render(entry.getPage(), outputStream); | |||
// /* TODO | |||
// Enumeration rootEnumeration = | |||
// entry.getAreaTree().getExtensions().elements(); | |||
// while (rootEnumeration.hasMoreElements()) | |||
// renderTree.addExtension((ExtensionObj) rootEnumeration.nextElement()); | |||
// */ | |||
// renderQueue.removeElementAt(0); | |||
// } | |||
// } | |||
// /** | |||
// A RenderQueueEntry consists of the Page to be queued, | |||
// plus a list of outstanding ID references that need to be | |||
// resolved before the Page can be renderered.<P> | |||
// */ | |||
// class RenderQueueEntry extends Object { | |||
// /* | |||
// The Page that has outstanding ID references. | |||
// */ | |||
// private Page page; | |||
// /* | |||
// A list of ID references (names). | |||
// */ | |||
// private Vector unresolvedIdReferences = new Vector(); | |||
// public RenderQueueEntry(Page page) { | |||
// this.page = page; | |||
// Enumeration e = idReferences.getInvalidElements(); | |||
// while (e.hasMoreElements()) | |||
// unresolvedIdReferences.addElement(e.nextElement()); | |||
// } | |||
// public Page getPage() { | |||
// return page; | |||
// } | |||
// /** | |||
// See if the outstanding references are resolved | |||
// in the current copy of IDReferences. | |||
// */ | |||
// public boolean isResolved() { | |||
// if ((unresolvedIdReferences.size() == 0) || idReferences.isEveryIdValid()) | |||
// return true; | |||
// // | |||
// // See if any of the unresolved references are still unresolved. | |||
// // | |||
// Enumeration e = unresolvedIdReferences.elements(); | |||
// while (e.hasMoreElements()) | |||
// if (!idReferences.doesIDExist((String) e.nextElement())) | |||
// return false; | |||
// unresolvedIdReferences.removeAllElements(); | |||
// return true; | |||
// } | |||
// } | |||
// public Page getNextPage(Page current, boolean isWithinPageSequence, | |||
// boolean isFirstCall) { | |||
// Page nextPage = null; | |||
// int pageIndex = 0; | |||
// if (isFirstCall) | |||
// pageIndex = renderQueue.size(); | |||
// else | |||
// pageIndex = renderQueue.indexOf(current); | |||
// if ((pageIndex + 1) < renderQueue.size()) { | |||
// nextPage = (Page)renderQueue.elementAt(pageIndex + 1); | |||
// if (isWithinPageSequence | |||
// &&!nextPage.getPageSequence().equals(current.getPageSequence())) { | |||
// nextPage = null; | |||
// } | |||
// } | |||
// return nextPage; | |||
// } | |||
// public Page getPreviousPage(Page current, boolean isWithinPageSequence, | |||
// boolean isFirstCall) { | |||
// Page previousPage = null; | |||
// int pageIndex = 0; | |||
// if (isFirstCall) | |||
// pageIndex = renderQueue.size(); | |||
// else | |||
// pageIndex = renderQueue.indexOf(current); | |||
// // System.out.println("Page index = " + pageIndex); | |||
// if ((pageIndex - 1) >= 0) { | |||
// previousPage = (Page)renderQueue.elementAt(pageIndex - 1); | |||
// PageSequence currentPS = current.getPageSequence(); | |||
// // System.out.println("Current PS = '" + currentPS + "'"); | |||
// PageSequence previousPS = previousPage.getPageSequence(); | |||
// // System.out.println("Previous PS = '" + previousPS + "'"); | |||
// if (isWithinPageSequence &&!previousPS.equals(currentPS)) { | |||
// // System.out.println("Outside page sequence"); | |||
// previousPage = null; | |||
// } | |||
// } | |||
// return previousPage; | |||
// } | |||
} | |||
@@ -8,6 +8,7 @@ | |||
package org.apache.fop.extensions; | |||
import org.apache.fop.fo.FONode; | |||
import org.apache.fop.area.AreaTree; | |||
import java.util.*; | |||
@@ -39,6 +40,8 @@ public class Bookmarks extends ExtensionObj { | |||
data.addSubData(out.getData()); | |||
} | |||
// add data to area tree for resolving and handling | |||
AreaTree at = streamRenderer.getAreaTree(); | |||
at.addTreeExtension(data); | |||
} | |||
} | |||
@@ -11,7 +11,7 @@ package org.apache.fop.fo; | |||
import org.apache.fop.layout.Area; | |||
import org.apache.fop.layout.AreaClass; | |||
import org.apache.fop.apps.FOPException; | |||
import org.apache.fop.datatypes.IDReferences; | |||
import org.apache.fop.apps.StreamRenderer; | |||
import org.apache.fop.layoutmgr.LayoutManager; | |||
import org.apache.fop.fo.properties.FOPropertyMapping; | |||
import org.apache.fop.layout.Area; | |||
@@ -28,14 +28,17 @@ import java.util.ListIterator; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.HashMap; | |||
import java.util.HashSet; | |||
/** | |||
* base class for representation of formatting objects and their processing | |||
*/ | |||
public class FObj extends FONode { | |||
protected StreamRenderer streamRenderer; | |||
public PropertyList properties; | |||
protected PropertyManager propMgr; | |||
protected String areaClass = AreaClass.UNASSIGNED; | |||
protected String id = null; | |||
/** | |||
* value of marker before layout begins | |||
@@ -132,6 +135,10 @@ public class FObj extends FONode { | |||
children.add(child); | |||
} | |||
public void setStreamRenderer(StreamRenderer st) { | |||
streamRenderer = st; | |||
} | |||
/** | |||
* lets outside sources access the property list | |||
* first used by PageNumberCitation to find the "id" property | |||
@@ -142,6 +149,22 @@ public class FObj extends FONode { | |||
return (properties.get(name)); | |||
} | |||
protected void setupID() { | |||
Property prop = this.properties.get("id"); | |||
if(prop != null) { | |||
String str = prop.getString(); | |||
if(str != null && !str.equals("")) { | |||
HashSet idrefs = streamRenderer.getIDReferences(); | |||
if(!idrefs.contains(str)) { | |||
id = str; | |||
idrefs.add(id); | |||
} else { | |||
log.warn("duplicate id:" + str + " ignored"); | |||
} | |||
} | |||
} | |||
} | |||
/** | |||
* Return the "content width" of the areas generated by this FO. | |||
* This is used by percent-based properties to get the dimension of | |||
@@ -156,25 +179,6 @@ public class FObj extends FONode { | |||
return 0; | |||
} | |||
/** | |||
* removes property id | |||
* @param idReferences the id to remove | |||
*/ | |||
public void removeID(IDReferences idReferences) { | |||
if (((FObj) this).properties.get("id") == null || | |||
((FObj) this).properties.get("id").getString() == null) | |||
return; | |||
idReferences.removeID( | |||
((FObj) this).properties.get("id").getString()); | |||
int numChildren = this.children.size(); | |||
for (int i = 0; i < numChildren; i++) { | |||
FONode child = (FONode) children.get(i); | |||
if ((child instanceof FObj)) { | |||
((FObj) child).removeID(idReferences); | |||
} | |||
} | |||
} | |||
public boolean generatesReferenceAreas() { | |||
return false; | |||
} |
@@ -64,10 +64,8 @@ public class FObjMixed extends FObj { | |||
public Status layout(Area area) throws FOPException { | |||
if (this.properties != null) { | |||
Property prop = this.properties.get("id"); | |||
if (prop != null) { | |||
String id = prop.getString(); | |||
setupID(); | |||
if (id != null) { | |||
if (this.marker == START) { | |||
if (area.getIDReferences() != null) | |||
area.getIDReferences().createID(id); |
@@ -56,7 +56,7 @@ public class BasicLink extends Inline { | |||
// this.properties.get("destination-place-offset"); | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("external-destination"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("indicate-destination"); | |||
// this.properties.get("internal-destination"); | |||
// this.properties.get("keep-together"); | |||
@@ -81,7 +81,6 @@ public class BasicLink extends Inline { | |||
if (this.marker == START) { | |||
// initialize id | |||
String id = this.properties.get("id").getString(); | |||
area.getIDReferences().initializeID(id, area); | |||
this.marker = 0; | |||
} |
@@ -63,7 +63,7 @@ public class BidiOverride extends FObjMixed { | |||
// this.properties.get("color"); | |||
// this.properties.get("direction"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("letter-spacing"); | |||
// this.properties.get("line-height"); | |||
// this.properties.get("line-height-shift-adjustment"); |
@@ -85,6 +85,8 @@ public class Block extends FObjMixed { | |||
== Constants.TRUE); | |||
this.lfTreatment = | |||
this.properties.get("linefeed-treatment").getEnum(); | |||
setupID(); | |||
} | |||
public Status layout(Area area) throws FOPException { |
@@ -43,6 +43,7 @@ public class BlockContainer extends FObj { | |||
public void handleAttrs(Attributes attlist) throws FOPException { | |||
super.handleAttrs(attlist); | |||
this.span = this.properties.get("span").getEnum(); | |||
setupID(); | |||
} | |||
public Status layout(Area area) throws FOPException { |
@@ -102,7 +102,7 @@ public class Character extends FObj { | |||
// this.properties.get("text-altitude"); | |||
// this.properties.get("glyph-orientation-horizontal"); | |||
// this.properties.get("glyph-orientation-vertical"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); | |||
// this.properties.get("letter-spacing"); |
@@ -96,7 +96,7 @@ public class ExternalGraphic extends FObj { | |||
// this.properties.get("display-align"); | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("height"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("inline-progression-dimension"); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); |
@@ -161,7 +161,6 @@ public class Flow extends FObj { | |||
FObj prevChild = (FObj) children.get(this.marker); | |||
prevChild.removeAreas(); | |||
prevChild.resetMarker(); | |||
prevChild.removeID(area.getIDReferences()); | |||
_status = new Status(Status.AREA_FULL_SOME); | |||
return _status; | |||
// should probably return AREA_FULL_NONE if first |
@@ -42,7 +42,7 @@ public class InitialPropertySet extends ToBeImplementedElement { | |||
RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); | |||
// this.properties.get("color"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("letter-spacing"); | |||
// this.properties.get("line-height"); | |||
// this.properties.get("line-height-shift-adjustment"); |
@@ -62,7 +62,7 @@ public class Inline extends FObjMixed { | |||
// this.properties.get("baseline-shift"); | |||
// this.properties.get("color"); | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-together"); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); |
@@ -56,7 +56,7 @@ public class InlineContainer extends FObj { | |||
// this.properties.get("display-align"); | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("height"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("inline-progression-dimension"); | |||
// this.properties.get("keep-together"); | |||
// this.properties.get("keep-with-next"); |
@@ -190,7 +190,7 @@ public class InstreamForeignObject extends FObj { | |||
// this.properties.get("display-align"); | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("height"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("inline-progression-dimension"); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); | |||
@@ -203,7 +203,6 @@ public class InstreamForeignObject extends FObj { | |||
// this.properties.get("width"); | |||
/* retrieve properties * | |||
String id = this.properties.get("id").getString(); | |||
int align = this.properties.get("text-align").getEnum(); | |||
int valign = this.properties.get("vertical-align").getEnum(); | |||
int overflow = this.properties.get("overflow").getEnum(); |
@@ -89,7 +89,7 @@ public class Leader extends FObjMixed { | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("text-depth"); | |||
// this.properties.get("text-altitude"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("leader-alignment"); | |||
// this.properties.get("leader-length"); | |||
// this.properties.get("leader-pattern"); | |||
@@ -137,7 +137,6 @@ public class Leader extends FObjMixed { | |||
this.properties.get("leader-alignment").getEnum(); | |||
// initialize id | |||
String id = this.properties.get("id").getString(); | |||
blockArea.getIDReferences().initializeID(id, blockArea); | |||
// adds leader to blockarea, there the leaderArea is generated |
@@ -58,7 +58,7 @@ public class ListBlock extends FObj { | |||
// this.properties.get("break-after"); | |||
// this.properties.get("break-before"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-together"); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); | |||
@@ -98,7 +98,6 @@ public class ListBlock extends FObj { | |||
} | |||
// initialize id | |||
String id = this.properties.get("id").getString(); | |||
area.getIDReferences().initializeID(id, area); | |||
} | |||
@@ -29,7 +29,6 @@ public class ListItem extends FObj { | |||
int endIndent; | |||
int spaceBefore; | |||
int spaceAfter; | |||
String id; | |||
BlockArea blockArea; | |||
public ListItem(FONode parent) { | |||
@@ -57,7 +56,7 @@ public class ListItem extends FObj { | |||
// this.properties.get("break-after"); | |||
// this.properties.get("break-before"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-together"); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); | |||
@@ -71,7 +70,6 @@ public class ListItem extends FObj { | |||
this.properties.get("space-before.optimum").getLength().mvalue(); | |||
this.spaceAfter = | |||
this.properties.get("space-after.optimum").getLength().mvalue(); | |||
this.id = this.properties.get("id").getString(); | |||
area.getIDReferences().createID(id); | |||
@@ -29,12 +29,11 @@ public class ListItemBody extends FObj { | |||
// Common Accessibility Properties | |||
AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-together"); | |||
this.marker = 0; | |||
// initialize id | |||
String id = this.properties.get("id").getString(); | |||
area.getIDReferences().initializeID(id, area); | |||
} | |||
@@ -32,12 +32,11 @@ public class ListItemLabel extends FObj { | |||
// Common Accessibility Properties | |||
AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-together"); | |||
// initialize id | |||
String id = this.properties.get("id").getString(); | |||
area.getIDReferences().initializeID(id, area); | |||
Block block = (Block)children.get(0); |
@@ -27,7 +27,7 @@ public class MultiCase extends ToBeImplementedElement { | |||
// Common Accessibility Properties | |||
AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("starting-state"); | |||
// this.properties.get("case-name"); | |||
// this.properties.get("case-title"); |
@@ -27,7 +27,7 @@ public class MultiProperties extends ToBeImplementedElement { | |||
// Common Accessibility Properties | |||
AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); | |||
// this.properties.get("id"); | |||
setupID(); | |||
return super.layout(area); | |||
} |
@@ -24,7 +24,7 @@ public class MultiPropertySet extends ToBeImplementedElement { | |||
public Status layout(Area area) throws FOPException { | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("active-state"); | |||
return super.layout(area); |
@@ -28,7 +28,7 @@ public class MultiSwitch extends ToBeImplementedElement { | |||
AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); | |||
// this.properties.get("auto-restore"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
return super.layout(area); | |||
} |
@@ -27,7 +27,7 @@ public class MultiToggle extends ToBeImplementedElement { | |||
// Common Accessibility Properties | |||
AccessibilityProps mAccProps = propMgr.getAccessibilityProps(); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("switch-to"); | |||
return super.layout(area); |
@@ -83,7 +83,7 @@ public class PageNumber extends FObj { | |||
// this.properties.get("alignment-baseline"); | |||
// this.properties.get("baseline-shift"); | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); | |||
// this.properties.get("letter-spacing"); | |||
@@ -107,7 +107,6 @@ public class PageNumber extends FObj { | |||
this.marker = 0; | |||
// initialize id | |||
String id = this.properties.get("id").getString(); | |||
area.getIDReferences().initializeID(id, area); | |||
} | |||
@@ -84,7 +84,6 @@ public class PageNumberCitation extends FObj { | |||
Area area; | |||
String pageNumber; | |||
String refId; | |||
String id; | |||
TextState ts; | |||
@@ -138,7 +137,7 @@ public class PageNumberCitation extends FObj { | |||
// this.properties.get("alignment-baseline"); | |||
// this.properties.get("baseline-shift"); | |||
// this.properties.get("dominant-baseline"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); | |||
// this.properties.get("letter-spacing"); | |||
@@ -167,7 +166,6 @@ public class PageNumberCitation extends FObj { | |||
} | |||
// create id | |||
this.id = this.properties.get("id").getString(); | |||
idReferences.createID(id); | |||
ts = new TextState(); | |||
@@ -28,7 +28,6 @@ public class Table extends FObj { | |||
ColorType backgroundColor; | |||
LengthRange ipd; | |||
int height; | |||
String id; | |||
TableHeader tableHeader = null; | |||
TableFooter tableFooter = null; | |||
boolean omitHeaderAtBreak = false; | |||
@@ -82,7 +81,7 @@ public class Table extends FObj { | |||
// this.properties.get("border-start-precendence"); | |||
// this.properties.get("break-after"); | |||
// this.properties.get("break-before"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("inline-progression-dimension"); | |||
// this.properties.get("height"); | |||
// this.properties.get("keep-together"); | |||
@@ -109,8 +108,6 @@ public class Table extends FObj { | |||
this.bAutoLayout = (this.properties.get("table-layout").getEnum() == | |||
TableLayout.AUTO); | |||
this.id = this.properties.get("id").getString(); | |||
this.omitHeaderAtBreak = | |||
this.properties.get("table-omit-header-at-break").getEnum() | |||
== TableOmitHeaderAtBreak.TRUE; |
@@ -41,7 +41,7 @@ public class TableAndCaption extends ToBeImplementedElement { | |||
RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); | |||
// this.properties.get("caption-side"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("keep-together"); | |||
// this.properties.get("keep-with-next"); | |||
// this.properties.get("keep-with-previous"); |
@@ -23,7 +23,6 @@ public class TableBody extends FObj { | |||
int spaceBefore; | |||
int spaceAfter; | |||
ColorType backgroundColor; | |||
String id; | |||
ArrayList columns; | |||
RowSpanMgr rowSpanMgr; // manage information about spanning rows | |||
@@ -70,7 +69,7 @@ public class TableBody extends FObj { | |||
// Common Relative Position Properties | |||
RelativePositionProps mRelProps = propMgr.getRelativePositionProps(); | |||
// this.properties.get("id"); | |||
setupID(); | |||
this.spaceBefore = | |||
this.properties.get("space-before.optimum").getLength().mvalue(); | |||
@@ -78,7 +77,6 @@ public class TableBody extends FObj { | |||
this.properties.get("space-after.optimum").getLength().mvalue(); | |||
this.backgroundColor = | |||
this.properties.get("background-color").getColorType(); | |||
this.id = this.properties.get("id").getString(); | |||
area.getIDReferences().createID(id); | |||
@@ -242,7 +240,6 @@ public class TableBody extends FObj { | |||
area.increaseHeight(-spaceAfter); | |||
} | |||
this.resetMarker(); | |||
this.removeID(area.getIDReferences()); | |||
} | |||
} |
@@ -39,7 +39,7 @@ public class TableCaption extends ToBeImplementedElement { | |||
// this.properties.get("block-progression-dimension"); | |||
// this.properties.get("height"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("inline-progression-dimension"); | |||
// this.properties.get("keep-togethe"); | |||
// this.properties.get("width"); |
@@ -22,7 +22,6 @@ public class TableCell extends FObj { | |||
// int spaceAfter; | |||
ColorType backgroundColor; | |||
String id; | |||
int numColumnsSpanned; | |||
int numRowsSpanned; | |||
int iColNumber = -1; // uninitialized | |||
@@ -144,7 +143,7 @@ public class TableCell extends FObj { | |||
// this.properties.get("empty-cells"); | |||
// this.properties.get("ends-row"); | |||
// this.properties.get("height"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("number-columns-spanned"); | |||
// this.properties.get("number-rows-spanned"); | |||
// this.properties.get("starts-row"); | |||
@@ -169,8 +168,6 @@ public class TableCell extends FObj { | |||
this.backgroundColor = | |||
this.properties.get("background-color").getColorType(); | |||
this.id = this.properties.get("id").getString(); | |||
bSepBorders = (this.properties.get("border-collapse").getEnum() | |||
== BorderCollapse.SEPARATE); | |||
@@ -84,7 +84,7 @@ public class TableColumn extends FObj { | |||
this.columnWidth = columnWidthPropVal.mvalue(); | |||
// initialize id | |||
String id = this.properties.get("id").getString(); | |||
setupID(); | |||
area.getIDReferences().initializeID(id, area); | |||
setup = true; |
@@ -24,7 +24,6 @@ public class TableRow extends FObj { | |||
int breakAfter; | |||
ColorType backgroundColor; | |||
String id; | |||
KeepValue keepWithNext; | |||
KeepValue keepWithPrevious; | |||
@@ -193,7 +192,7 @@ public class TableRow extends FObj { | |||
// this.properties.get("break-before"); | |||
// this.properties.get("break-after"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
// this.properties.get("height"); | |||
// this.properties.get("keep-together"); | |||
// this.properties.get("keep-with-next"); | |||
@@ -209,7 +208,6 @@ public class TableRow extends FObj { | |||
this.keepWithPrevious = | |||
getKeepValue("keep-with-previous.within-column"); | |||
this.id = this.properties.get("id").getString(); | |||
this.minHeight = this.properties.get("height").getLength().mvalue(); | |||
setup = true; | |||
} | |||
@@ -337,7 +335,6 @@ public class TableRow extends FObj { | |||
// if this row is at the top of the column area. | |||
// Remove spanning cells from RowSpanMgr? | |||
this.resetMarker(); | |||
this.removeID(area.getIDReferences()); | |||
return new Status(Status.AREA_FULL_NONE); | |||
} else if (status.getCode() == Status.AREA_FULL_SOME) { | |||
/* | |||
@@ -447,7 +444,6 @@ public class TableRow extends FObj { | |||
area.removeChild(areaContainer); | |||
areaAdded = false; | |||
this.resetMarker(); | |||
this.removeID(area.getIDReferences()); | |||
} | |||
public void resetMarker() { |
@@ -199,7 +199,7 @@ public class PageSequence extends FObj { | |||
// this.properties.get("country"); | |||
// this.properties.get("language"); | |||
// this.properties.get("id"); | |||
setupID(); | |||
} | |||
@@ -87,7 +87,7 @@ public class AreaTree { | |||
} | |||
public IDReferences getIDReferences() { | |||
return streamRenderer.getIDReferences(); | |||
return null;//streamRenderer.getIDReferences(); | |||
} | |||
public void addExtension(ExtensionObj obj) { |