]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Small simplification: remove an unneeded parameter from the getContentHeight method
authorVincent Hennebert <vhennebert@apache.org>
Thu, 1 Mar 2007 17:10:14 +0000 (17:10 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Thu, 1 Mar 2007 17:10:14 +0000 (17:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@513407 13f79535-47bb-0310-9956-ffa450edef68

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

index 8172edb50fac584f8a79ede00c4417fbad7d3a94..223d80a7f4fac523e55257c5eb5ddbdc641d2f66 100644 (file)
@@ -315,7 +315,12 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager
         rowHeight = h;
     }
 
-    private int getContentHeight(int rowHeight, GridUnit gu) {
+    /**
+     * Returns the bpd of the given grid unit.
+     * @param gu a grid unit belonging to this cell
+     * @return the content height of the grid unit
+     */
+    private int getContentHeight(GridUnit gu) {
         int bpd = rowHeight;
         if (isSeparateBorderModel()) {
             bpd -= gu.getPrimary().getBorders().getBorderBeforeWidth(false);
@@ -377,7 +382,7 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager
                         block.addTrait(Trait.IS_REFERENCE_AREA, Boolean.TRUE);
                         block.setPositioning(Block.ABSOLUTE);
 
-                        int bpd = getContentHeight(rowHeight, gu);
+                        int bpd = getContentHeight(gu);
                         if (isSeparateBorderModel()) {
                             bpd += (gu.getBorders().getBorderBeforeWidth(false));
                             bpd += (gu.getBorders().getBorderAfterWidth(false));
@@ -412,7 +417,7 @@ public class TableCellLayoutManager extends BlockStackingLayoutManager
         }
 
         //Handle display-align
-        int contentBPD = getContentHeight(rowHeight, gridUnit);
+        int contentBPD = getContentHeight(gridUnit);
         if (usedBPD < contentBPD) {
             if (getTableCell().getDisplayAlign() == EN_CENTER) {
                 Block space = new Block();