vmote       2003/08/25 08:37:03

  Modified:    src/java/org/apache/fop/fo/flow Character.java
                        ExternalGraphic.java Leader.java
               src/java/org/apache/fop/layoutmgr AddLMVisitor.java
  Log:
  remove unneeded field fo/flow/Leader.leaderArea
  
  Revision  Changes    Path
  1.7       +0 -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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Character.java    24 Aug 2003 18:52:19 -0000      1.6
  +++ Character.java    25 Aug 2003 15:37:02 -0000      1.7
  @@ -63,7 +63,6 @@
   import org.apache.fop.fo.properties.CommonMarginInline;
   import org.apache.fop.fo.properties.CommonRelativePosition;
   import org.apache.fop.apps.FOPException;
  -import org.apache.fop.area.inline.InlineArea;
   
   /**
    * This class represents the flow object 'fo:character'. Its use is defined by
  
  
  
  1.8       +0 -2      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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ExternalGraphic.java      24 Aug 2003 19:22:59 -0000      1.7
  +++ ExternalGraphic.java      25 Aug 2003 15:37:02 -0000      1.8
  @@ -60,12 +60,10 @@
   import org.apache.fop.fo.properties.Scaling;
   import org.apache.fop.image.ImageFactory;
   import org.apache.fop.image.FopImage;
  -import org.apache.fop.area.inline.InlineArea;
   import org.apache.fop.datatypes.Length;
   
   // Java
   import java.awt.geom.Rectangle2D;
  -import org.apache.fop.apps.*;
   
   /**
    * External graphic formatting object.
  
  
  
  1.11      +0 -2      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Leader.java       22 Aug 2003 06:27:34 -0000      1.10
  +++ Leader.java       25 Aug 2003 15:37:02 -0000      1.11
  @@ -51,7 +51,6 @@
   package org.apache.fop.fo.flow;
   
   // FOP
  -import org.apache.fop.area.inline.InlineArea;
   import org.apache.fop.datatypes.ColorType;
   import org.apache.fop.datatypes.Length;
   import org.apache.fop.datatypes.PercentLength;
  @@ -85,7 +84,6 @@
       protected FOTreeControl fontInfo = null;
       /** FontState for this object */
       protected Font fontState;
  -    public InlineArea leaderArea = null;
   
       /**
        * @param parent FONode that is the parent of this object
  
  
  
  1.7       +8 -15     xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
  
  Index: AddLMVisitor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AddLMVisitor.java 24 Aug 2003 22:15:51 -0000      1.6
  +++ AddLMVisitor.java 25 Aug 2003 15:37:03 -0000      1.7
  @@ -294,24 +294,16 @@
        }
   
        private InlineArea getLeaderInlineArea(Leader node) {
  -         if (node.leaderArea == null) {
  -             createLeaderArea(node);
  -         }
  -         return node.leaderArea;
  -     }
  -
  -     protected void createLeaderArea(Leader node) {
            node.setup();
  +         InlineArea leaderArea = null;
   
            if (node.getLeaderPattern() == LeaderPattern.RULE) {
                org.apache.fop.area.inline.Leader leader = new 
org.apache.fop.area.inline.Leader();
  -
                leader.setRuleStyle(node.getRuleStyle());
                leader.setRuleThickness(node.getRuleThickness());
  -
  -             node.leaderArea = leader;
  +             leaderArea = leader;
            } else if (node.getLeaderPattern() == LeaderPattern.SPACE) {
  -             node.leaderArea = new Space();
  +             leaderArea = new Space();
            } else if (node.getLeaderPattern() == LeaderPattern.DOTS) {
                Word w = new Word();
                char dot = '.'; // userAgent.getLeaderDotCharacter();
  @@ -337,11 +329,11 @@
                }
                fa.setHeight(node.getFontState().getAscender());
   
  -             node.leaderArea = fa;
  +             leaderArea = fa;
            } else if (node.getLeaderPattern() == LeaderPattern.USECONTENT) {
                if (node.getChildren() == null) {
                    node.getLogger().error("Leader use-content with no content");
  -                 return;
  +                 return null;
                }
                InlineStackingLayoutManager lm;
                lm = new InlineStackingLayoutManager();
  @@ -369,8 +361,9 @@
                if (spacer != null) {
                    fa.addChild(spacer);
                }
  -             node.leaderArea = fa;
  +             leaderArea = fa;
            }
  +         return leaderArea;
        }
   
        public void serveVisitor(RetrieveMarker node) {
  
  
  

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

Reply via email to