jeremias    2005/02/11 04:19:05

  Modified:    src/java/org/apache/fop/fo/flow TableCell.java
               src/java/org/apache/fop/layoutmgr/table Cell.java
  Log:
  empty-cells implemented.
  
  Revision  Changes    Path
  1.46      +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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- TableCell.java    8 Feb 2005 16:16:48 -0000       1.45
  +++ TableCell.java    11 Feb 2005 12:19:04 -0000      1.46
  @@ -298,6 +298,11 @@
           return Math.max(columnNumber.getValue(), 0);
       }
   
  +    /** @return true if "empty-cells" is "show" */
  +    public boolean showEmptyCells() {
  +        return (this.emptyCells == EN_SHOW);
  +    }
  +    
       /**
        * @return the "id" property.
        */
  
  
  
  1.20      +10 -3     xml-fop/src/java/org/apache/fop/layoutmgr/table/Cell.java
  
  Index: Cell.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/table/Cell.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Cell.java 9 Feb 2005 11:51:30 -0000       1.19
  +++ Cell.java 11 Feb 2005 12:19:05 -0000      1.20
  @@ -34,7 +34,6 @@
   import org.apache.fop.layoutmgr.TraitSetter;
   import org.apache.fop.area.Area;
   import org.apache.fop.area.Block;
  -import org.apache.fop.area.CTM;
   import org.apache.fop.area.Trait;
   import org.apache.fop.traits.MinOptMax;
   
  @@ -61,6 +60,7 @@
       private int rowHeight;
       private int usedBPD;
       private int borderAndPaddingBPD;
  +    private boolean emptyCell = true;
   
       /**
        * Create a new Cell layout manager.
  @@ -168,6 +168,9 @@
               }
               
               usedBPD = stackSize.opt;
  +            if (usedBPD > 0) {
  +                emptyCell = false;
  +            }
               
               LengthRangeProperty specifiedBPD = 
fobj.getBlockProgressionDimension();
               if (specifiedBPD.getEnum() != EN_AUTO) {
  @@ -249,6 +252,12 @@
               addID(fobj.getId());
           }
   
  +        if (!emptyCell || (getTable().getBorderCollapse() == EN_SEPARATE 
  +                && fobj.showEmptyCells())) {
  +            TraitSetter.addBorders(curBlockArea, 
fobj.getCommonBorderPaddingBackground());
  +            TraitSetter.addBackground(curBlockArea, 
fobj.getCommonBorderPaddingBackground());
  +        }
  +
           //Handle display-align
           if (usedBPD < rowHeight) {
               if (fobj.getDisplayAlign() == EN_CENTER) {
  @@ -277,8 +286,6 @@
               }
           }
   
  -        TraitSetter.addBorders(curBlockArea, 
fobj.getCommonBorderPaddingBackground());
  -        TraitSetter.addBackground(curBlockArea, 
fobj.getCommonBorderPaddingBackground());
           
           int contentBPD = rowHeight;
           contentBPD -= borderAndPaddingBPD;
  
  
  

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

Reply via email to