vmote       2003/09/16 11:11:52

  Modified:    src/java/org/apache/fop/fo/flow Table.java TableCell.java
                        TableColumn.java TableRow.java
  Log:
  trigger event handling for start and end of table, cell, column, and row, primarily 
for the benefit of the structure handlers (mif/rtf) -- submitted by Peter Herweg, see 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23103
  
  Revision  Changes    Path
  1.8       +19 -1     xml-fop/src/java/org/apache/fop/fo/flow/Table.java
  
  Index: Table.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Table.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Table.java        16 Sep 2003 05:21:05 -0000      1.7
  +++ Table.java        16 Sep 2003 18:11:52 -0000      1.8
  @@ -53,7 +53,11 @@
   // Java
   import java.util.ArrayList;
   
  +// XML
  +import org.xml.sax.Attributes;
  +
   // FOP
  +import org.apache.fop.apps.FOPException;
   import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.datatypes.LengthRange;
   import org.apache.fop.fo.FONode;
  @@ -224,5 +228,19 @@
           fotv.serveTable(this);
       }
   
  -}
  +    /**
  +     * @see org.apache.fop.fo.FObj#handleAttrs
  +     */
  +    public void handleAttrs(Attributes attlist) throws FOPException {
  +        super.handleAttrs(attlist);
  +
  +        setupID();
   
  +        getFOTreeControl().getFOInputHandler().startTable(this);
  +    }
  +
  +    protected void end() {
  +        getFOTreeControl().getFOInputHandler().endTable(this);
  +    }
  +
  +}
  
  
  
  1.7       +5 -0      xml-fop/src/java/org/apache/fop/fo/flow/TableCell.java
  
  Index: TableCell.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableCell.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TableCell.java    16 Sep 2003 05:21:05 -0000      1.6
  +++ TableCell.java    16 Sep 2003 18:11:52 -0000      1.7
  @@ -159,6 +159,8 @@
       public void handleAttrs(Attributes attlist) throws FOPException {
           super.handleAttrs(attlist);
           doSetup();    // init some basic property values
  +
  +        getFOTreeControl().getFOInputHandler().startCell(this);
       }
   
       /**
  @@ -386,4 +388,7 @@
           fotv.serveTableCell(this);
       }
   
  +    protected void end() {
  +        getFOTreeControl().getFOInputHandler().endCell(this);
  +    }
   }
  
  
  
  1.9       +19 -0     xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java
  
  Index: TableColumn.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TableColumn.java  16 Sep 2003 05:21:05 -0000      1.8
  +++ TableColumn.java  16 Sep 2003 18:11:52 -0000      1.9
  @@ -50,7 +50,11 @@
    */
   package org.apache.fop.fo.flow;
   
  +// XML
  +import org.xml.sax.Attributes;
  +
   // FOP
  +import org.apache.fop.apps.FOPException;
   import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.datatypes.Length;
   import org.apache.fop.fo.FONode;
  @@ -168,5 +172,20 @@
           fotv.serveTableColumn(this);
       }
   
  +    /**
  +     * Overriden from FObj.
  +     * @param attlist Collection of attributes passed to us from the parser.
  +     * @throws FOPException for FO errors
  +     */
  +    public void handleAttrs(Attributes attlist) throws FOPException {
  +        super.handleAttrs(attlist);
  +        doSetup();    // init some basic property values
  +
  +        getFOTreeControl().getFOInputHandler().startColumn(this);
  +    }
  +
  +    protected void end() {
  +        getFOTreeControl().getFOInputHandler().endColumn(this);
  +    }
   }
   
  
  
  
  1.7       +19 -1     xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java
  
  Index: TableRow.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TableRow.java     16 Sep 2003 05:21:05 -0000      1.6
  +++ TableRow.java     16 Sep 2003 18:11:52 -0000      1.7
  @@ -50,7 +50,11 @@
    */
   package org.apache.fop.fo.flow;
   
  +// XML
  +import org.xml.sax.Attributes;
  +
   // FOP
  +import org.apache.fop.apps.FOPException;
   import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.datatypes.KeepValue;
   import org.apache.fop.fo.FONode;
  @@ -162,5 +166,19 @@
           fotv.serveTableRow(this);
       }
   
  -}
  +    /**
  +     * @see org.apache.fop.fo.FObj#handleAttrs
  +     */
  +    public void handleAttrs(Attributes attlist) throws FOPException {
  +        super.handleAttrs(attlist);
  +
  +        setupID();
   
  +        getFOTreeControl().getFOInputHandler().startRow(this);
  +    }
  +
  +    protected void end() {
  +        getFOTreeControl().getFOInputHandler().endRow(this);
  +    }
  +
  +}
  
  
  

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

Reply via email to