diff options
author | Jordan Naftolin <jordan@apache.org> | 2000-07-13 17:36:50 +0000 |
---|---|---|
committer | Jordan Naftolin <jordan@apache.org> | 2000-07-13 17:36:50 +0000 |
commit | f7c127dd6a7e792e60c00a919a792da69fb001a4 (patch) | |
tree | 33e02ee3617a292d19d1c1c2ff6221cbaee90f80 | |
parent | 8dd9bf089787117ec4a49c1ea1c9f778c98d8cd7 (diff) | |
download | xmlgraphics-fop-f7c127dd6a7e792e60c00a919a792da69fb001a4.tar.gz xmlgraphics-fop-f7c127dd6a7e792e60c00a919a792da69fb001a4.zip |
added recursive removeID method. This method assumes that FObj's are only children of other FObj's
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193498 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/org/apache/fop/fo/FObj.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/org/apache/fop/fo/FObj.java b/src/org/apache/fop/fo/FObj.java index b44c9c766..274d2de9a 100644 --- a/src/org/apache/fop/fo/FObj.java +++ b/src/org/apache/fop/fo/FObj.java @@ -54,6 +54,7 @@ package org.apache.fop.fo; // FOP import org.apache.fop.layout.Area; import org.apache.fop.apps.FOPException; +import org.apache.fop.datatypes.IDReferences; // Java import java.util.Hashtable; @@ -118,5 +119,22 @@ public class FObj extends FONode { return(properties.get(name)); } + + + public void removeID(IDReferences idReferences) + { + idReferences.removeID( ((FObj)this).properties.get("id").getString()); + int numChildren = this.children.size(); + for (int i = 0; i < numChildren; i++) + { + FONode child= (FONode)children.elementAt(i); + if ((child instanceof FObj)) + { + child.removeID(idReferences); + } + } + } + + } |