From 1eaf48528e3878050d2659c0a5ae39861daa3972 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 28 Jul 2005 21:20:58 +0000 Subject: [PATCH] Bugfix: Fixes table-cell7 where display-align was off when border and/or padding was used. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225890 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/layoutmgr/table/TableCellLayoutManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java index 6a01facc5..2819383ae 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java @@ -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(); -- 2.39.5