From: Jordan Naftolin Date: Thu, 22 Jun 2000 00:05:59 +0000 (+0000) Subject: checks for FObjMixed's id X-Git-Tag: pre-columns~451 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ae9a1100aa858a970fd2a11740343b9752252ed6;p=xmlgraphics-fop.git checks for FObjMixed's id git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193426 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fo/FObjMixed.java b/src/org/apache/fop/fo/FObjMixed.java index d82257770..68a8a0d8e 100644 --- a/src/org/apache/fop/fo/FObjMixed.java +++ b/src/org/apache/fop/fo/FObjMixed.java @@ -83,6 +83,9 @@ public class FObjMixed extends FObj { 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(); diff --git a/src/org/apache/fop/fo/flow/Block.java b/src/org/apache/fop/fo/flow/Block.java index 3adb50a0c..1e28d1684 100644 --- a/src/org/apache/fop/fo/flow/Block.java +++ b/src/org/apache/fop/fo/flow/Block.java @@ -71,7 +71,6 @@ public class Block extends FObjMixed { return new Block.Maker(); } - final static int ID_PADDING = 5000; // space to add before id y position FontState fs; int align; int alignLast; @@ -206,20 +205,9 @@ public class Block extends FObjMixed { } if ( marker==0 ) { - // set up IDReferences - IDReferences idReferences = area.getIDReferences(); + // initialize id String id = this.properties.get("id").getString(); - if ( id!=null && !id.equals("") ) { - if ( idReferences.doesIDExist(id) ) { - throw new FOPException("The id \""+id+"\" already exists in this document"); - } - else { - idReferences.createNewId(id); - idReferences.removeFromIdValidationList(id); - idReferences.setYPosition(id,area.getPage().getBody().getYPosition() - area.getAbsoluteHeight()+ID_PADDING); - area.getPage().addToIDList(id); - } - } + area.getIDReferences().initializeID(id,area); } this.blockArea =