]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
added id support (required for internal-links)
authorJordan Naftolin <jordan@apache.org>
Thu, 22 Jun 2000 00:25:45 +0000 (00:25 +0000)
committerJordan Naftolin <jordan@apache.org>
Thu, 22 Jun 2000 00:25:45 +0000 (00:25 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193431 13f79535-47bb-0310-9956-ffa450edef68

13 files changed:
src/org/apache/fop/fo/flow/InlineGraphic.java
src/org/apache/fop/fo/flow/ListBlock.java
src/org/apache/fop/fo/flow/ListItem.java
src/org/apache/fop/fo/flow/ListItemBody.java
src/org/apache/fop/fo/flow/ListItemLabel.java
src/org/apache/fop/fo/flow/PageNumber.java
src/org/apache/fop/fo/flow/PageNumberCitation.java
src/org/apache/fop/fo/flow/SimpleLink.java
src/org/apache/fop/fo/flow/Table.java
src/org/apache/fop/fo/flow/TableBody.java
src/org/apache/fop/fo/flow/TableCell.java
src/org/apache/fop/fo/flow/TableColumn.java
src/org/apache/fop/fo/flow/TableRow.java

index 5baee4cbff2abc7d0fbe35b31668c9e771ce51ee..4b3073cb2cc3aff42106d46682ba59438c76c2cf 100644 (file)
@@ -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);
index 607f1b4c0ff49ec86a969386b3a2b8aa3e7728cc..76357c6504bece6bd8284d712f05df657ba5bb42 100644 (file)
@@ -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++) {
index b3f0afe9bb0275f662858709343967f49930b4c5..204c9c8dd194a72fccbd152e1ecc174a7d997c01 100644 (file)
@@ -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) {
index 167b6502e09e28879e1e1b4d4d905ff08d2fdc34..b98b33db42e912e9eac92494d528e598c2daf0ca 100644 (file)
@@ -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);
index 040326fb01c1cd26f63edeef8fd9dff83703295c..b06eb7d7335fb7dbc2bb5795591ff38283bc0c63 100644 (file)
@@ -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();
index 7a5c53ffa290098736900a1d92f07e81ac6a881a..fb37c4811c1ecdeee173e5d899c4b2877658c064 100644 (file)
@@ -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,
index 71cc194151cf5f7c87553bf4a17143047e22c1d4..94054bd97f56c3d28c736b00ab85b1b6d67baba3 100644 (file)
@@ -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;
index 51ee0ca48411843c9e18cd36059c782e58c670ea..64e5f0a05cba2ee64e229d228c41e8426e6a1f46 100644 (file)
@@ -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;
        }
        
index f019d304007dfcdb1189d0a16eda7a777223f451..f4ffeb68a2162d1adea786ae80116f282aad696d 100644 (file)
@@ -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;
index 4a9b8d26d58cba2c3e4a32a5c23246fb2f9e16ab..6f3110c74624645ee1f36e01a45912f08abe61da 100644 (file)
@@ -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++) {
index 13174ceef2a86ec323a2ecefaf7e3c9f4ce6c247..b8dc13b9822aa917ad6d2d62d8e6ca5627ffbf4f 100644 (file)
@@ -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++) {
index fe0ca4064fdaa6182ff9b1b216f88c73e335b293..2efa937cbe84f11dae01981ce75d60b810683291 100644 (file)
@@ -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 =
index f8bc1875d088b2ecff7a4bdd09b56596d2e53cc2..e9ebc8bc5d620defc7ea78f7520f125209718c65 100644 (file)
@@ -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()) {