aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/org/apache/fop/fo/flow/BlockContainer.java11
-rw-r--r--src/org/apache/fop/fo/flow/DisplayGraphic.java6
-rw-r--r--src/org/apache/fop/fo/flow/DisplayRule.java4
-rw-r--r--src/org/apache/fop/fo/flow/DisplaySequence.java3
4 files changed, 23 insertions, 1 deletions
diff --git a/src/org/apache/fop/fo/flow/BlockContainer.java b/src/org/apache/fop/fo/flow/BlockContainer.java
index b0c8df64a..848acc2dd 100644
--- a/src/org/apache/fop/fo/flow/BlockContainer.java
+++ b/src/org/apache/fop/fo/flow/BlockContainer.java
@@ -159,7 +159,11 @@ public class BlockContainer extends FObj {
this.properties.get("border-width").getLength().mvalue();
this.borderStyle =
this.properties.get("border-style").getEnum();
- }
+
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+ }
boolean prevChildMustKeepWithNext = false;
@@ -181,6 +185,9 @@ public class BlockContainer extends FObj {
areaContainer.setBorderColor(borderColor, borderColor, borderColor, borderColor);
areaContainer.start();
+ areaContainer.setAbsoluteHeight(area.getAbsoluteHeight());
+ areaContainer.setIDReferences(area.getIDReferences());
+
int numChildren = this.children.size();
for (int i = this.marker; i < numChildren; i++) {
FObj fo = (FObj) children.elementAt(i);
@@ -205,6 +212,8 @@ public class BlockContainer extends FObj {
prevChildMustKeepWithNext = true;
}
}
+ area.setAbsoluteHeight(areaContainer.getAbsoluteHeight());
+
areaContainer.end();
if (position == Position.ABSOLUTE)
areaContainer.setHeight(height);
diff --git a/src/org/apache/fop/fo/flow/DisplayGraphic.java b/src/org/apache/fop/fo/flow/DisplayGraphic.java
index 348833804..327d42b01 100644
--- a/src/org/apache/fop/fo/flow/DisplayGraphic.java
+++ b/src/org/apache/fop/fo/flow/DisplayGraphic.java
@@ -191,6 +191,12 @@ public class DisplayGraphic extends FObj {
area.addDisplaySpace(spaceBefore);
}
+ if ( marker == 0 ) {
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+ }
+
imageArea.start();
imageArea.end();
area.addChild(imageArea);
diff --git a/src/org/apache/fop/fo/flow/DisplayRule.java b/src/org/apache/fop/fo/flow/DisplayRule.java
index 383aed223..54845e8ac 100644
--- a/src/org/apache/fop/fo/flow/DisplayRule.java
+++ b/src/org/apache/fop/fo/flow/DisplayRule.java
@@ -132,6 +132,10 @@ public class DisplayRule extends FObj {
forcedStartOffset;
}
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+
RuleArea ruleArea = new RuleArea(fs,
area.getAllocationWidth(),
area.spaceLeft(),
diff --git a/src/org/apache/fop/fo/flow/DisplaySequence.java b/src/org/apache/fop/fo/flow/DisplaySequence.java
index 05571ffb9..79adfd79d 100644
--- a/src/org/apache/fop/fo/flow/DisplaySequence.java
+++ b/src/org/apache/fop/fo/flow/DisplaySequence.java
@@ -79,6 +79,9 @@ public class DisplaySequence extends FObj {
public Status layout(Area area) throws FOPException {
if (this.marker == START) {
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
this.marker = 0;
}
// this is such common code, perhaps it should be in the super class