You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/07/28 23:21:01 UTC

svn commit: r225890 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java

Author: jeremias
Date: Thu Jul 28 14:20:58 2005
New Revision: 225890

URL: http://svn.apache.org/viewcvs?rev=225890&view=rev
Log:
Bugfix: Fixes table-cell7 where display-align was off when border and/or padding was used.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java?rev=225890&r1=225889&r2=225890&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java Thu Jul 28 14:20:58 2005
@@ -385,21 +385,21 @@
         }
 
         //Handle display-align
-        if (usedBPD < rowHeight) {
+        int contentBPD = getContentHeight(rowHeight, gridUnit);
+        if (usedBPD < contentBPD) {
             if (fobj.getDisplayAlign() == EN_CENTER) {
                 Block space = new Block();
-                space.setBPD((rowHeight - usedBPD) / 2);
+                space.setBPD((contentBPD - usedBPD) / 2);
                 curBlockArea.addBlock(space);
             } else if (fobj.getDisplayAlign() == EN_AFTER) {
                 Block space = new Block();
-                space.setBPD((rowHeight - usedBPD));
+                space.setBPD((contentBPD - usedBPD));
                 curBlockArea.addBlock(space);
             }
         }
 
         AreaAdditionUtil.addAreas(this, parentIter, layoutContext);
         
-        int contentBPD = getContentHeight(rowHeight, gridUnit);
         curBlockArea.setBPD(contentBPD);
 
         flush();



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org