You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by jo...@locus.apache.org on 2000/07/05 22:23:47 UTC
cvs commit: xml-fop/src/org/apache/fop/fo FObjMixed.java
jordan 00/07/05 13:23:44
Modified: src/org/apache/fop/fo FObjMixed.java
Log:
fixes duplicate id on overflow bug
Revision Changes Path
1.8 +29 -25 xml-fop/src/org/apache/fop/fo/FObjMixed.java
Index: FObjMixed.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/FObjMixed.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FObjMixed.java 2000/06/22 00:05:59 1.7
+++ FObjMixed.java 2000/07/05 20:23:43 1.8
@@ -1,4 +1,4 @@
-/*-- $Id: FObjMixed.java,v 1.7 2000/06/22 00:05:59 jordan Exp $ --
+/*-- $Id: FObjMixed.java,v 1.8 2000/07/05 20:23:43 jordan Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -61,43 +61,47 @@
public class FObjMixed extends FObj {
public static class Maker extends FObj.Maker {
- public FObj make(FObj parent, PropertyList propertyList)
- throws FOPException {
- return new FObjMixed(parent, propertyList);
- }
+ public FObj make(FObj parent, PropertyList propertyList)
+ throws FOPException {
+ return new FObjMixed(parent, propertyList);
+ }
}
public static FObj.Maker maker() {
- return new FObjMixed.Maker();
+ return new FObjMixed.Maker();
}
protected FObjMixed(FObj parent, PropertyList propertyList) {
- super(parent, propertyList);
+ super(parent, propertyList);
}
protected void addCharacters(char data[], int start, int length) {
- children.addElement(new FOText(data,start,length,this));
+ children.addElement(new FOText(data,start,length,this));
}
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++) {
- FONode fo = (FONode) children.elementAt(i);
- Status status;
- if ((status = fo.layout(area)).isIncomplete()) {
- this.marker = i;
- return status;
- }
- }
- return new Status(Status.OK);
+ String id = this.properties.get("id").getString();
+
+ if ( this.marker == START ) {
+ area.getIDReferences().createID(id);
+ this.marker = 0;
+ }
+
+ if ( this.marker == 0 ) {
+ area.getIDReferences().configureID(id,area);
+ }
+
+ int numChildren = this.children.size();
+ for ( int i = this.marker; i < numChildren; i++ ) {
+ FONode fo = (FONode) children.elementAt(i);
+ Status status;
+ if ( (status = fo.layout(area)).isIncomplete() ) {
+ this.marker = i;
+ return status;
+ }
+ }
+ return new Status(Status.OK);
}
}