diff options
-rw-r--r-- | src/org/apache/fop/fo/flow/DisplayGraphic.java | 10 | ||||
-rw-r--r-- | src/org/apache/fop/fo/flow/InlineGraphic.java | 9 | ||||
-rw-r--r-- | src/org/apache/fop/fo/flow/ListItem.java | 14 | ||||
-rw-r--r-- | src/org/apache/fop/fo/flow/Table.java | 11 | ||||
-rw-r--r-- | src/org/apache/fop/fo/flow/TableBody.java | 10 | ||||
-rw-r--r-- | src/org/apache/fop/fo/flow/TableCell.java | 10 | ||||
-rw-r--r-- | src/org/apache/fop/fo/flow/TableRow.java | 10 |
7 files changed, 49 insertions, 25 deletions
diff --git a/src/org/apache/fop/fo/flow/DisplayGraphic.java b/src/org/apache/fop/fo/flow/DisplayGraphic.java index b480ff833..91d6ba69d 100644 --- a/src/org/apache/fop/fo/flow/DisplayGraphic.java +++ b/src/org/apache/fop/fo/flow/DisplayGraphic.java @@ -89,6 +89,7 @@ public class DisplayGraphic extends FObj { String href; int height; int width; + String id; ImageArea imageArea; @@ -130,6 +131,10 @@ public class DisplayGraphic extends FObj { this.properties.get("width").getLength().mvalue(); this.height = this.properties.get("height").getLength().mvalue(); + this.id = + this.properties.get("id").getString(); + + area.getIDReferences().createID(id); if (area instanceof BlockArea) { area.end(); @@ -193,9 +198,8 @@ public class DisplayGraphic extends FObj { } if ( marker == 0 ) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); + // configure id + area.getIDReferences().configureID(id,area); } imageArea.start(); diff --git a/src/org/apache/fop/fo/flow/InlineGraphic.java b/src/org/apache/fop/fo/flow/InlineGraphic.java index 3a721d879..e94836f0e 100644 --- a/src/org/apache/fop/fo/flow/InlineGraphic.java +++ b/src/org/apache/fop/fo/flow/InlineGraphic.java @@ -90,6 +90,7 @@ public class InlineGraphic extends FObj { String href; int height; int width; + String id; ImageArea imageArea; @@ -133,6 +134,9 @@ public class InlineGraphic extends FObj { this.height = this.properties.get("height").getLength().mvalue(); + this.id = this.properties.get("id").getString(); + + area.getIDReferences().createID(id); if (area instanceof BlockArea) { area.end(); @@ -196,9 +200,8 @@ public class InlineGraphic extends FObj { } if (marker == 0) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); + // configure id + area.getIDReferences().configureID(id,area); } imageArea.start(); diff --git a/src/org/apache/fop/fo/flow/ListItem.java b/src/org/apache/fop/fo/flow/ListItem.java index 204c9c8dd..541687fea 100644 --- a/src/org/apache/fop/fo/flow/ListItem.java +++ b/src/org/apache/fop/fo/flow/ListItem.java @@ -85,6 +85,7 @@ public class ListItem extends FObj { int endIndent; int spaceBefore; int spaceAfter; + String id; public ListItem(FObj parent, PropertyList propertyList) { super(parent, propertyList); @@ -118,6 +119,10 @@ 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); this.marker = 0; } @@ -131,12 +136,6 @@ public class ListItem extends FObj { area.addDisplaySpace(spaceBefore); } - if ( marker==0 ) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); - } - startIndent += this.bodyIndent; BlockArea blockArea = @@ -172,6 +171,9 @@ public class ListItem extends FObj { // body failed completely or only got some text in if (this.marker == 0) { + // configure id + area.getIDReferences().configureID(id,area); + status = label.layout(blockArea); if (status.isIncomplete()) { return status; diff --git a/src/org/apache/fop/fo/flow/Table.java b/src/org/apache/fop/fo/flow/Table.java index 81f8b6e2c..1da227493 100644 --- a/src/org/apache/fop/fo/flow/Table.java +++ b/src/org/apache/fop/fo/flow/Table.java @@ -86,7 +86,7 @@ public class Table extends FObj { ColorType borderColor; int borderWidth; int borderStyle; - + String id; Vector columns = new Vector(); int currentColumnNumber = 0; @@ -136,11 +136,15 @@ public class Table extends FObj { this.properties.get("border-width").getLength().mvalue(); this.borderStyle = this.properties.get("border-style").getEnum(); + this. id = + this.properties.get("id").getString(); if (area instanceof BlockArea) { area.end(); } + area.getIDReferences().createID(id); + this.marker = 0; if (breakBefore == BreakBefore.PAGE) { @@ -161,9 +165,8 @@ public class Table extends FObj { } if ( marker==0 ) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); + // configure id + area.getIDReferences().configureID(id,area); } this.areaContainer = diff --git a/src/org/apache/fop/fo/flow/TableBody.java b/src/org/apache/fop/fo/flow/TableBody.java index 6f3110c74..d5139c948 100644 --- a/src/org/apache/fop/fo/flow/TableBody.java +++ b/src/org/apache/fop/fo/flow/TableBody.java @@ -78,6 +78,7 @@ public class TableBody extends FObj { int spaceBefore; int spaceAfter; ColorType backgroundColor; + String id; Vector columns; @@ -115,7 +116,11 @@ 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); + if (area instanceof BlockArea) { area.end(); } @@ -133,9 +138,8 @@ public class TableBody extends FObj { } if ( marker==0 ) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); + // configure id + area.getIDReferences().configureID(id,area); } this.areaContainer = diff --git a/src/org/apache/fop/fo/flow/TableCell.java b/src/org/apache/fop/fo/flow/TableCell.java index b8dc13b98..fbf7b758d 100644 --- a/src/org/apache/fop/fo/flow/TableCell.java +++ b/src/org/apache/fop/fo/flow/TableCell.java @@ -83,6 +83,7 @@ public class TableCell extends FObj { int paddingLeft; int paddingRight; int position; + String id; protected int startOffset; protected int width; @@ -148,6 +149,8 @@ public class TableCell 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(); if (area instanceof BlockArea) { area.end(); @@ -157,6 +160,8 @@ public class TableCell extends FObj { //startIndent += bodyIndent + distanceBetweenStarts; //} + area.getIDReferences().createID(id); + this.marker = 0; } @@ -166,9 +171,8 @@ public class TableCell extends FObj { } if ( marker==0 ) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); + // configure id + area.getIDReferences().configureID(id,area); } this.areaContainer = diff --git a/src/org/apache/fop/fo/flow/TableRow.java b/src/org/apache/fop/fo/flow/TableRow.java index efeef4142..52396cbe3 100644 --- a/src/org/apache/fop/fo/flow/TableRow.java +++ b/src/org/apache/fop/fo/flow/TableRow.java @@ -79,6 +79,7 @@ public class TableRow extends FObj { int spaceBefore; int spaceAfter; ColorType backgroundColor; + String id; ColorType borderColor; int borderWidth; @@ -129,11 +130,15 @@ public class TableRow extends FObj { this.properties.get("border-width").getLength().mvalue(); this.borderStyle = this.properties.get("border-style").getEnum(); + this.id= + this.properties.get("id").getString(); if (area instanceof BlockArea) { area.end(); } + area.getIDReferences().createID(id); + this.marker = 0; } @@ -143,9 +148,8 @@ public class TableRow extends FObj { } if ( marker==0 ) { - // initialize id - String id = this.properties.get("id").getString(); - area.getIDReferences().initializeID(id,area); + // configure id + area.getIDReferences().configureID(id,area); } this.areaContainer = |