aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop
diff options
context:
space:
mode:
authorJordan Naftolin <jordan@apache.org>2000-06-22 00:25:45 +0000
committerJordan Naftolin <jordan@apache.org>2000-06-22 00:25:45 +0000
commitb0511113c44e44d32ce818d2a49462aa78ffbd9c (patch)
treedc7c604b4cc47b174bbca24d6c0cfbf49b32eb7c /src/org/apache/fop
parent395c91ae95d57c1b4c19c1dc35f3f5b2eb9b5011 (diff)
downloadxmlgraphics-fop-b0511113c44e44d32ce818d2a49462aa78ffbd9c.tar.gz
xmlgraphics-fop-b0511113c44e44d32ce818d2a49462aa78ffbd9c.zip
added id support (required for internal-links)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193431 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop')
-rw-r--r--src/org/apache/fop/fo/flow/InlineGraphic.java6
-rw-r--r--src/org/apache/fop/fo/flow/ListBlock.java7
-rw-r--r--src/org/apache/fop/fo/flow/ListItem.java7
-rw-r--r--src/org/apache/fop/fo/flow/ListItemBody.java4
-rw-r--r--src/org/apache/fop/fo/flow/ListItemLabel.java5
-rw-r--r--src/org/apache/fop/fo/flow/PageNumber.java5
-rw-r--r--src/org/apache/fop/fo/flow/PageNumberCitation.java5
-rw-r--r--src/org/apache/fop/fo/flow/SimpleLink.java3
-rw-r--r--src/org/apache/fop/fo/flow/Table.java7
-rw-r--r--src/org/apache/fop/fo/flow/TableBody.java7
-rw-r--r--src/org/apache/fop/fo/flow/TableCell.java7
-rw-r--r--src/org/apache/fop/fo/flow/TableColumn.java4
-rw-r--r--src/org/apache/fop/fo/flow/TableRow.java7
13 files changed, 73 insertions, 1 deletions
diff --git a/src/org/apache/fop/fo/flow/InlineGraphic.java b/src/org/apache/fop/fo/flow/InlineGraphic.java
index 5baee4cbf..4b3073cb2 100644
--- a/src/org/apache/fop/fo/flow/InlineGraphic.java
+++ b/src/org/apache/fop/fo/flow/InlineGraphic.java
@@ -194,6 +194,12 @@ public class InlineGraphic 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/ListBlock.java b/src/org/apache/fop/fo/flow/ListBlock.java
index 607f1b4c0..76357c650 100644
--- a/src/org/apache/fop/fo/flow/ListBlock.java
+++ b/src/org/apache/fop/fo/flow/ListBlock.java
@@ -151,7 +151,11 @@ public class ListBlock extends FObj {
endIndent += area.getAllocationWidth() - forcedWidth -
forcedStartOffset;
}
- }
+
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+ }
BlockArea blockArea =
new BlockArea(fs, area.getAllocationWidth(),
@@ -162,6 +166,7 @@ public class ListBlock extends FObj {
blockArea.start();
blockArea.setAbsoluteHeight(area.getAbsoluteHeight());
+ blockArea.setIDReferences(area.getIDReferences());
int numChildren = this.children.size();
for (int i = this.marker; i < numChildren; i++) {
diff --git a/src/org/apache/fop/fo/flow/ListItem.java b/src/org/apache/fop/fo/flow/ListItem.java
index b3f0afe9b..204c9c8dd 100644
--- a/src/org/apache/fop/fo/flow/ListItem.java
+++ b/src/org/apache/fop/fo/flow/ListItem.java
@@ -131,6 +131,12 @@ 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 =
@@ -141,6 +147,7 @@ public class ListItem extends FObj {
blockArea.start();
blockArea.setAbsoluteHeight(area.getAbsoluteHeight());
+ blockArea.setIDReferences(area.getIDReferences());
int numChildren = this.children.size();
if (numChildren != 2) {
diff --git a/src/org/apache/fop/fo/flow/ListItemBody.java b/src/org/apache/fop/fo/flow/ListItemBody.java
index 167b6502e..b98b33db4 100644
--- a/src/org/apache/fop/fo/flow/ListItemBody.java
+++ b/src/org/apache/fop/fo/flow/ListItemBody.java
@@ -82,7 +82,11 @@ public class ListItemBody extends FObj {
public Status layout(Area area) throws FOPException {
if (this.marker == START) {
this.marker = 0;
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
}
+
int numChildren = this.children.size();
for (int i = this.marker; i < numChildren; i++) {
FObj fo = (FObj) children.elementAt(i);
diff --git a/src/org/apache/fop/fo/flow/ListItemLabel.java b/src/org/apache/fop/fo/flow/ListItemLabel.java
index 040326fb0..b06eb7d73 100644
--- a/src/org/apache/fop/fo/flow/ListItemLabel.java
+++ b/src/org/apache/fop/fo/flow/ListItemLabel.java
@@ -85,6 +85,11 @@ public class ListItemLabel extends FObj {
if (numChildren != 1) {
throw new FOPException("list-item-label must have exactly one block in this version of FOP");
}
+
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+
Block block = (Block) children.elementAt(0);
block.setIsInLabel();
diff --git a/src/org/apache/fop/fo/flow/PageNumber.java b/src/org/apache/fop/fo/flow/PageNumber.java
index 7a5c53ffa..fb37c4811 100644
--- a/src/org/apache/fop/fo/flow/PageNumber.java
+++ b/src/org/apache/fop/fo/flow/PageNumber.java
@@ -109,7 +109,12 @@ public class PageNumber extends FObj {
this.whiteSpaceTreatment = this.properties.get("white-space-treatment").getEnum();
this.marker = 0;
+
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
}
+
String p = Integer.toString(area.getPage().getNumber());
this.marker = ((BlockArea) area).addText(fs, red, green, blue,
wrapOption,
diff --git a/src/org/apache/fop/fo/flow/PageNumberCitation.java b/src/org/apache/fop/fo/flow/PageNumberCitation.java
index 71cc19415..94054bd97 100644
--- a/src/org/apache/fop/fo/flow/PageNumberCitation.java
+++ b/src/org/apache/fop/fo/flow/PageNumberCitation.java
@@ -192,7 +192,12 @@ public class PageNumberCitation extends FObj
this.whiteSpaceTreatment = this.properties.get("white-space-treatment").getEnum();
this.marker = 0;
+
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
}
+
if(idPageNumber <0)
{
FObj root;
diff --git a/src/org/apache/fop/fo/flow/SimpleLink.java b/src/org/apache/fop/fo/flow/SimpleLink.java
index 51ee0ca48..64e5f0a05 100644
--- a/src/org/apache/fop/fo/flow/SimpleLink.java
+++ b/src/org/apache/fop/fo/flow/SimpleLink.java
@@ -107,6 +107,9 @@ public class SimpleLink extends FObjMixed {
}
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/Table.java b/src/org/apache/fop/fo/flow/Table.java
index f019d3040..f4ffeb68a 100644
--- a/src/org/apache/fop/fo/flow/Table.java
+++ b/src/org/apache/fop/fo/flow/Table.java
@@ -159,6 +159,12 @@ public class Table extends FObj {
area.addDisplaySpace(spaceBefore);
}
+ if ( marker==0 ) {
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+ }
+
this.areaContainer =
new AreaContainer(fs, 0, 0, area.getAllocationWidth(),
area.spaceLeft(), Position.STATIC);
@@ -170,6 +176,7 @@ public class Table extends FObj {
areaContainer.start();
areaContainer.setAbsoluteHeight(area.getAbsoluteHeight());
+ areaContainer.setIDReferences(area.getIDReferences());
// added by Eric Schaeffer
currentColumnNumber = 0;
diff --git a/src/org/apache/fop/fo/flow/TableBody.java b/src/org/apache/fop/fo/flow/TableBody.java
index 4a9b8d26d..6f3110c74 100644
--- a/src/org/apache/fop/fo/flow/TableBody.java
+++ b/src/org/apache/fop/fo/flow/TableBody.java
@@ -132,6 +132,12 @@ public class TableBody extends FObj {
area.addDisplaySpace(spaceBefore);
}
+ if ( marker==0 ) {
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+ }
+
this.areaContainer =
new AreaContainer(fs, -area.borderWidthLeft, -area.borderWidthTop, area.getAllocationWidth(),
area.spaceLeft(), Position.RELATIVE);
@@ -140,6 +146,7 @@ public class TableBody extends FObj {
areaContainer.start();
areaContainer.setAbsoluteHeight(area.getAbsoluteHeight());
+ areaContainer.setIDReferences(area.getIDReferences());
int numChildren = this.children.size();
for (int i = this.marker; i < numChildren; i++) {
diff --git a/src/org/apache/fop/fo/flow/TableCell.java b/src/org/apache/fop/fo/flow/TableCell.java
index 13174ceef..b8dc13b98 100644
--- a/src/org/apache/fop/fo/flow/TableCell.java
+++ b/src/org/apache/fop/fo/flow/TableCell.java
@@ -165,6 +165,12 @@ public class TableCell extends FObj {
area.addDisplaySpace(spaceBefore);
}
+ if ( marker==0 ) {
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+ }
+
this.areaContainer =
new AreaContainer(fs, startOffset - area.borderWidthLeft,
- area.borderWidthTop,
@@ -179,6 +185,7 @@ public class TableCell extends FObj {
areaContainer.start();
areaContainer.setAbsoluteHeight(area.getAbsoluteHeight());
+ areaContainer.setIDReferences(area.getIDReferences());
areaContainer.setTableCellXOffset(startOffset);
int numChildren = this.children.size();
for (int i = this.marker; i < numChildren; i++) {
diff --git a/src/org/apache/fop/fo/flow/TableColumn.java b/src/org/apache/fop/fo/flow/TableColumn.java
index fe0ca4064..2efa937cb 100644
--- a/src/org/apache/fop/fo/flow/TableColumn.java
+++ b/src/org/apache/fop/fo/flow/TableColumn.java
@@ -121,6 +121,10 @@ public class TableColumn extends FObj {
this.properties.get("border-style").getEnum();
this.columnWidth =
this.properties.get("column-width").getLength().mvalue();
+
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(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 f8bc1875d..e9ebc8bc5 100644
--- a/src/org/apache/fop/fo/flow/TableRow.java
+++ b/src/org/apache/fop/fo/flow/TableRow.java
@@ -141,6 +141,12 @@ public class TableRow extends FObj {
area.addDisplaySpace(spaceBefore);
}
+ if ( marker==0 ) {
+ // initialize id
+ String id = this.properties.get("id").getString();
+ area.getIDReferences().initializeID(id,area);
+ }
+
this.areaContainer =
new AreaContainer(fs, -area.borderWidthLeft, -area.borderWidthTop,
area.getAllocationWidth(),
@@ -153,6 +159,7 @@ public class TableRow extends FObj {
areaContainer.start();
areaContainer.setAbsoluteHeight(area.getAbsoluteHeight());
+ areaContainer.setIDReferences(area.getIDReferences());
int numChildren = this.children.size();
if (numChildren != columns.size()) {