From: Peter Bernard West Date: Mon, 26 Apr 2004 14:47:23 +0000 (+0000) Subject: Corrections to corresponding property handling X-Git-Tag: Defoe_export~213 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d67b0f434d55535ea6fe53365add0dd713c4fb8f;p=xmlgraphics-fop.git Corrections to corresponding property handling git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197541 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index e3bb2366d..f19375681 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -143,31 +143,6 @@ public class FONode extends SyncedNode{ /** BitSet of properties which have been specified on this node. */ private BitSet specifiedProps = new BitSet(PropNames.LAST_PROPERTY_INDEX + 1); - /** BitSet of corresponding properties set on this mode. */ - private BitSet correspondingProps = - new BitSet(PropNames.LAST_CORRESPONDING_INDEX + 1); - /** - * Indicate that the corresponding property has been set on - * this node - * @param property - */ - public void setCorresponding(int property) throws PropertyException { - if (correspondingProps != null) { - correspondingProps.set(property); - } - throw new PropertyException("No corresponding BitSet"); - } - /** - * Has the corresponding property been set on this node? - * @param property - * @return - */ - public boolean correspondingSet(int property) throws PropertyException { - if (correspondingProps != null) { - return correspondingProps.get(property); - } - throw new PropertyException("No corresponding BitSet"); - } /** The property set for this node. This reference has two lives. During FO subtree building, it holds all values which may potentially @@ -314,30 +289,12 @@ public class FONode extends SyncedNode{ specifiedProps.set(property); // Handle corresponding properties here if (tempP instanceof CorrespondingProperty) { - // is this property already set? - if ( ! correspondingProps.get(property)) { - // Update the propertySet - propertySet[property] = propval; - correspondingProps.set(property); - // find corresponding properties, and check whether - // already set - // TODO Can a property have more than one - // coresponding? I don't think so. I think this - // is dealt with in shorthand/compound handling - int corresP = - ((CorrespondingProperty)tempP) - .getCorrespondingProperty(this); - if ( ! correspondingProps.get(corresP)) { - propertySet[corresP] = propval; - correspondingProps.set(corresP); - } // else this property's corresponding property - // already set. Presumably it has already been - // encountered in the set of attributes, e.g. - // the absolute property is set. Ignore this - // value. - } // this property already set by its corresponding - // property. E.g. this is a relative property. - // Ignore this value. + // Update the propertySet + propertySet[property] = propval; + int corresP = + ((CorrespondingProperty)tempP) + .getCorrespondingProperty(this); + propertySet[corresP] = propval; } else { // Not a corresponding property @@ -379,7 +336,6 @@ public class FONode extends SyncedNode{ // Clean up structures that are no longer needed propertySet = null; specifiedProps = null; - correspondingProps = null; attrBitSet = null; foKeys = null; foProperties = null;