]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fixes duplicate id on overflow bug
authorJordan Naftolin <jordan@apache.org>
Thu, 29 Jun 2000 22:24:01 +0000 (22:24 +0000)
committerJordan Naftolin <jordan@apache.org>
Thu, 29 Jun 2000 22:24:01 +0000 (22:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193451 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/flow/DisplayGraphic.java
src/org/apache/fop/fo/flow/InlineGraphic.java
src/org/apache/fop/fo/flow/ListItem.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/TableRow.java

index b480ff833e3d5140f6012c05ebdb37b65ab167d1..91d6ba69d95b20ebde7b4f72f80b97495b522c55 100644 (file)
@@ -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();
index 3a721d8798b0c4c4e3e6ad4ca6361ec337943a8e..e94836f0ea8d6075f881090255cc54f72e0db5d1 100644 (file)
@@ -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();
index 204c9c8dd194a72fccbd152e1ecc174a7d997c01..541687fea0d9ed3af9513e1b8964f2dd217cd255 100644 (file)
@@ -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;
index 81f8b6e2c7aab5b737584ddc835310fe060607ee..1da2274932974f6da1f44b7d95fbf0ad6fd59b9f 100644 (file)
@@ -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 =
index 6f3110c74624645ee1f36e01a45912f08abe61da..d5139c94830eb8f6ba81833601f059c3b4d4d600 100644 (file)
@@ -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 =
index b8dc13b9822aa917ad6d2d62d8e6ca5627ffbf4f..fbf7b758d5df49564dc9c729b3ad4835b5827678 100644 (file)
@@ -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 =
index efeef4142dc82aca5ae3ae4827538f12da8de22f..52396cbe3741d9b99c00b02020aa5cd90d110195 100644 (file)
@@ -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 =