gmazza      2004/10/11 22:07:48

  Modified:    src/java/org/apache/fop/fo FONode.java FOText.java FObj.java
                        FObjMixed.java
               src/java/org/apache/fop/fo/flow BasicLink.java
                        BidiOverride.java Block.java BlockContainer.java
                        Character.java ExternalGraphic.java Footnote.java
                        InlineContainer.java InstreamForeignObject.java
                        Leader.java ListBlock.java ListItem.java
                        PageNumber.java PageNumberCitation.java
                        RetrieveMarker.java Table.java TableBody.java
                        TableCell.java TableRow.java Wrapper.java
               src/java/org/apache/fop/fo/pagination Flow.java
               src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java
                        TextLayoutManager.java
               src/java/org/apache/fop/render/rtf RTFHandler.java
  Log:
  Start of work to move FOText from extending FObj to extending FONode instead.
  
  All work is done except for changing FObj's parent from FObj to
  FONode.  The RTF library works fine with the switch, but simple.fo and
  franklin_alt.fo (among others I guess) will not work properly when FOText's
  parent is switched.  (Layout problems occur--lines don't break properly
  with the switch.)
  
  Switch to super() constructor (instead of super(fobj) one) within
  within TextLayoutManager, as it is not needed for this subclass, also to
  facilitate the change above.
  
  Revision  Changes    Path
  1.46      +9 -7      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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- FONode.java       13 Sep 2004 03:46:04 -0000      1.45
  +++ FONode.java       12 Oct 2004 05:07:46 -0000      1.46
  @@ -19,6 +19,7 @@
   package org.apache.fop.fo;
   
   // Java
  +import java.util.List;
   import java.util.ListIterator;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  @@ -137,13 +138,6 @@
       /**
        *
        */
  -    protected void start() {
  -        // do nothing by default
  -    }
  -
  -    /**
  -     *
  -     */
       protected void endOfNode() throws SAXParseException {
           // do nothing by default
       }
  @@ -326,6 +320,14 @@
           } else {
               return "Error(" + loc.getLineNumber() + "/" + loc.getColumnNumber() + 
"): ";
           }
  +    }
  +
  +    /**
  +     * Return a LayoutManager responsible for laying out this FObj's content.
  +     * Must override in subclasses if their content can be laid out.
  +     * @param list the list to which the layout manager(s) should be added
  +     */
  +    public void addLayoutManager(List list) {
       }
   
       /**
  
  
  
  1.27      +7 -7      xml-fop/src/java/org/apache/fop/fo/FOText.java
  
  Index: FOText.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOText.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- FOText.java       19 Sep 2004 18:46:51 -0000      1.26
  +++ FOText.java       12 Oct 2004 05:07:46 -0000      1.27
  @@ -131,7 +131,7 @@
        * @return true if this will create an area in the output
        */
       public boolean willCreateArea() {
  -        if (textInfo.whiteSpaceCollapse == WhiteSpaceCollapse.FALSE
  +        if (textInfo.whiteSpaceCollapse == Constants.WhiteSpaceCollapse.FALSE
                   && endIndex - startIndex > 0) {
               return true;
           }
  @@ -194,7 +194,7 @@
        * text-transform property.
        */
       private void textTransform() {
  -        if (textInfo.textTransform == TextTransform.NONE) {
  +        if (textInfo.textTransform == Constants.TextTransform.NONE) {
               return;
           }
           for (int i = 0; i < endIndex; i++) {
  @@ -323,13 +323,13 @@
       private char charTransform(int i) {
           switch (textInfo.textTransform) {
           /* put NONE first, as this is probably the common case */
  -        case TextTransform.NONE:
  +        case Constants.TextTransform.NONE:
               return ca[i];
  -        case TextTransform.UPPERCASE:
  +        case Constants.TextTransform.UPPERCASE:
               return Character.toUpperCase(ca[i]);
  -        case TextTransform.LOWERCASE:
  +        case Constants.TextTransform.LOWERCASE:
               return Character.toLowerCase(ca[i]);
  -        case TextTransform.CAPITALIZE:
  +        case Constants.TextTransform.CAPITALIZE:
               if (isStartOfWord(i)) {
                   /*
                    Use toTitleCase here. Apparently, some languages use
  @@ -497,7 +497,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           if (endIndex - startIndex > 0) {
  
  
  
  1.77      +0 -9      xml-fop/src/java/org/apache/fop/fo/FObj.java
  
  Index: FObj.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- FObj.java 4 Oct 2004 01:19:10 -0000       1.76
  +++ FObj.java 12 Oct 2004 05:07:46 -0000      1.77
  @@ -21,7 +21,6 @@
   import java.util.ArrayList;
   import java.util.HashMap;
   import java.util.Iterator;
  -import java.util.List;
   import java.util.ListIterator;
   import java.util.Map;
   import java.util.Set;
  @@ -457,14 +456,6 @@
        */
       public Map getMarkers() {
           return markers;
  -    }
  -
  -    /**
  -     * Return a LayoutManager responsible for laying out this FObj's content.
  -     * Must override in subclasses if their content can be laid out.
  -     * @param list the list to which the layout manager(s) should be added
  -     */
  -    public void addLayoutManager(List list) {
       }
   
       /*
  
  
  
  1.40      +1 -1      xml-fop/src/java/org/apache/fop/fo/FObjMixed.java
  
  Index: FObjMixed.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObjMixed.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- FObjMixed.java    11 Sep 2004 17:11:59 -0000      1.39
  +++ FObjMixed.java    12 Oct 2004 05:07:46 -0000      1.40
  @@ -69,7 +69,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {    
           if (getChildNodes() != null) {
  
  
  
  1.30      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java
  
  Index: BasicLink.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- BasicLink.java    7 Oct 2004 19:47:46 -0000       1.29
  +++ BasicLink.java    12 Oct 2004 05:07:46 -0000      1.30
  @@ -106,7 +106,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {    
           BasicLinkLayoutManager lm = new BasicLinkLayoutManager(this);
  
  
  
  1.20      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/BidiOverride.java
  
  Index: BidiOverride.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/BidiOverride.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- BidiOverride.java 11 Sep 2004 17:11:58 -0000      1.19
  +++ BidiOverride.java 12 Oct 2004 05:07:46 -0000      1.20
  @@ -109,7 +109,7 @@
       }
       
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        * @todo see if can/should move the child iteration logic 
        *      to BidiLayoutManager
        */
  
  
  
  1.42      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/Block.java
  
  Index: Block.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Block.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Block.java        7 Oct 2004 19:47:47 -0000       1.41
  +++ Block.java        12 Oct 2004 05:07:46 -0000      1.42
  @@ -342,7 +342,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {    
           BlockLayoutManager blm = new BlockLayoutManager(this);
  
  
  
  1.26      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/BlockContainer.java
  
  Index: BlockContainer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/BlockContainer.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- BlockContainer.java       7 Oct 2004 19:47:47 -0000       1.25
  +++ BlockContainer.java       12 Oct 2004 05:07:46 -0000      1.26
  @@ -91,7 +91,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {    
           BlockContainerLayoutManager blm = new BlockContainerLayoutManager(this);
  
  
  
  1.23      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/Character.java
  
  Index: Character.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Character.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- Character.java    3 Oct 2004 00:50:43 -0000       1.22
  +++ Character.java    12 Oct 2004 05:07:47 -0000      1.23
  @@ -89,7 +89,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           String str = getPropString(PR_CHARACTER);
  
  
  
  1.42      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
  
  Index: ExternalGraphic.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ExternalGraphic.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- ExternalGraphic.java      6 Sep 2004 18:44:31 -0000       1.41
  +++ ExternalGraphic.java      12 Oct 2004 05:07:47 -0000      1.42
  @@ -66,7 +66,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           if (getPropString(PR_SRC) != null) {
  
  
  
  1.27      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/Footnote.java
  
  Index: Footnote.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Footnote.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Footnote.java     7 Oct 2004 19:47:47 -0000       1.26
  +++ Footnote.java     12 Oct 2004 05:07:47 -0000      1.27
  @@ -112,7 +112,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           if (getInlineFO() == null) {
  
  
  
  1.20      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/InlineContainer.java
  
  Index: InlineContainer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/InlineContainer.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- InlineContainer.java      11 Sep 2004 17:11:58 -0000      1.19
  +++ InlineContainer.java      12 Oct 2004 05:07:47 -0000      1.20
  @@ -53,7 +53,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           ArrayList childList = new ArrayList();
  
  
  
  1.29      +1 -1      
xml-fop/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
  
  Index: InstreamForeignObject.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- InstreamForeignObject.java        7 Oct 2004 19:47:47 -0000       1.28
  +++ InstreamForeignObject.java        12 Oct 2004 05:07:47 -0000      1.29
  @@ -109,7 +109,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           InstreamForeignObjectLM lm = new InstreamForeignObjectLM(this);
  
  
  
  1.38      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/Leader.java
  
  Index: Leader.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Leader.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- Leader.java       6 Sep 2004 18:44:31 -0000       1.37
  +++ Leader.java       12 Oct 2004 05:07:47 -0000      1.38
  @@ -125,7 +125,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           setup();
  
  
  
  1.31      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/ListBlock.java
  
  Index: ListBlock.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ListBlock.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- ListBlock.java    7 Oct 2004 19:47:47 -0000       1.30
  +++ ListBlock.java    12 Oct 2004 05:07:47 -0000      1.31
  @@ -84,7 +84,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           ListBlockLayoutManager lm = new ListBlockLayoutManager(this);
  
  
  
  1.30      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/ListItem.java
  
  Index: ListItem.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ListItem.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- ListItem.java     7 Oct 2004 19:47:47 -0000       1.29
  +++ ListItem.java     12 Oct 2004 05:07:47 -0000      1.30
  @@ -109,7 +109,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           ListItemLayoutManager blm = new ListItemLayoutManager(this);
  
  
  
  1.39      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java
  
  Index: PageNumber.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- PageNumber.java   11 Sep 2004 17:11:58 -0000      1.38
  +++ PageNumber.java   12 Oct 2004 05:07:47 -0000      1.39
  @@ -91,7 +91,7 @@
       }
       
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           PageNumberLayoutManager lm = new PageNumberLayoutManager(this);
  
  
  
  1.38      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java
  
  Index: PageNumberCitation.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumberCitation.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- PageNumberCitation.java   11 Sep 2004 17:11:58 -0000      1.37
  +++ PageNumberCitation.java   12 Oct 2004 05:07:47 -0000      1.38
  @@ -67,7 +67,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           PageNumberCitationLayoutManager lm = 
  
  
  
  1.19      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/RetrieveMarker.java
  
  Index: RetrieveMarker.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/RetrieveMarker.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- RetrieveMarker.java       11 Sep 2004 17:11:58 -0000      1.18
  +++ RetrieveMarker.java       12 Oct 2004 05:07:47 -0000      1.19
  @@ -84,7 +84,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           RetrieveMarkerLayoutManager lm = new RetrieveMarkerLayoutManager(this);
  
  
  
  1.37      +1 -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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- Table.java        7 Sep 2004 20:47:10 -0000       1.36
  +++ Table.java        12 Oct 2004 05:07:47 -0000      1.37
  @@ -132,7 +132,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        * @todo see if can/should move much of this logic into TableLayoutManager
        *      and/or TableBody and TableColumn FO subclasses.
        */
  
  
  
  1.30      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/TableBody.java
  
  Index: TableBody.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableBody.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- TableBody.java    11 Sep 2004 17:11:58 -0000      1.29
  +++ TableBody.java    12 Oct 2004 05:07:47 -0000      1.30
  @@ -65,7 +65,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           Body blm = new Body(this);
  
  
  
  1.34      +1 -1      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.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- TableCell.java    7 Oct 2004 19:47:47 -0000       1.33
  +++ TableCell.java    12 Oct 2004 05:07:47 -0000      1.34
  @@ -325,7 +325,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           Cell clm = new Cell(this);
  
  
  
  1.36      +1 -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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- TableRow.java     7 Oct 2004 19:47:47 -0000       1.35
  +++ TableRow.java     12 Oct 2004 05:07:47 -0000      1.36
  @@ -128,7 +128,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           Row rlm = new Row(this);
  
  
  
  1.14      +1 -1      xml-fop/src/java/org/apache/fop/fo/flow/Wrapper.java
  
  Index: Wrapper.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Wrapper.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Wrapper.java      25 Aug 2004 05:03:06 -0000      1.13
  +++ Wrapper.java      12 Oct 2004 05:07:47 -0000      1.14
  @@ -46,7 +46,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        * @todo remove null check when vCN() & endOfNode() implemented
        */
       public void addLayoutManager(List list) {
  
  
  
  1.34      +2 -2      xml-fop/src/java/org/apache/fop/fo/pagination/Flow.java
  
  Index: Flow.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Flow.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Flow.java 7 Oct 2004 19:47:47 -0000       1.33
  +++ Flow.java 12 Oct 2004 05:07:47 -0000      1.34
  @@ -126,7 +126,7 @@
       }
   
       /**
  -     * @see org.apache.fop.fo.FObj#addLayoutManager(List)
  +     * @see org.apache.fop.fo.FONode#addLayoutManager(List)
        */
       public void addLayoutManager(List list) {
           FlowLayoutManager lm = new FlowLayoutManager(this);
  
  
  
  1.25      +4 -3      
xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
  
  Index: AbstractLayoutManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- AbstractLayoutManager.java        2 Oct 2004 12:39:10 -0000       1.24
  +++ AbstractLayoutManager.java        12 Oct 2004 05:07:47 -0000      1.25
  @@ -19,6 +19,7 @@
   package org.apache.fop.layoutmgr;
   
   import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.apps.FOUserAgent;
   import org.apache.fop.area.Area;
   import org.apache.fop.area.Resolveable;
  @@ -413,9 +414,9 @@
           List newLMs = new ArrayList(size);
           while (fobjIter.hasNext() && newLMs.size() < size ) {
               Object theobj = fobjIter.next();
  -            if (theobj instanceof FObj) {
  -                FObj fobj = (FObj) theobj;
  -                fobj.addLayoutManager(newLMs);
  +            if (theobj instanceof FONode) {
  +                FONode foNode = (FONode) theobj;
  +                foNode.addLayoutManager(newLMs);
               }
           }
           return newLMs;
  
  
  
  1.22      +2 -1      xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
  
  Index: TextLayoutManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- TextLayoutManager.java    10 Oct 2004 11:17:46 -0000      1.21
  +++ TextLayoutManager.java    12 Oct 2004 05:07:47 -0000      1.22
  @@ -121,7 +121,8 @@
        * @param node The FOText object to be rendered
        */
       public TextLayoutManager(FOText node) {
  -        super(node);
  +        super();
  +
           foText = node;
           textArray = new char[node.endIndex - node.startIndex];
           System.arraycopy(node.ca, node.startIndex, textArray, 0,
  
  
  
  1.35      +53 -52    xml-fop/src/java/org/apache/fop/render/rtf/RTFHandler.java
  
  Index: RTFHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/rtf/RTFHandler.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- RTFHandler.java   1 Oct 2004 09:03:35 -0000       1.34
  +++ RTFHandler.java   12 Oct 2004 05:07:47 -0000      1.35
  @@ -30,6 +30,7 @@
   import org.apache.fop.apps.FOUserAgent;
   import org.apache.fop.fo.FOEventHandler;
   import org.apache.fop.fo.FObj;
  +import org.apache.fop.fo.FONode;
   import org.apache.fop.fo.flow.BasicLink;
   import org.apache.fop.fo.flow.Block;
   import org.apache.fop.fo.flow.BlockContainer;
  @@ -367,7 +368,7 @@
               bDefer = false;
               
               bDeferredExecution=true;
  -            recurseFObj(bl);
  +            recurseFONode(bl);
               bDeferredExecution=false;
               
               //exit function, because the code has already beed executed while 
  @@ -1225,115 +1226,115 @@
       /**
        * Calls the appropriate event handler for the passed FObj. 
        *
  -     * @param fobj FO-object whose event is to be called
  +     * @param foNode FO node whose event is to be called
        * @param bStart TRUE calls the start handler, FALSE the end handler 
        */
  -    private void invokeDeferredEvent(FObj fobj, boolean bStart) {
  -        if (fobj instanceof Block) {
  +    private void invokeDeferredEvent(FONode foNode, boolean bStart) {
  +        if (foNode instanceof Block) {
               if (bStart) {
  -                startBlock( (Block) fobj);
  +                startBlock( (Block) foNode);
               } else {
  -                endBlock( (Block) fobj);
  +                endBlock( (Block) foNode);
               }
  -        } else if (fobj instanceof Inline) {
  +        } else if (foNode instanceof Inline) {
               if (bStart) {
  -                startInline( (Inline) fobj);
  +                startInline( (Inline) foNode);
               } else {
  -                endInline( (Inline) fobj);
  +                endInline( (Inline) foNode);
               }
  -        } else if (fobj instanceof FOText) {
  +        } else if (foNode instanceof FOText) {
               if (bStart) {
  -                FOText text = (FOText) fobj;
  +                FOText text = (FOText) foNode;
                   characters(text.ca, text.startIndex, text.endIndex);
               }
  -        } else if (fobj instanceof Character) {
  +        } else if (foNode instanceof Character) {
               if (bStart) {
  -                Character c = (Character) fobj;
  +                Character c = (Character) foNode;
                   character(c);
               }
  -        } else if (fobj instanceof BasicLink) {
  +        } else if (foNode instanceof BasicLink) {
               if (bStart) {
  -                startLink( (BasicLink) fobj);
  +                startLink( (BasicLink) foNode);
               } else {
                   endLink();
               }
  -        } else if (fobj instanceof PageNumber) {
  +        } else if (foNode instanceof PageNumber) {
               if (bStart) {
  -                startPageNumber( (PageNumber) fobj);
  +                startPageNumber( (PageNumber) foNode);
               } else {
  -                endPageNumber( (PageNumber) fobj);
  +                endPageNumber( (PageNumber) foNode);
               }
  -        } else if (fobj instanceof Footnote) {
  +        } else if (foNode instanceof Footnote) {
               if (bStart) {
  -                startFootnote( (Footnote) fobj);
  +                startFootnote( (Footnote) foNode);
               } else {
  -                endFootnote( (Footnote) fobj);
  +                endFootnote( (Footnote) foNode);
               }
  -        } else if (fobj instanceof FootnoteBody) {
  +        } else if (foNode instanceof FootnoteBody) {
               if (bStart) {
  -                startFootnoteBody( (FootnoteBody) fobj);
  +                startFootnoteBody( (FootnoteBody) foNode);
               } else {
  -                endFootnoteBody( (FootnoteBody) fobj);
  +                endFootnoteBody( (FootnoteBody) foNode);
               }
  -        } else if (fobj instanceof ListBlock) {
  +        } else if (foNode instanceof ListBlock) {
               if (bStart) {
  -                startList( (ListBlock) fobj);
  +                startList( (ListBlock) foNode);
               } else {
  -                endList( (ListBlock) fobj);
  +                endList( (ListBlock) foNode);
               }
  -        } else if (fobj instanceof ListItem) {
  +        } else if (foNode instanceof ListItem) {
               if (bStart) {
  -                startListItem( (ListItem) fobj);
  +                startListItem( (ListItem) foNode);
               } else {
  -                endListItem( (ListItem) fobj);
  +                endListItem( (ListItem) foNode);
               }
  -        } else if (fobj instanceof ListItemLabel) {
  +        } else if (foNode instanceof ListItemLabel) {
               if (bStart) {
                   startListLabel();
               } else {
                   endListLabel();
               }
  -        } else if (fobj instanceof Table) {
  +        } else if (foNode instanceof Table) {
               if (bStart) {
  -                startTable( (Table) fobj);
  +                startTable( (Table) foNode);
               } else {
  -                endTable( (Table) fobj);
  +                endTable( (Table) foNode);
               }
  -        } else if (fobj instanceof TableColumn) {
  +        } else if (foNode instanceof TableColumn) {
               if (bStart) {
  -                startColumn( (TableColumn) fobj);
  +                startColumn( (TableColumn) foNode);
               } else {
  -                endColumn( (TableColumn) fobj);
  +                endColumn( (TableColumn) foNode);
               }
  -        } else if (fobj instanceof TableRow) {
  +        } else if (foNode instanceof TableRow) {
               if (bStart) {
  -                startRow( (TableRow) fobj);
  +                startRow( (TableRow) foNode);
               } else {
  -                endRow( (TableRow) fobj);
  +                endRow( (TableRow) foNode);
               }
  -        } else if (fobj instanceof TableCell) {
  +        } else if (foNode instanceof TableCell) {
               if (bStart) {
  -                startCell( (TableCell) fobj);
  +                startCell( (TableCell) foNode);
               } else {
  -                endCell( (TableCell) fobj);
  +                endCell( (TableCell) foNode);
               }
           }
       }
       
       /**
  -     * Calls the event handlers for the passed FObj and all its elements. 
  +     * Calls the event handlers for the passed FONode and all its elements. 
        *
  -     * @param fobj FO-object which shall be recursed
  +     * @param foNode FONode object which shall be recursed
        */
  -    private void recurseFObj(FObj fobj) {
  -        invokeDeferredEvent(fobj, true);
  +    private void recurseFONode(FONode foNode) {
  +        invokeDeferredEvent(foNode, true);
           
  -        if (fobj.childNodes != null) {
  -            for(Iterator it=fobj.childNodes.iterator();it.hasNext();) {
  -                recurseFObj( (FObj) it.next() );
  +        if (foNode.getChildNodes() != null) {
  +            for(Iterator it = foNode.getChildNodes(); it.hasNext() ; ) {
  +                recurseFONode( (FONode) it.next() );
               }
           }
           
  -        invokeDeferredEvent(fobj, false);
  +        invokeDeferredEvent(foNode, false);
       }
   }
  
  
  

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

Reply via email to