xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r227015 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
Date Tue, 02 Aug 2005 14:31:06 GMT
Author: jeremias
Date: Tue Aug  2 07:31:03 2005
New Revision: 227015

URL: http://svn.apache.org/viewcvs?rev=227015&view=rev
Log:
Padding was ignored by the table stepper. This fixes the newly modified table-cell7.xml.

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

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java?rev=227015&r1=227014&r2=227015&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java Tue Aug
 2 07:31:03 2005
@@ -56,7 +56,9 @@
     private int[] widths;
     private int[] baseWidth;
     private int[] borderBefore;
+    private int[] paddingBefore;
     private int[] borderAfter;
+    private int[] paddingAfter;
     private boolean rowBacktrackForLastStep;
     private boolean[] keepWithNextSignals;
     private boolean[] forcedBreaks;
@@ -78,7 +80,9 @@
         widths = new int[columnCount];
         baseWidth = new int[columnCount];
         borderBefore = new int[columnCount];
+        paddingBefore = new int[columnCount];
         borderAfter = new int[columnCount];
+        paddingAfter = new int[columnCount];
         keepWithNextSignals = new boolean[columnCount];
         forcedBreaks = new boolean[columnCount];
         Arrays.fill(end, -1);
@@ -134,6 +138,7 @@
                 int len = widths[i]; 
                 if (len > 0) {
                     len += borderBefore[i] + borderAfter[i]; 
+                    len += paddingBefore[i] + paddingAfter[i]; 
                 }
                 int nominalHeight = rowGroup[activeRow].getHeight().opt;
                 for (int r = 0; r < gu.getRowSpanIndex(); r++) {
@@ -197,6 +202,8 @@
             } else {
                 borderBefore[column] = pgu.getBorders().getBorderBeforeWidth(false) / 2;
             }
+            paddingBefore[column] = pgu.getBorders().getPaddingBefore(false);
+            paddingAfter[column] = pgu.getBorders().getPaddingAfter(false);
             start[column] = 0;
             end[column] = -1;
             widths[column] = 0;
@@ -294,6 +301,8 @@
                     = getTableLM().getTable().getCommonBorderPaddingBackground(); 
                 effPenaltyLen += borders.getBorderBeforeWidth(false); 
                 effPenaltyLen += borders.getBorderAfterWidth(false); 
+                effPenaltyLen += borders.getPaddingBefore(false); 
+                effPenaltyLen += borders.getPaddingAfter(false); 
             }
             TableContentPosition tcpos = new TableContentPosition(getTableLM(), 
                     gridUnitParts, getActiveRow());
@@ -458,6 +467,7 @@
                 }
             }
             log.debug("borders before=" + borderBefore[i] + " after=" + borderAfter[i]);
+            log.debug("padding before=" + paddingBefore[i] + " after=" + paddingAfter[i]);
         }
         if (seqCount == 0) {
             return -1;
@@ -472,6 +482,7 @@
                 baseWidth[i] += rowGroup[prevRow].getHeight().opt;
             }
             baseWidth[i] += borderBefore[i] + borderAfter[i];
+            baseWidth[i] += paddingBefore[i] + paddingAfter[i];
             if (end[i] >= start[i]) {
                 int len = baseWidth[i] + widths[i];
                 sb.append(len + " ");



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


Mime
View raw message