aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-08-11 04:15:28 +0000
committerGlen Mazza <gmazza@apache.org>2004-08-11 04:15:28 +0000
commitcd6e57eb77f97de51c242bcff0aae1276b47b3b0 (patch)
treedf9f4e0b97a44d30110d51047a57b5879c6e13b3 /src
parent20980d3ae55d7adefea957a2ba210a2450014d34 (diff)
downloadxmlgraphics-fop-cd6e57eb77f97de51c242bcff0aae1276b47b3b0.tar.gz
xmlgraphics-fop-cd6e57eb77f97de51c242bcff0aae1276b47b3b0.zip
1. For maintenance and accuracy, centralized the setupID() functionality
from the various FO's to the FObj base class. 2. Created a lookup bitset in PropertySets to help accomplish the above. 3. Generally moved initialization code from the setup() methods to the addProperties() methods in the various FO subclasses. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197865 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/FObj.java49
-rw-r--r--src/java/org/apache/fop/fo/FObjMixed.java6
-rw-r--r--src/java/org/apache/fop/fo/PropertySets.java50
-rw-r--r--src/java/org/apache/fop/fo/flow/BasicLink.java1
-rw-r--r--src/java/org/apache/fop/fo/flow/BidiOverride.java1
-rw-r--r--src/java/org/apache/fop/fo/flow/Block.java1
-rw-r--r--src/java/org/apache/fop/fo/flow/BlockContainer.java45
-rw-r--r--src/java/org/apache/fop/fo/flow/Character.java54
-rw-r--r--src/java/org/apache/fop/fo/flow/ExternalGraphic.java1
-rw-r--r--src/java/org/apache/fop/fo/flow/InitialPropertySet.java36
-rw-r--r--src/java/org/apache/fop/fo/flow/Inline.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/InlineContainer.java34
-rw-r--r--src/java/org/apache/fop/fo/flow/Leader.java48
-rw-r--r--src/java/org/apache/fop/fo/flow/ListBlock.java1
-rw-r--r--src/java/org/apache/fop/fo/flow/ListItem.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/ListItemBody.java12
-rw-r--r--src/java/org/apache/fop/fo/flow/ListItemLabel.java12
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiCase.java13
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiProperties.java10
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiPropertySet.java8
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiSwitch.java11
-rw-r--r--src/java/org/apache/fop/fo/flow/MultiToggle.java14
-rw-r--r--src/java/org/apache/fop/fo/flow/PageNumber.java8
-rw-r--r--src/java/org/apache/fop/fo/flow/PageNumberCitation.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/Table.java81
-rw-r--r--src/java/org/apache/fop/fo/flow/TableAndCaption.java32
-rw-r--r--src/java/org/apache/fop/fo/flow/TableBody.java30
-rw-r--r--src/java/org/apache/fop/fo/flow/TableCaption.java32
-rw-r--r--src/java/org/apache/fop/fo/flow/TableCell.java37
-rw-r--r--src/java/org/apache/fop/fo/flow/TableColumn.java21
-rw-r--r--src/java/org/apache/fop/fo/flow/TableRow.java34
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequence.java1
32 files changed, 119 insertions, 572 deletions
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index ec12e84d5..68089e7f1 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -121,6 +121,33 @@ public class FObj extends FONode implements Constants {
propertyList.addAttributesToList(attlist);
propMgr = new PropertyManager(propertyList);
setWritingMode();
+
+ // if this FO can have a PR_ID, make sure it is unique
+ if (PropertySets.canHaveId(getNameId())) {
+ setupID();
+ }
+ }
+
+ /**
+ * Setup the id for this formatting object.
+ * Most formatting objects can have an id that can be referenced.
+ * This methods checks that the id isn't already used by another
+ * fo and sets the id attribute of this object.
+ */
+ private void setupID() {
+ Property prop = this.propertyList.get(PR_ID);
+ if (prop != null) {
+ String str = prop.getString();
+ if (str != null && !str.equals("")) {
+ Set idrefs = getFOInputHandler().getIDReferences();
+ if (!idrefs.contains(str)) {
+ id = str;
+ idrefs.add(id);
+ } else {
+ getLogger().warn("duplicate id:" + str + " ignored");
+ }
+ }
+ }
}
/**
@@ -286,28 +313,6 @@ public class FObj extends FONode implements Constants {
}
/**
- * Setup the id for this formatting object.
- * Most formatting objects can have an id that can be referenced.
- * This methods checks that the id isn't already used by another
- * fo and sets the id attribute of this object.
- */
- public void setupID() {
- Property prop = this.propertyList.get(PR_ID);
- if (prop != null) {
- String str = prop.getString();
- if (str != null && !str.equals("")) {
- Set idrefs = getFOInputHandler().getIDReferences();
- if (!idrefs.contains(str)) {
- id = str;
- idrefs.add(id);
- } else {
- getLogger().warn("duplicate id:" + str + " ignored");
- }
- }
- }
- }
-
- /**
* Get the id string for this formatting object.
* This will be unique for the fo document.
*
diff --git a/src/java/org/apache/fop/fo/FObjMixed.java b/src/java/org/apache/fop/fo/FObjMixed.java
index b6c6f6f9b..d5d272f6e 100644
--- a/src/java/org/apache/fop/fo/FObjMixed.java
+++ b/src/java/org/apache/fop/fo/FObjMixed.java
@@ -62,12 +62,6 @@ public class FObjMixed extends FObj {
addChildNode(ft);
}
- private void setup() {
- if (this.propertyList != null) {
- setupID();
- }
- }
-
/**
* @return iterator for this object
*/
diff --git a/src/java/org/apache/fop/fo/PropertySets.java b/src/java/org/apache/fop/fo/PropertySets.java
index e48381e85..0bb9f56f7 100644
--- a/src/java/org/apache/fop/fo/PropertySets.java
+++ b/src/java/org/apache/fop/fo/PropertySets.java
@@ -26,6 +26,7 @@ import java.util.ArrayList;
public class PropertySets {
private static short[][] mapping = null;
private static BitSet can_have_markers = null;
+ private static BitSet can_have_id = null;
private Element[] elements = new Element[Constants.ELEMENT_COUNT+1];
private BitSet block_elems = new BitSet();
@@ -968,8 +969,6 @@ public class PropertySets {
elem.addProperty(Constants.PR_RETRIEVE_POSITION);
elem.addProperty(Constants.PR_RETRIEVE_BOUNDARY);
-
-
// Merge the attributes from the children into the parent.
for (boolean dirty = true; dirty; ) {
dirty = false;
@@ -1040,6 +1039,53 @@ public class PropertySets {
}
/**
+ * Determines if the XSL "id" property is applicable for this FO
+ * @param elementId Constants enumeration ID of the FO (e.g., FO_ROOT)
+ * @return true if id property is applicable, false otherwise
+ * @todo see if we can stop merging properties applicable for the children
+ * of an FO into the FO in the mapping[] array above. If so, we can
+ * rely on getPropertySet() instead of this method.
+ */
+ public static boolean canHaveId(int elementId) {
+ if (can_have_id == null) {
+ can_have_id = new BitSet();
+ can_have_id.set(Constants.FO_BASIC_LINK);
+ can_have_id.set(Constants.FO_BIDI_OVERRIDE);
+ can_have_id.set(Constants.FO_BLOCK);
+ can_have_id.set(Constants.FO_BLOCK_CONTAINER);
+ can_have_id.set(Constants.FO_CHARACTER);
+ can_have_id.set(Constants.FO_EXTERNAL_GRAPHIC);
+ can_have_id.set(Constants.FO_INITIAL_PROPERTY_SET);
+ can_have_id.set(Constants.FO_INLINE);
+ can_have_id.set(Constants.FO_INLINE_CONTAINER);
+ can_have_id.set(Constants.FO_INSTREAM_FOREIGN_OBJECT);
+ can_have_id.set(Constants.FO_LEADER);
+ can_have_id.set(Constants.FO_LIST_BLOCK);
+ can_have_id.set(Constants.FO_LIST_ITEM);
+ can_have_id.set(Constants.FO_LIST_ITEM_BODY);
+ can_have_id.set(Constants.FO_LIST_ITEM_LABEL);
+ can_have_id.set(Constants.FO_MULTI_CASE);
+ can_have_id.set(Constants.FO_MULTI_PROPERTIES);
+ can_have_id.set(Constants.FO_MULTI_PROPERTY_SET);
+ can_have_id.set(Constants.FO_MULTI_SWITCH);
+ can_have_id.set(Constants.FO_MULTI_TOGGLE);
+ can_have_id.set(Constants.FO_PAGE_NUMBER);
+ can_have_id.set(Constants.FO_PAGE_NUMBER_CITATION);
+ can_have_id.set(Constants.FO_PAGE_SEQUENCE);
+ can_have_id.set(Constants.FO_TABLE_AND_CAPTION);
+ can_have_id.set(Constants.FO_TABLE);
+ can_have_id.set(Constants.FO_TABLE_BODY);
+ can_have_id.set(Constants.FO_TABLE_CAPTION);
+ can_have_id.set(Constants.FO_TABLE_CELL);
+ can_have_id.set(Constants.FO_TABLE_FOOTER);
+ can_have_id.set(Constants.FO_TABLE_HEADER);
+ can_have_id.set(Constants.FO_TABLE_ROW);
+ can_have_id.set(Constants.FO_WRAPPER);
+ }
+ return can_have_id.get(elementId);
+ }
+
+ /**
* An object that represent the properties and contents of a fo element
*/
class Element {
diff --git a/src/java/org/apache/fop/fo/flow/BasicLink.java b/src/java/org/apache/fop/fo/flow/BasicLink.java
index 2c5d29abf..d8cd6775a 100644
--- a/src/java/org/apache/fop/fo/flow/BasicLink.java
+++ b/src/java/org/apache/fop/fo/flow/BasicLink.java
@@ -60,7 +60,6 @@ public class BasicLink extends Inline {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- setupID();
// This logic is for determining the link represented by this FO.
String ext = propertyList.get(PR_EXTERNAL_DESTINATION).getString();
diff --git a/src/java/org/apache/fop/fo/flow/BidiOverride.java b/src/java/org/apache/fop/fo/flow/BidiOverride.java
index f942fa4d4..0e97b6d83 100644
--- a/src/java/org/apache/fop/fo/flow/BidiOverride.java
+++ b/src/java/org/apache/fop/fo/flow/BidiOverride.java
@@ -78,7 +78,6 @@ public class BidiOverride extends FObjMixed {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- setupID();
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/Block.java b/src/java/org/apache/fop/fo/flow/Block.java
index 8839fc9d0..537a0f553 100644
--- a/src/java/org/apache/fop/fo/flow/Block.java
+++ b/src/java/org/apache/fop/fo/flow/Block.java
@@ -110,7 +110,6 @@ public class Block extends FObjMixed {
this.lfTreatment =
this.propertyList.get(PR_LINEFEED_TREATMENT).getEnum();
- setupID();
this.align = this.propertyList.get(PR_TEXT_ALIGN).getEnum();
this.alignLast =
this.propertyList.get(PR_TEXT_ALIGN_LAST).getEnum();
diff --git a/src/java/org/apache/fop/fo/flow/BlockContainer.java b/src/java/org/apache/fop/fo/flow/BlockContainer.java
index d6562e78f..2f2813db5 100644
--- a/src/java/org/apache/fop/fo/flow/BlockContainer.java
+++ b/src/java/org/apache/fop/fo/flow/BlockContainer.java
@@ -25,10 +25,6 @@ import java.util.List;
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.properties.CommonAbsolutePosition;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonMarginBlock;
import org.apache.fop.layoutmgr.BlockContainerLayoutManager;
import org.xml.sax.Attributes;
@@ -65,44 +61,11 @@ public class BlockContainer extends FObj {
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
this.span = this.propertyList.get(PR_SPAN).getEnum();
- setupID();
- }
-
- private void setup() {
-
- // Common Accessibility Properties
- CommonAbsolutePosition mAbsProps = propMgr.getAbsolutePositionProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Margin-Block Properties
- CommonMarginBlock mProps = propMgr.getMarginProps();
-
- // this.propertyList.get("block-progression-dimension");
- // this.propertyList.get("break-after");
- // this.propertyList.get("break-before");
- // this.propertyList.get("clip");
- // this.propertyList.get("display-align");
- // this.propertyList.get("height");
- setupID();
- // this.propertyList.get("keep-together");
- // this.propertyList.get("keep-with-next");
- // this.propertyList.get("keep-with-previous");
- // this.propertyList.get("overflow");
- // this.propertyList.get("reference-orientation");
- // this.propertyList.get("span");
- // this.propertyList.get("width");
- // this.propertyList.get("writing-mode");
-
- this.backgroundColor =
- this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
-
- this.width = this.propertyList.get(PR_WIDTH).getLength().getValue();
- this.height = this.propertyList.get(PR_HEIGHT).getLength().getValue();
- span = this.propertyList.get(PR_SPAN).getEnum();
+ this.backgroundColor =
+ this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
+ this.width = this.propertyList.get(PR_WIDTH).getLength().getValue();
+ this.height = this.propertyList.get(PR_HEIGHT).getLength().getValue();
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/Character.java b/src/java/org/apache/fop/fo/flow/Character.java
index f3c76f504..681bbfaf3 100644
--- a/src/java/org/apache/fop/fo/flow/Character.java
+++ b/src/java/org/apache/fop/fo/flow/Character.java
@@ -29,13 +29,6 @@ import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.OneCharIterator;
import org.apache.fop.layoutmgr.AddLMVisitor;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonHyphenation;
-import org.apache.fop.fo.properties.CommonMarginInline;
-import org.apache.fop.fo.properties.CommonRelativePosition;
-import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.LMVisited;
/**
@@ -76,53 +69,6 @@ public class Character extends FObj implements LMVisited {
invalidChildError(loc, nsURI, localName);
}
- private void setup() throws FOPException {
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Font Properties
- //this.fontState = propMgr.getFontState(area.getFontInfo());
-
- // Common Hyphenation Properties
- CommonHyphenation mHyphProps = propMgr.getHyphenationProps();
-
- // Common Margin Properties-Inline
- CommonMarginInline mProps = propMgr.getMarginInlineProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps =
- propMgr.getRelativePositionProps();
-
- // this.propertyList.get("alignment-adjust");
- // this.propertyList.get("treat-as-word-space");
- // this.propertyList.get("alignment-baseline");
- // this.propertyList.get("baseline-shift");
- // this.propertyList.get("character");
- // this.propertyList.get("color");
- // this.propertyList.get("dominant-baseline");
- // this.propertyList.get("text-depth");
- // this.propertyList.get("text-altitude");
- // this.propertyList.get("glyph-orientation-horizontal");
- // this.propertyList.get("glyph-orientation-vertical");
- setupID();
- // this.propertyList.get("keep-with-next");
- // this.propertyList.get("keep-with-previous");
- // this.propertyList.get("letter-spacing");
- // this.propertyList.get("line-height");
- // this.propertyList.get("line-height-shift-adjustment");
- // this.propertyList.get("score-spaces");
- // this.propertyList.get("suppress-at-line-break");
- // this.propertyList.get("text-decoration");
- // this.propertyList.get("text-shadow");
- // this.propertyList.get("text-transform");
- // this.propertyList.get("word-spacing");
- }
-
/**
* @see org.apache.fop.fo.FObj#charIterator
*/
diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
index 53dcc67c6..82ff0cfff 100644
--- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
+++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
@@ -90,7 +90,6 @@ public class ExternalGraphic extends FObj {
* This gets the sizes for the image and the dimensions and clipping.
*/
private void setup() {
- setupID();
url = this.propertyList.get(PR_SRC).getString();
if (url == null) {
return;
diff --git a/src/java/org/apache/fop/fo/flow/InitialPropertySet.java b/src/java/org/apache/fop/fo/flow/InitialPropertySet.java
index e27399b8c..982d1b434 100644
--- a/src/java/org/apache/fop/fo/flow/InitialPropertySet.java
+++ b/src/java/org/apache/fop/fo/flow/InitialPropertySet.java
@@ -26,11 +26,6 @@ import org.xml.sax.SAXParseException;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.ToBeImplementedElement;
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonRelativePosition;
/**
* Class modelling the fo:initial-property-set object. See Sec. 6.6.4 of the
@@ -54,37 +49,6 @@ public class InitialPropertySet extends ToBeImplementedElement {
invalidChildError(loc, nsURI, localName);
}
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Font Properties
- //this.fontState = propMgr.getFontState(area.getFontInfo());
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
-
- // this.propertyList.get("color");
- setupID();
- // this.propertyList.get("letter-spacing");
- // this.propertyList.get("line-height");
- // this.propertyList.get("line-height-shift-adjustment");
- // this.propertyList.get("score-spaces");
- // this.propertyList.get("text-decoration");
- // this.propertyList.get("text-shadow");
- // this.propertyList.get("text-transform");
- // this.propertyList.get("word-spacing");
-
- }
-
public String getName() {
return "fo:initial-property-set";
}
diff --git a/src/java/org/apache/fop/fo/flow/Inline.java b/src/java/org/apache/fop/fo/flow/Inline.java
index e8077de83..4e97670dc 100644
--- a/src/java/org/apache/fop/fo/flow/Inline.java
+++ b/src/java/org/apache/fop/fo/flow/Inline.java
@@ -67,8 +67,6 @@ public class Inline extends FObjMixed {
+ " be directly under flow", locator);
}
- setupID();
-
int textDecoration = this.propertyList.get(PR_TEXT_DECORATION).getEnum();
if (textDecoration == TextDecoration.UNDERLINE) {
diff --git a/src/java/org/apache/fop/fo/flow/InlineContainer.java b/src/java/org/apache/fop/fo/flow/InlineContainer.java
index 602b617eb..c5251f63b 100644
--- a/src/java/org/apache/fop/fo/flow/InlineContainer.java
+++ b/src/java/org/apache/fop/fo/flow/InlineContainer.java
@@ -31,10 +31,6 @@ import org.apache.fop.layoutmgr.LayoutManager;
import org.apache.fop.layoutmgr.ICLayoutManager;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonMarginInline;
-import org.apache.fop.fo.properties.CommonRelativePosition;
/**
* Class modelling the fo:inline-container object. See Sec. 6.6.8 of the XSL-FO
@@ -54,36 +50,6 @@ public class InlineContainer extends FObj {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Margin Properties-Inline
- CommonMarginInline mProps = propMgr.getMarginInlineProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps =
- propMgr.getRelativePositionProps();
-
- // this.propertyList.get("alignment-adjust");
- // this.propertyList.get("alignment-baseline");
- // this.propertyList.get("baseline-shift");
- // this.propertyList.get("block-progression-dimension");
- // this.propertyList.get("clip");
- // this.propertyList.get("display-align");
- // this.propertyList.get("dominant-baseline");
- // this.propertyList.get("height");
- setupID();
- // this.propertyList.get("inline-progression-dimension");
- // this.propertyList.get("keep-together");
- // this.propertyList.get("keep-with-next");
- // this.propertyList.get("keep-with-previous");
- // this.propertyList.get("line-height");
- // this.propertyList.get("line-height-shift-adjustment");
- // this.propertyList.get("overflow");
- // this.propertyList.get("reference-orientation");
- // this.propertyList.get("width");
- // this.propertyList.get("writing-mode");
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java
index da38974c5..77c8e4c3f 100644
--- a/src/java/org/apache/fop/fo/flow/Leader.java
+++ b/src/java/org/apache/fop/fo/flow/Leader.java
@@ -23,12 +23,6 @@ import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.FONode;
import org.apache.fop.layoutmgr.AddLMVisitor;
import org.apache.fop.fo.FObjMixed;
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonMarginInline;
-import org.apache.fop.fo.properties.CommonRelativePosition;
import org.apache.fop.fo.properties.PercentLength;
import org.apache.fop.fonts.Font;
import org.apache.fop.fo.LMVisited;
@@ -54,49 +48,13 @@ public class Leader extends FObjMixed implements LMVisited {
super(parent);
}
+ /**
+ * @todo convert to addProperties()
+ */
private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
// Common Font Properties
this.fontState = propMgr.getFontState(getFOInputHandler().getFontInfo());
- // Common Margin Properties-Inline
- CommonMarginInline mProps = propMgr.getMarginInlineProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
-
- // this.propertyList.get("alignment-adjust");
- // this.propertyList.get("alignment-baseline");
- // this.propertyList.get("baseline-shift");
- // this.propertyList.get("color");
- // this.propertyList.get("dominant-baseline");
- // this.propertyList.get("text-depth");
- // this.propertyList.get("text-altitude");
- setupID();
- // this.propertyList.get("leader-alignment");
- // this.propertyList.get("leader-length");
- // this.propertyList.get("leader-pattern");
- // this.propertyList.get("leader-pattern-width");
- // this.propertyList.get("rule-style");
- // this.propertyList.get("rule-thickness");
- // this.propertyList.get("letter-spacing");
- // this.propertyList.get("line-height");
- // this.propertyList.get("line-height-shift-adjustment");
- // this.propertyList.get("text-shadow");
- // this.propertyList.get("visibility");
- // this.propertyList.get("word-spacing");
- // this.propertyList.get("z-index");
-
// color properties
ColorType c = this.propertyList.get(PR_COLOR).getColorType();
float red = c.getRed();
diff --git a/src/java/org/apache/fop/fo/flow/ListBlock.java b/src/java/org/apache/fop/fo/flow/ListBlock.java
index b58226aa1..e16d39ce7 100644
--- a/src/java/org/apache/fop/fo/flow/ListBlock.java
+++ b/src/java/org/apache/fop/fo/flow/ListBlock.java
@@ -67,7 +67,6 @@ public class ListBlock extends FObj {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- setupID();
this.align = this.propertyList.get(PR_TEXT_ALIGN).getEnum();
this.alignLast = this.propertyList.get(PR_TEXT_ALIGN_LAST).getEnum();
diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java
index 85b0528cb..49aaf4fe2 100644
--- a/src/java/org/apache/fop/fo/flow/ListItem.java
+++ b/src/java/org/apache/fop/fo/flow/ListItem.java
@@ -62,10 +62,6 @@ public class ListItem extends FObj {
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
getFOInputHandler().startListItem(this);
- }
-
- private void setup() {
- setupID();
this.align = this.propertyList.get(PR_TEXT_ALIGN).getEnum();
this.alignLast = this.propertyList.get(PR_TEXT_ALIGN_LAST).getEnum();
this.lineHeight =
diff --git a/src/java/org/apache/fop/fo/flow/ListItemBody.java b/src/java/org/apache/fop/fo/flow/ListItemBody.java
index 4e7c277f5..0c68947cb 100644
--- a/src/java/org/apache/fop/fo/flow/ListItemBody.java
+++ b/src/java/org/apache/fop/fo/flow/ListItemBody.java
@@ -21,7 +21,6 @@ package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.properties.CommonAccessibility;
/**
* Class modelling the fo:list-item-body object. See Sec. 6.8.4 of the XSL-FO
@@ -36,21 +35,16 @@ public class ListItemBody extends FObj {
super(parent);
}
+ /**
+ * @todo convert to addProperties()
+ */
private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- setupID();
- // this.propertyList.get("keep-together");
-
/*
* For calculating the lineage - The fo:list-item-body formatting object
* does not generate any areas. The fo:list-item-body formatting object
* returns the sequence of areas created by concatenating the sequences
* of areas returned by each of the child nodes of the fo:list-item-body.
*/
-
}
public String getName() {
diff --git a/src/java/org/apache/fop/fo/flow/ListItemLabel.java b/src/java/org/apache/fop/fo/flow/ListItemLabel.java
index 0980b766e..5b313f305 100644
--- a/src/java/org/apache/fop/fo/flow/ListItemLabel.java
+++ b/src/java/org/apache/fop/fo/flow/ListItemLabel.java
@@ -25,7 +25,6 @@ import org.xml.sax.SAXParseException;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.properties.CommonAccessibility;
/**
* Class modelling the fo:list-item-label object. See Sec. 6.8.5 of the XSL-FO
@@ -46,23 +45,12 @@ public class ListItemLabel extends FObj {
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
getFOInputHandler().startListLabel();
- }
-
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- setupID();
- // this.propertyList.get("keep-together");
-
/*
* For calculating the lineage - The fo:list-item-label formatting object
* does not generate any areas. The fo:list-item-label formatting object
* returns the sequence of areas created by concatenating the sequences
* of areas returned by each of the child nodes of the fo:list-item-label.
*/
-
}
protected void endOfNode() throws SAXParseException {
diff --git a/src/java/org/apache/fop/fo/flow/MultiCase.java b/src/java/org/apache/fop/fo/flow/MultiCase.java
index d15e31120..2a5b24e0f 100644
--- a/src/java/org/apache/fop/fo/flow/MultiCase.java
+++ b/src/java/org/apache/fop/fo/flow/MultiCase.java
@@ -21,7 +21,6 @@ package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.ToBeImplementedElement;
-import org.apache.fop.fo.properties.CommonAccessibility;
/**
* Class modelling the fo:multi-case object. See Sec. 6.9.4 of the XSL-FO
@@ -36,18 +35,6 @@ public class MultiCase extends ToBeImplementedElement {
super(parent);
}
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- setupID();
- // this.propertyList.get("starting-state");
- // this.propertyList.get("case-name");
- // this.propertyList.get("case-title");
-
- }
-
public String getName() {
return "fo:multi-case";
}
diff --git a/src/java/org/apache/fop/fo/flow/MultiProperties.java b/src/java/org/apache/fop/fo/flow/MultiProperties.java
index f241a5902..130dda6f0 100644
--- a/src/java/org/apache/fop/fo/flow/MultiProperties.java
+++ b/src/java/org/apache/fop/fo/flow/MultiProperties.java
@@ -21,7 +21,6 @@ package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.ToBeImplementedElement;
-import org.apache.fop.fo.properties.CommonAccessibility;
/**
* Class modelling the fo:multi-properties object. See Sec. 6.9.6 of the XSL-FO
@@ -36,15 +35,6 @@ public class MultiProperties extends ToBeImplementedElement {
super(parent);
}
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- setupID();
-
- }
-
public String getName() {
return "fo:multi-properties";
}
diff --git a/src/java/org/apache/fop/fo/flow/MultiPropertySet.java b/src/java/org/apache/fop/fo/flow/MultiPropertySet.java
index f4ebb7407..17dcaf543 100644
--- a/src/java/org/apache/fop/fo/flow/MultiPropertySet.java
+++ b/src/java/org/apache/fop/fo/flow/MultiPropertySet.java
@@ -49,11 +49,9 @@ public class MultiPropertySet extends ToBeImplementedElement {
invalidChildError(loc, nsURI, localName);
}
- private void setup() {
- setupID();
- // this.propertyList.get("active-state");
- }
-
+ /**
+ * @see org.apache.fop.fo.FObj#getName()
+ */
public String getName() {
return "fo:multi-property-set";
}
diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
index f14a155e9..3cf02c821 100644
--- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java
+++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java
@@ -21,7 +21,6 @@ package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.ToBeImplementedElement;
-import org.apache.fop.fo.properties.CommonAccessibility;
/**
* Class modelling the fo:multi-switch object. See Sec. 6.9.3 of the XSL-FO
@@ -36,16 +35,6 @@ public class MultiSwitch extends ToBeImplementedElement {
super(parent);
}
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // this.propertyList.get("auto-restore");
- setupID();
-
- }
-
public String getName() {
return "fo:multi-switch";
}
diff --git a/src/java/org/apache/fop/fo/flow/MultiToggle.java b/src/java/org/apache/fop/fo/flow/MultiToggle.java
index 25034ca26..60e42d1b3 100644
--- a/src/java/org/apache/fop/fo/flow/MultiToggle.java
+++ b/src/java/org/apache/fop/fo/flow/MultiToggle.java
@@ -21,7 +21,6 @@ package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.ToBeImplementedElement;
-import org.apache.fop.fo.properties.CommonAccessibility;
/**
* Class modelling the fo:multi-toggle property. See Sec. 6.9.5 of the XSL-FO
@@ -36,16 +35,9 @@ public class MultiToggle extends ToBeImplementedElement {
super(parent);
}
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- setupID();
- // this.propertyList.get("switch-to");
-
- }
-
+ /**
+ * @see org.apache.fop.fo.FObj#getName()
+ */
public String getName() {
return "fo:multi-toggle";
}
diff --git a/src/java/org/apache/fop/fo/flow/PageNumber.java b/src/java/org/apache/fop/fo/flow/PageNumber.java
index dfee543bd..dd69e26d7 100644
--- a/src/java/org/apache/fop/fo/flow/PageNumber.java
+++ b/src/java/org/apache/fop/fo/flow/PageNumber.java
@@ -67,22 +67,18 @@ public class PageNumber extends FObj {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- setup();
- getFOInputHandler().startPageNumber(this);
- }
- private void setup() {
// Common Font Properties
this.fontState = propMgr.getFontState(getFOInputHandler().getFontInfo());
- setupID();
-
ColorType c = this.propertyList.get(PR_COLOR).getColorType();
this.red = c.getRed();
this.green = c.getGreen();
this.blue = c.getBlue();
this.wrapOption = this.propertyList.get(PR_WRAP_OPTION).getEnum();
+
+ getFOInputHandler().startPageNumber(this);
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
index 9249d3461..57bb11d25 100644
--- a/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
+++ b/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
@@ -75,8 +75,6 @@ public class PageNumberCitation extends FObj {
// Common Font Properties
this.fontState = propMgr.getFontState(getFOInputHandler().getFontInfo());
- setupID();
-
ColorType c = this.propertyList.get(PR_COLOR).getColorType();
this.red = c.getRed();
this.green = c.getGreen();
diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java
index e78274576..b28fea982 100644
--- a/src/java/org/apache/fop/fo/flow/Table.java
+++ b/src/java/org/apache/fop/fo/flow/Table.java
@@ -81,68 +81,6 @@ public class Table extends FObj implements LMVisited {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- setupID();
- getFOInputHandler().startTable(this);
- }
-
- /**
- * @see org.apache.fop.fo.FONode#addChildNode(FONode)
- */
- protected void addChildNode(FONode child) {
- if (child.getName().equals("fo:table-column")) {
- if (columns == null) {
- columns = new ArrayList();
- }
- columns.add(((TableColumn)child));
- } else if (child.getName().equals("fo:table-footer")) {
- tableFooter = (TableBody)child;
- } else if (child.getName().equals("fo:table-header")) {
- tableHeader = (TableBody)child;
- } else {
- // add bodies
- super.addChildNode(child);
- }
- }
-
- private void setup() {
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Margin Properties-Block
- CommonMarginBlock mProps = propMgr.getMarginProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps =
- propMgr.getRelativePositionProps();
-
- // this.propertyList.get("block-progression-dimension");
- // this.propertyList.get("border-after-precendence");
- // this.propertyList.get("border-before-precedence");
- // this.propertyList.get("border-collapse");
- // this.propertyList.get("border-end-precendence");
- // this.propertyList.get("border-separation");
- // this.propertyList.get("border-start-precendence");
- // this.propertyList.get("break-after");
- // this.propertyList.get("break-before");
- setupID();
- // this.propertyList.get("inline-progression-dimension");
- // this.propertyList.get("height");
- // this.propertyList.get("keep-together");
- // this.propertyList.get("keep-with-next");
- // this.propertyList.get("keep-with-previous");
- // this.propertyList.get("table-layout");
- // this.propertyList.get("table-omit-footer-at-break");
- // this.propertyList.get("table-omit-header-at-break");
- // this.propertyList.get("width");
- // this.propertyList.get("writing-mode");
-
this.breakBefore = this.propertyList.get(PR_BREAK_BEFORE).getEnum();
this.breakAfter = this.propertyList.get(PR_BREAK_AFTER).getEnum();
this.spaceBefore = this.propertyList.get(
@@ -163,7 +101,26 @@ public class Table extends FObj implements LMVisited {
this.omitFooterAtBreak = this.propertyList.get(
PR_TABLE_OMIT_FOOTER_AT_BREAK).getEnum()
== TableOmitFooterAtBreak.TRUE;
+ getFOInputHandler().startTable(this);
+ }
+ /**
+ * @see org.apache.fop.fo.FONode#addChildNode(FONode)
+ */
+ protected void addChildNode(FONode child) {
+ if (child.getName().equals("fo:table-column")) {
+ if (columns == null) {
+ columns = new ArrayList();
+ }
+ columns.add(((TableColumn)child));
+ } else if (child.getName().equals("fo:table-footer")) {
+ tableFooter = (TableBody)child;
+ } else if (child.getName().equals("fo:table-header")) {
+ tableHeader = (TableBody)child;
+ } else {
+ // add bodies
+ super.addChildNode(child);
+ }
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/TableAndCaption.java b/src/java/org/apache/fop/fo/flow/TableAndCaption.java
index 7f2b671db..caa8ee189 100644
--- a/src/java/org/apache/fop/fo/flow/TableAndCaption.java
+++ b/src/java/org/apache/fop/fo/flow/TableAndCaption.java
@@ -21,12 +21,6 @@ package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.ToBeImplementedElement;
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonMarginBlock;
-import org.apache.fop.fo.properties.CommonRelativePosition;
/**
* Class modelling the fo:table-and-caption property. See Sec. 6.7.2 of the
@@ -41,32 +35,6 @@ public class TableAndCaption extends ToBeImplementedElement {
super(parent);
}
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Margin Properties-Block
- CommonMarginBlock mProps = propMgr.getMarginProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
-
- // this.propertyList.get("caption-side");
- setupID();
- // this.propertyList.get("keep-together");
- // this.propertyList.get("keep-with-next");
- // this.propertyList.get("keep-with-previous");
-
- }
-
/**
* @return false (TableAndCaption doesn't generate inline areas)
*/
diff --git a/src/java/org/apache/fop/fo/flow/TableBody.java b/src/java/org/apache/fop/fo/flow/TableBody.java
index c9aa41528..1b4ef4804 100644
--- a/src/java/org/apache/fop/fo/flow/TableBody.java
+++ b/src/java/org/apache/fop/fo/flow/TableBody.java
@@ -28,15 +28,8 @@ import org.apache.fop.datatypes.ColorType;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.layoutmgr.AddLMVisitor;
-
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonRelativePosition;
import org.apache.fop.fo.LMVisited;
-
/**
* Class modelling the fo:table-body object. See Sec. 6.7.8 of the XSL-FO
* Standard.
@@ -59,34 +52,13 @@ public class TableBody extends FObj implements LMVisited {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- setupID();
- getFOInputHandler().startBody(this);
- }
-
- private void setup() {
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps =
- propMgr.getRelativePositionProps();
-
- setupID();
-
this.spaceBefore = this.propertyList.get(
PR_SPACE_BEFORE | CP_OPTIMUM).getLength().getValue();
this.spaceAfter = this.propertyList.get(
PR_SPACE_AFTER | CP_OPTIMUM).getLength().getValue();
this.backgroundColor =
this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
-
+ getFOInputHandler().startBody(this);
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/TableCaption.java b/src/java/org/apache/fop/fo/flow/TableCaption.java
index 1a5816702..3bf29323c 100644
--- a/src/java/org/apache/fop/fo/flow/TableCaption.java
+++ b/src/java/org/apache/fop/fo/flow/TableCaption.java
@@ -21,11 +21,6 @@ package org.apache.fop.fo.flow;
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.ToBeImplementedElement;
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonRelativePosition;
/**
* Class modelling the fo:table-caption object. See Sec. 6.7.5 of the XSL-FO
@@ -40,33 +35,6 @@ public class TableCaption extends ToBeImplementedElement {
super(parent);
}
- /**
- * Initialize property values.
- */
- private void setup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
-
- // this.propertyList.get("block-progression-dimension");
- // this.propertyList.get("height");
- setupID();
- // this.propertyList.get("inline-progression-dimension");
- // this.propertyList.get("keep-togethe");
- // this.propertyList.get("width");
-
- }
-
public String getName() {
return "fo:table-caption";
}
diff --git a/src/java/org/apache/fop/fo/flow/TableCell.java b/src/java/org/apache/fop/fo/flow/TableCell.java
index 72c02d79c..8907f5957 100644
--- a/src/java/org/apache/fop/fo/flow/TableCell.java
+++ b/src/java/org/apache/fop/fo/flow/TableCell.java
@@ -31,12 +31,7 @@ import org.apache.fop.datatypes.ColorType;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.layoutmgr.table.Cell;
-
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonRelativePosition;
/**
* Class modelling the fo:table-cell object. See Sec. 6.7.10 of the XSL-FO
@@ -168,36 +163,10 @@ public class TableCell extends FObj {
return numRowsSpanned;
}
+ /**
+ * @todo convert to addProperties()
+ */
private void doSetup() {
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
-
- // this.propertyList.get("border-after-precedence");
- // this.propertyList.get("border-before-precendence");
- // this.propertyList.get("border-end-precendence");
- // this.propertyList.get("border-start-precendence");
- // this.propertyList.get("block-progression-dimension");
- // this.propertyList.get("column-number");
- // this.propertyList.get("display-align");
- // this.propertyList.get("relative-align");
- // this.propertyList.get("empty-cells");
- // this.propertyList.get("ends-row");
- // this.propertyList.get("height");
- setupID();
- // this.propertyList.get("number-columns-spanned");
- // this.propertyList.get("number-rows-spanned");
- // this.propertyList.get("starts-row");
- // this.propertyList.get("width");
this.iColNumber =
propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue();
diff --git a/src/java/org/apache/fop/fo/flow/TableColumn.java b/src/java/org/apache/fop/fo/flow/TableColumn.java
index 9350eaa7d..31cc896c7 100644
--- a/src/java/org/apache/fop/fo/flow/TableColumn.java
+++ b/src/java/org/apache/fop/fo/flow/TableColumn.java
@@ -29,9 +29,6 @@ import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-
/**
* Class modelling the fo:table-column object. See Sec. 6.7.4 of the XSL-FO
* Standard.
@@ -93,19 +90,10 @@ public class TableColumn extends FObj {
return numColumnsRepeated;
}
+ /**
+ * @todo convert to addProperties()
+ */
public void initialize() {
-
- // Common Border, Padding, and Background Properties
- // only background apply, border apply if border-collapse
- // is collapse.
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // this.propertyList.get("column-width");
- // this.propertyList.get("number-columns-repeated");
- // this.propertyList.get("number-columns-spanned");
- // this.propertyList.get("visibility");
-
iColumnNumber = propertyList.get(PR_COLUMN_NUMBER).getNumber().intValue();
numColumnsRepeated =
@@ -116,9 +104,6 @@ public class TableColumn extends FObj {
columnWidth = this.propertyList.get(PR_COLUMN_WIDTH).getLength();
- // initialize id
- setupID();
-
initialized = true;
}
diff --git a/src/java/org/apache/fop/fo/flow/TableRow.java b/src/java/org/apache/fop/fo/flow/TableRow.java
index d45be3bc8..3e05c43ef 100644
--- a/src/java/org/apache/fop/fo/flow/TableRow.java
+++ b/src/java/org/apache/fop/fo/flow/TableRow.java
@@ -32,12 +32,6 @@ import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.layoutmgr.table.Row;
import org.apache.fop.fo.Constants;
-
-import org.apache.fop.fo.properties.CommonAccessibility;
-import org.apache.fop.fo.properties.CommonAural;
-import org.apache.fop.fo.properties.CommonBackground;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonRelativePosition;
import org.apache.fop.fo.properties.Property;
@@ -70,7 +64,6 @@ public class TableRow extends FObj {
*/
protected void addProperties(Attributes attlist) throws SAXParseException {
super.addProperties(attlist);
- setupID();
getFOInputHandler().startRow(this);
}
@@ -82,33 +75,6 @@ public class TableRow extends FObj {
}
private void doSetup() {
-
- // Common Accessibility Properties
- CommonAccessibility mAccProps = propMgr.getAccessibilityProps();
-
- // this.propertyList.get("block-progression-dimension");
-
- // Common Aural Properties
- CommonAural mAurProps = propMgr.getAuralProps();
-
- // Common Border, Padding, and Background Properties
- // only background apply, border apply if border-collapse
- // is collapse.
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
-
- // Common Relative Position Properties
- CommonRelativePosition mRelProps = propMgr.getRelativePositionProps();
-
- // this.propertyList.get("break-before");
- // this.propertyList.get("break-after");
- setupID();
- // this.propertyList.get("height");
- // this.propertyList.get("keep-together");
- // this.propertyList.get("keep-with-next");
- // this.propertyList.get("keep-with-previous");
-
-
this.breakAfter = this.propertyList.get(PR_BREAK_AFTER).getEnum();
this.backgroundColor =
this.propertyList.get(PR_BACKGROUND_COLOR).getColorType();
diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java
index f29708d4c..5f1631ee3 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java
@@ -287,7 +287,6 @@ public class PageSequence extends FObj {
// this.propertyList.get("country");
// this.propertyList.get("language");
- setupID();
//call startStructuredPageSequence to ensure, that startPageSequence is called
//before startFlow.