bckfnn      2004/09/22 01:18:42

  Modified:    src/java/org/apache/fop/area BeforeFloat.java Block.java
                        BlockParent.java BodyRegion.java Flow.java
                        LineArea.java
               src/java/org/apache/fop/area/inline FilledArea.java
                        InlineArea.java
  Log:
  Use content ipd/bpd instead of allocation width/height.
  
  Revision  Changes    Path
  1.3       +3 -3      xml-fop/src/java/org/apache/fop/area/BeforeFloat.java
  
  Index: BeforeFloat.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/BeforeFloat.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BeforeFloat.java  27 Feb 2004 17:41:26 -0000      1.2
  +++ BeforeFloat.java  22 Sep 2004 08:18:41 -0000      1.3
  @@ -53,10 +53,10 @@
        *
        * @return the height of the before float including separator
        */
  -    public int getHeight() {
  -        int h = super.getHeight();
  +    public int getBPD() {
  +        int h = super.getBPD();
           if (separator != null) {
  -            h += separator.getHeight();
  +            h += separator.getBPD();
           }
           return h;
       }
  
  
  
  1.4       +2 -2      xml-fop/src/java/org/apache/fop/area/Block.java
  
  Index: Block.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Block.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Block.java        27 Feb 2004 17:41:26 -0000      1.3
  +++ Block.java        22 Sep 2004 08:18:41 -0000      1.4
  @@ -75,7 +75,7 @@
               children = new ArrayList();
           }
           if (autoHeight) {
  -            height += block.getHeight();
  +            bpd += block.getAllocBPD();
           }
           children.add(block);
       }
  @@ -89,7 +89,7 @@
           if (children == null) {
               children = new ArrayList();
           }
  -        height += line.getHeight();
  +        bpd += line.getBPD();
           children.add(line);
       }
   
  
  
  
  1.3       +0 -47     xml-fop/src/java/org/apache/fop/area/BlockParent.java
  
  Index: BlockParent.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/BlockParent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BlockParent.java  27 Feb 2004 17:41:26 -0000      1.2
  +++ BlockParent.java  22 Sep 2004 08:18:41 -0000      1.3
  @@ -43,16 +43,6 @@
       protected int yOffset = 0;
   
       /**
  -     * The width of this block parent.
  -     */
  -    protected int width = 0;
  -
  -    /**
  -     * The height of this block parent.
  -     */
  -    protected int height = 0;
  -
  -    /**
        * The children of this block parent area.
        */
       protected List children = null;
  @@ -100,24 +90,6 @@
       }
   
       /**
  -     * Set the width of this block parent area.
  -     *
  -     * @param w the width of the area
  -     */
  -    public void setWidth(int w) {
  -        width = w;
  -    }
  -
  -    /**
  -     * Set the height of this block parent area.
  -     *
  -     * @param h the height of the block parent area
  -     */
  -    public void setHeight(int h) {
  -        height = h;
  -    }
  -
  -    /**
        * Get the X offset of this block parent area.
        *
        * @return the x offset of the block parent area
  @@ -134,23 +106,4 @@
       public int getYOffset() {
           return yOffset;
       }
  -
  -    /**
  -     * Get the width of this block parent area.
  -     *
  -     * @return the width of the area
  -     */
  -    public int getWidth() {
  -        return width;
  -    }
  -
  -    /**
  -     * Get the height of this block parent area.
  -     *
  -     * @return the height of the block parent area
  -     */
  -    public int getHeight() {
  -        return height;
  -    }
  -
   }
  
  
  
  1.8       +0 -3      xml-fop/src/java/org/apache/fop/area/BodyRegion.java
  
  Index: BodyRegion.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/BodyRegion.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BodyRegion.java   14 Sep 2004 09:52:58 -0000      1.7
  +++ BodyRegion.java   22 Sep 2004 08:18:41 -0000      1.8
  @@ -32,9 +32,6 @@
       private int columnGap;
       private int columnCount;
   
  -    /** Reference inline progression dimension for the body. */
  -    private int refIPD;
  -
       /**
        * Create a new body region area.
        * This sets the region reference area class to BODY.
  
  
  
  1.3       +0 -2      xml-fop/src/java/org/apache/fop/area/Flow.java
  
  Index: Flow.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Flow.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Flow.java 27 Feb 2004 17:41:26 -0000      1.2
  +++ Flow.java 22 Sep 2004 08:18:41 -0000      1.3
  @@ -25,7 +25,5 @@
   public class Flow extends BlockParent {
       // the list of blocks created from the flow
       private int stacking = TB;
  -    private int width;
  -
   }
   
  
  
  
  1.3       +0 -20     xml-fop/src/java/org/apache/fop/area/LineArea.java
  
  Index: LineArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/LineArea.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LineArea.java     27 Feb 2004 17:41:26 -0000      1.2
  +++ LineArea.java     22 Sep 2004 08:18:41 -0000      1.3
  @@ -32,9 +32,7 @@
       // contains inline areas
       // has start indent and length, dominant baseline, height
       private int startIndent;
  -    private int length;
   
  -    private int lineHeight;
       // this is the offset for the dominant baseline
       private int baseLine;
   
  @@ -42,24 +40,6 @@
       // this means that many renderers can optimise a bit
   
       private List inlineAreas = new ArrayList();
  -
  -    /**
  -     * Set the height of this line area.
  -     *
  -     * @param height the height of the line area
  -     */
  -    public void setHeight(int height) {
  -        lineHeight = height;
  -    }
  -
  -    /**
  -     * Get the height of this line area.
  -     *
  -     * @return the height of the line area
  -     */
  -    public int getHeight() {
  -        return lineHeight;
  -    }
   
       /**
        * Add a child area to this line area.
  
  
  
  1.3       +1 -1      xml-fop/src/java/org/apache/fop/area/inline/FilledArea.java
  
  Index: FilledArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/inline/FilledArea.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FilledArea.java   27 Feb 2004 17:40:58 -0000      1.2
  +++ FilledArea.java   22 Sep 2004 08:18:42 -0000      1.3
  @@ -57,7 +57,7 @@
        * @return the list of child areas copied to fill the width
        */
       public List getChildAreas() {
  -        int units = (int)(getWidth() / unitWidth);
  +        int units = (int)(getIPD() / unitWidth);
           List newList = new ArrayList();
           for (int count = 0; count < units; count++) {
               newList.addAll(inlines);
  
  
  
  1.5       +1 -91     xml-fop/src/java/org/apache/fop/area/inline/InlineArea.java
  
  Index: InlineArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/inline/InlineArea.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InlineArea.java   27 Feb 2004 17:40:58 -0000      1.4
  +++ InlineArea.java   22 Sep 2004 08:18:42 -0000      1.5
  @@ -19,8 +19,6 @@
   package org.apache.fop.area.inline;
   
   import org.apache.fop.area.Area;
  -import org.apache.fop.area.Trait;
  -import org.apache.fop.traits.BorderProps;
   
   /**
    * Inline Area
  @@ -28,55 +26,11 @@
    * in a line area.
    */
   public class InlineArea extends Area {
  -    // int width;
  -    private int height;
  -    /**
  -     * The content ipd of this inline area
  -     */
  -    protected int contentIPD = 0;
  -
       /**
        * offset position from top of parent area
        */
       protected int verticalPosition = 0;
   
  -    /**
  -     * Set the width of this inline area.
  -     * Currently sets the ipd.
  -     *
  -     * @param w the width
  -     */
  -    public void setWidth(int w) {
  -        contentIPD = w;
  -    }
  -
  -    /**
  -     * Get the width of this inline area.
  -     * Currently gets the ipd.
  -     *
  -     * @return the width
  -     */
  -    public int getWidth() {
  -        return contentIPD;
  -    }
  -
  -    /**
  -     * Set the inline progression dimension of this inline area.
  -     *
  -     * @param ipd the inline progression dimension
  -     */
  -    public void setIPD(int ipd) {
  -        this.contentIPD = ipd;
  -    }
  -
  -    /**
  -     * Get the inline progression dimension
  -     *
  -     * @return the inline progression dimension of this area
  -     */
  -    public int getIPD() {
  -        return this.contentIPD;
  -    }
   
       /**
        * Increase the inline progression dimensions of this area.
  @@ -85,51 +39,7 @@
        * @param ipd the inline progression to increase by
        */
       public void increaseIPD(int ipd) {
  -        this.contentIPD += ipd;
  -    }
  -
  -    /**
  -     * Set the height of this inline area.
  -     *
  -     * @param h the height value to set
  -     */
  -    public void setHeight(int h) {
  -        height = h;
  -    }
  -
  -    /**
  -     * Get the height of this inline area.
  -     *
  -     * @return the height of the inline area
  -     */
  -    public int getHeight() {
  -        return height;
  -    }
  -
  -    /**
  -     * Get the allocation inline progression dimension of this area.
  -     * This adds the content, borders and the padding to find the
  -     * total allocated IPD.
  -     *
  -     * @return the total IPD allocation for this area
  -     */
  -    public int getAllocIPD() {
  -        // If start or end border or padding is non-zero, add to content IPD
  -        int iBP = contentIPD;
  -        Object t;
  -        if ((t = getTrait(Trait.PADDING_START)) != null) {
  -            iBP += ((Integer) t).intValue();
  -        }
  -        if ((t = getTrait(Trait.PADDING_END)) != null) {
  -            iBP += ((Integer) t).intValue();
  -        }
  -        if ((t = getTrait(Trait.BORDER_START)) != null) {
  -            iBP += ((BorderProps) t).width;
  -        }
  -        if ((t = getTrait(Trait.BORDER_END)) != null) {
  -            iBP += ((BorderProps) t).width;
  -        }
  -        return iBP;
  +        this.ipd += ipd;
       }
   
       /**
  
  
  

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

Reply via email to