aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-05-23 06:27:14 +0000
committerKeiron Liddle <keiron@apache.org>2002-05-23 06:27:14 +0000
commit17c3c8e200822fb2856be9358e61bf50539c7cec (patch)
tree364e0996c3ae158d10d256339798b66c75184a94 /src/org/apache/fop/fo
parent963f7ee8c580b22d7cc6200e3a410fc01db8f223 (diff)
downloadxmlgraphics-fop-17c3c8e200822fb2856be9358e61bf50539c7cec.tar.gz
xmlgraphics-fop-17c3c8e200822fb2856be9358e61bf50539c7cec.zip
sets up the id independantly of the layout
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194838 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo')
-rw-r--r--src/org/apache/fop/fo/FObj.java44
-rw-r--r--src/org/apache/fop/fo/FObjMixed.java6
-rw-r--r--src/org/apache/fop/fo/flow/BasicLink.java3
-rw-r--r--src/org/apache/fop/fo/flow/BidiOverride.java2
-rw-r--r--src/org/apache/fop/fo/flow/Block.java2
-rw-r--r--src/org/apache/fop/fo/flow/BlockContainer.java1
-rw-r--r--src/org/apache/fop/fo/flow/Character.java2
-rw-r--r--src/org/apache/fop/fo/flow/ExternalGraphic.java2
-rw-r--r--src/org/apache/fop/fo/flow/Flow.java1
-rw-r--r--src/org/apache/fop/fo/flow/InitialPropertySet.java2
-rw-r--r--src/org/apache/fop/fo/flow/Inline.java2
-rw-r--r--src/org/apache/fop/fo/flow/InlineContainer.java2
-rw-r--r--src/org/apache/fop/fo/flow/InstreamForeignObject.java3
-rw-r--r--src/org/apache/fop/fo/flow/Leader.java3
-rw-r--r--src/org/apache/fop/fo/flow/ListBlock.java3
-rw-r--r--src/org/apache/fop/fo/flow/ListItem.java4
-rw-r--r--src/org/apache/fop/fo/flow/ListItemBody.java3
-rw-r--r--src/org/apache/fop/fo/flow/ListItemLabel.java5
-rw-r--r--src/org/apache/fop/fo/flow/MultiCase.java2
-rw-r--r--src/org/apache/fop/fo/flow/MultiProperties.java2
-rw-r--r--src/org/apache/fop/fo/flow/MultiPropertySet.java2
-rw-r--r--src/org/apache/fop/fo/flow/MultiSwitch.java2
-rw-r--r--src/org/apache/fop/fo/flow/MultiToggle.java2
-rw-r--r--src/org/apache/fop/fo/flow/PageNumber.java3
-rw-r--r--src/org/apache/fop/fo/flow/PageNumberCitation.java4
-rw-r--r--src/org/apache/fop/fo/flow/Table.java5
-rw-r--r--src/org/apache/fop/fo/flow/TableAndCaption.java2
-rw-r--r--src/org/apache/fop/fo/flow/TableBody.java5
-rw-r--r--src/org/apache/fop/fo/flow/TableCaption.java2
-rw-r--r--src/org/apache/fop/fo/flow/TableCell.java5
-rw-r--r--src/org/apache/fop/fo/flow/TableColumn.java2
-rw-r--r--src/org/apache/fop/fo/flow/TableRow.java6
-rw-r--r--src/org/apache/fop/fo/pagination/PageSequence.java2
33 files changed, 58 insertions, 78 deletions
diff --git a/src/org/apache/fop/fo/FObj.java b/src/org/apache/fop/fo/FObj.java
index 251448f33..6e4219223 100644
--- a/src/org/apache/fop/fo/FObj.java
+++ b/src/org/apache/fop/fo/FObj.java
@@ -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;
}
diff --git a/src/org/apache/fop/fo/FObjMixed.java b/src/org/apache/fop/fo/FObjMixed.java
index 34899ff63..a21732c1a 100644
--- a/src/org/apache/fop/fo/FObjMixed.java
+++ b/src/org/apache/fop/fo/FObjMixed.java
@@ -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);
diff --git a/src/org/apache/fop/fo/flow/BasicLink.java b/src/org/apache/fop/fo/flow/BasicLink.java
index 938c43dcc..d929a85e1 100644
--- a/src/org/apache/fop/fo/flow/BasicLink.java
+++ b/src/org/apache/fop/fo/flow/BasicLink.java
@@ -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;
}
diff --git a/src/org/apache/fop/fo/flow/BidiOverride.java b/src/org/apache/fop/fo/flow/BidiOverride.java
index d7123ed39..7df4552d3 100644
--- a/src/org/apache/fop/fo/flow/BidiOverride.java
+++ b/src/org/apache/fop/fo/flow/BidiOverride.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/Block.java b/src/org/apache/fop/fo/flow/Block.java
index 54c0eb73a..9fb9c9e83 100644
--- a/src/org/apache/fop/fo/flow/Block.java
+++ b/src/org/apache/fop/fo/flow/Block.java
@@ -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 {
diff --git a/src/org/apache/fop/fo/flow/BlockContainer.java b/src/org/apache/fop/fo/flow/BlockContainer.java
index e96a45f85..054f848da 100644
--- a/src/org/apache/fop/fo/flow/BlockContainer.java
+++ b/src/org/apache/fop/fo/flow/BlockContainer.java
@@ -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 {
diff --git a/src/org/apache/fop/fo/flow/Character.java b/src/org/apache/fop/fo/flow/Character.java
index 17243d949..632a8d678 100644
--- a/src/org/apache/fop/fo/flow/Character.java
+++ b/src/org/apache/fop/fo/flow/Character.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/ExternalGraphic.java b/src/org/apache/fop/fo/flow/ExternalGraphic.java
index 96689b8c4..ca8fe5edc 100644
--- a/src/org/apache/fop/fo/flow/ExternalGraphic.java
+++ b/src/org/apache/fop/fo/flow/ExternalGraphic.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/Flow.java b/src/org/apache/fop/fo/flow/Flow.java
index bdeb21db8..77d889a25 100644
--- a/src/org/apache/fop/fo/flow/Flow.java
+++ b/src/org/apache/fop/fo/flow/Flow.java
@@ -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
diff --git a/src/org/apache/fop/fo/flow/InitialPropertySet.java b/src/org/apache/fop/fo/flow/InitialPropertySet.java
index c24fea35e..dee6c2ac8 100644
--- a/src/org/apache/fop/fo/flow/InitialPropertySet.java
+++ b/src/org/apache/fop/fo/flow/InitialPropertySet.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/Inline.java b/src/org/apache/fop/fo/flow/Inline.java
index c25104ac3..dff52afda 100644
--- a/src/org/apache/fop/fo/flow/Inline.java
+++ b/src/org/apache/fop/fo/flow/Inline.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/InlineContainer.java b/src/org/apache/fop/fo/flow/InlineContainer.java
index d3a46f016..f6521cab4 100644
--- a/src/org/apache/fop/fo/flow/InlineContainer.java
+++ b/src/org/apache/fop/fo/flow/InlineContainer.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/org/apache/fop/fo/flow/InstreamForeignObject.java
index df30fccaf..95532dd35 100644
--- a/src/org/apache/fop/fo/flow/InstreamForeignObject.java
+++ b/src/org/apache/fop/fo/flow/InstreamForeignObject.java
@@ -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();
diff --git a/src/org/apache/fop/fo/flow/Leader.java b/src/org/apache/fop/fo/flow/Leader.java
index 92cbf999a..1cbe2bdf5 100644
--- a/src/org/apache/fop/fo/flow/Leader.java
+++ b/src/org/apache/fop/fo/flow/Leader.java
@@ -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
diff --git a/src/org/apache/fop/fo/flow/ListBlock.java b/src/org/apache/fop/fo/flow/ListBlock.java
index fc631a128..59393c06f 100644
--- a/src/org/apache/fop/fo/flow/ListBlock.java
+++ b/src/org/apache/fop/fo/flow/ListBlock.java
@@ -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);
}
diff --git a/src/org/apache/fop/fo/flow/ListItem.java b/src/org/apache/fop/fo/flow/ListItem.java
index 349352b1f..13363f497 100644
--- a/src/org/apache/fop/fo/flow/ListItem.java
+++ b/src/org/apache/fop/fo/flow/ListItem.java
@@ -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);
diff --git a/src/org/apache/fop/fo/flow/ListItemBody.java b/src/org/apache/fop/fo/flow/ListItemBody.java
index 0799bc17c..7a59d523d 100644
--- a/src/org/apache/fop/fo/flow/ListItemBody.java
+++ b/src/org/apache/fop/fo/flow/ListItemBody.java
@@ -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);
}
diff --git a/src/org/apache/fop/fo/flow/ListItemLabel.java b/src/org/apache/fop/fo/flow/ListItemLabel.java
index a8490306f..36a738610 100644
--- a/src/org/apache/fop/fo/flow/ListItemLabel.java
+++ b/src/org/apache/fop/fo/flow/ListItemLabel.java
@@ -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);
diff --git a/src/org/apache/fop/fo/flow/MultiCase.java b/src/org/apache/fop/fo/flow/MultiCase.java
index 5466ae270..cbf6e7264 100644
--- a/src/org/apache/fop/fo/flow/MultiCase.java
+++ b/src/org/apache/fop/fo/flow/MultiCase.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/MultiProperties.java b/src/org/apache/fop/fo/flow/MultiProperties.java
index 5ee51d855..3ba02e999 100644
--- a/src/org/apache/fop/fo/flow/MultiProperties.java
+++ b/src/org/apache/fop/fo/flow/MultiProperties.java
@@ -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);
}
diff --git a/src/org/apache/fop/fo/flow/MultiPropertySet.java b/src/org/apache/fop/fo/flow/MultiPropertySet.java
index be5c24183..cf2a9f12b 100644
--- a/src/org/apache/fop/fo/flow/MultiPropertySet.java
+++ b/src/org/apache/fop/fo/flow/MultiPropertySet.java
@@ -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);
diff --git a/src/org/apache/fop/fo/flow/MultiSwitch.java b/src/org/apache/fop/fo/flow/MultiSwitch.java
index b378f8003..8defde3a4 100644
--- a/src/org/apache/fop/fo/flow/MultiSwitch.java
+++ b/src/org/apache/fop/fo/flow/MultiSwitch.java
@@ -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);
}
diff --git a/src/org/apache/fop/fo/flow/MultiToggle.java b/src/org/apache/fop/fo/flow/MultiToggle.java
index 6f4f1402f..781e72866 100644
--- a/src/org/apache/fop/fo/flow/MultiToggle.java
+++ b/src/org/apache/fop/fo/flow/MultiToggle.java
@@ -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);
diff --git a/src/org/apache/fop/fo/flow/PageNumber.java b/src/org/apache/fop/fo/flow/PageNumber.java
index a1dfb10ce..59060e989 100644
--- a/src/org/apache/fop/fo/flow/PageNumber.java
+++ b/src/org/apache/fop/fo/flow/PageNumber.java
@@ -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);
}
diff --git a/src/org/apache/fop/fo/flow/PageNumberCitation.java b/src/org/apache/fop/fo/flow/PageNumberCitation.java
index 0c705a8af..6e812f8f1 100644
--- a/src/org/apache/fop/fo/flow/PageNumberCitation.java
+++ b/src/org/apache/fop/fo/flow/PageNumberCitation.java
@@ -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();
diff --git a/src/org/apache/fop/fo/flow/Table.java b/src/org/apache/fop/fo/flow/Table.java
index 6277ed606..899460d2a 100644
--- a/src/org/apache/fop/fo/flow/Table.java
+++ b/src/org/apache/fop/fo/flow/Table.java
@@ -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;
diff --git a/src/org/apache/fop/fo/flow/TableAndCaption.java b/src/org/apache/fop/fo/flow/TableAndCaption.java
index cca6c2ef7..5f1ec3148 100644
--- a/src/org/apache/fop/fo/flow/TableAndCaption.java
+++ b/src/org/apache/fop/fo/flow/TableAndCaption.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/TableBody.java b/src/org/apache/fop/fo/flow/TableBody.java
index 3ee7183cd..bbb22c42d 100644
--- a/src/org/apache/fop/fo/flow/TableBody.java
+++ b/src/org/apache/fop/fo/flow/TableBody.java
@@ -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());
}
}
diff --git a/src/org/apache/fop/fo/flow/TableCaption.java b/src/org/apache/fop/fo/flow/TableCaption.java
index fef34d462..40e29ad45 100644
--- a/src/org/apache/fop/fo/flow/TableCaption.java
+++ b/src/org/apache/fop/fo/flow/TableCaption.java
@@ -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");
diff --git a/src/org/apache/fop/fo/flow/TableCell.java b/src/org/apache/fop/fo/flow/TableCell.java
index 03276390f..dff24d463 100644
--- a/src/org/apache/fop/fo/flow/TableCell.java
+++ b/src/org/apache/fop/fo/flow/TableCell.java
@@ -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);
diff --git a/src/org/apache/fop/fo/flow/TableColumn.java b/src/org/apache/fop/fo/flow/TableColumn.java
index 45817d7e8..f3f894dc6 100644
--- a/src/org/apache/fop/fo/flow/TableColumn.java
+++ b/src/org/apache/fop/fo/flow/TableColumn.java
@@ -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;
diff --git a/src/org/apache/fop/fo/flow/TableRow.java b/src/org/apache/fop/fo/flow/TableRow.java
index 658d466ae..d481a1dd2 100644
--- a/src/org/apache/fop/fo/flow/TableRow.java
+++ b/src/org/apache/fop/fo/flow/TableRow.java
@@ -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() {
diff --git a/src/org/apache/fop/fo/pagination/PageSequence.java b/src/org/apache/fop/fo/pagination/PageSequence.java
index 374b1dd93..591df45f7 100644
--- a/src/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/org/apache/fop/fo/pagination/PageSequence.java
@@ -199,7 +199,7 @@ public class PageSequence extends FObj {
// this.properties.get("country");
// this.properties.get("language");
- // this.properties.get("id");
+ setupID();
}