pbwest      2004/01/16 22:31:26

  Modified:    src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
                        FONode.java
  Log:
  Added numMarkers and int getMarkers.
  Added MC_LEADER to set of states for stateFlags.
  Removed unused debugging methods.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.7   +27 -20    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.6
  retrieving revision 1.2.2.7
  diff -u -r1.2.2.6 -r1.2.2.7
  --- FONode.java       15 Jan 2004 03:01:54 -0000      1.2.2.6
  +++ FONode.java       17 Jan 2004 06:31:26 -0000      1.2.2.7
  @@ -71,8 +71,10 @@
   import org.apache.fop.fo.expr.FunctionNotImplementedException;
   import org.apache.fop.fo.expr.PropertyException;
   import org.apache.fop.fo.expr.PropertyParser;
  +import org.apache.fop.fo.flow.FoMarker;
   import org.apache.fop.fo.properties.Property;
   import org.apache.fop.messaging.MessageHandler;
  +import org.apache.fop.xml.FoXmlEvent;
   import org.apache.fop.xml.XmlEvent;
   import org.apache.fop.xml.SyncedXmlEventsBuffer;
   import org.apache.fop.xml.Namespaces;
  @@ -115,6 +117,7 @@
                   ,MC_FOOTNOTE = 1024
                 ,MC_MULTI_CASE = 2048
      ,MC_ABSOLUTELY_POSITIONED = 4096
  +                  ,MC_LEADER = 8192
                           ;
   
       public static final int
  @@ -207,6 +210,9 @@
       /** Ancestor reference area of this FONode. */
       protected FONode ancestorRefArea = null;
   
  +    /** The number of markers on this FO. */
  +    protected int numMarkers = 0;
  +    
       /**
        * @param foTree an <tt>FOTree</tt> to which this node belongs
        * @param type the fo type of this FONode.
  @@ -347,26 +353,6 @@
       }
   
       /**
  -     * Get the <i>sparsePropsSet</i> for this node.
  -     * @return the <tt>PropertyValue[]</tt>.
  -     */
  -    /*  DEBUG
  -    public PropertyValue[] getSparsePropsSet() {
  -        return sparsePropsSet;
  -    }
  -    */
  -
  -    /**
  -     * Get the <i>sparsePropsMap</i> for this node.
  -     * @return the <tt>int[]</tt>.
  -     */
  -    /*  DEBUG
  -    public int[] getSparsePropsMap() {
  -        return sparsePropsMap;
  -    }
  -    */
  -
  -    /**
        * Get the eclosing <tt>FOTree</tt> instance of this <tt>FONode</tt>.
        * @return the <tt>FOTree</tt>.
        */
  @@ -620,4 +606,25 @@
           }
       }
   
  +    public int getMarkers() throws FOPException {
  +        XmlEvent ev;
  +        
  +        try {
  +            while ((ev = xmlevents.expectStartElement
  +                    (FObjectNames.MARKER, XmlEvent.DISCARD_W_SPACE))
  +            != null) {
  +                new FoMarker(getFOTree(), this, (FoXmlEvent)ev, stateFlags);
  +                numMarkers++;
  +                ev = xmlevents.getEndElement(
  +                        SyncedXmlEventsBuffer.DISCARD_EV, ev);
  +                namespaces.surrenderEvent(ev);
  +            }
  +        } catch (TreeException e) {
  +            throw new FOPException(e);
  +        } catch (FOPException e) {
  +            throw new FOPException(e);
  +        }
  +        return numMarkers;
  +    }
  +    
   }// FONode
  
  
  

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

Reply via email to