pbwest      2004/04/26 07:47:23

  Modified:    src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
                        FONode.java
  Log:
  Corrections to corresponding property handling
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.20  +6 -50     xml-fop/src/java/org/apache/fop/fo/FONode.java
  
  Index: FONode.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FONode.java,v
  retrieving revision 1.2.2.19
  retrieving revision 1.2.2.20
  diff -u -r1.2.2.19 -r1.2.2.20
  --- FONode.java       24 Apr 2004 13:43:25 -0000      1.2.2.19
  +++ FONode.java       26 Apr 2004 14:47:23 -0000      1.2.2.20
  @@ -143,31 +143,6 @@
       /** 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 <code>property</code> 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 <code>property</code> 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 @@
           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 @@
           // Clean up structures that are no longer needed
           propertySet = null;
           specifiedProps = null;
  -        correspondingProps = null;
           attrBitSet = null;
           foKeys = null;
           foProperties = null;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to