]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix: Fixes table-cell7 where display-align was off when border and/or padding...
authorJeremias Maerki <jeremias@apache.org>
Thu, 28 Jul 2005 21:20:58 +0000 (21:20 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 28 Jul 2005 21:20:58 +0000 (21:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225890 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java

index 6a01facc5b2383bdec772f178f226be907dd2f99..2819383aea1c43916f59062da9b59c19affee3ef 100644 (file)
@@ -385,21 +385,21 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager implement
         }
 
         //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();