]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed no longer needed reference to TableColumn in GridUnit
authorVincent Hennebert <vhennebert@apache.org>
Thu, 24 Jan 2008 16:51:53 +0000 (16:51 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Thu, 24 Jan 2008 16:51:53 +0000 (16:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@614924 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/flow/table/EmptyGridUnit.java
src/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java
src/java/org/apache/fop/fo/flow/table/GridUnit.java
src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java

index 1f0f7be04b77fa4db8877e063fcd8c58c54cb3f5..ac793f889ebdc6e2ef988773b14f24f422ad53b9 100644 (file)
@@ -33,7 +33,7 @@ public class EmptyGridUnit extends GridUnit {
      * @param colIndex column index, 0-based
      */
     EmptyGridUnit(Table table, TableRow row, int colIndex) {
-        super(table, row, table.getColumn(colIndex), 0, 0);
+        super(table, row, 0, 0);
     }
 
     /** {@inheritDoc} */
index 51279c3996ee72c6cc7b960be74d6341bad9fc39..b0126dff0a6760afbcb889547eacba5c45d04437 100644 (file)
@@ -79,15 +79,14 @@ class FixedColRowGroupBuilder extends RowGroupBuilder {
             rows.add(effRow);
         }
         int columnIndex = cell.getColumnNumber() - 1;
-        PrimaryGridUnit pgu = new PrimaryGridUnit(cell, currentTableRow,
-                table.getColumn(columnIndex), columnIndex);
+        PrimaryGridUnit pgu = new PrimaryGridUnit(cell, currentTableRow, columnIndex);
         List row = (List) rows.get(currentRowIndex);
         row.set(columnIndex, pgu);
         // TODO
         GridUnit[] cellRow = new GridUnit[cell.getNumberColumnsSpanned()];
         cellRow[0] = pgu;
         for (int j = 1; j < cell.getNumberColumnsSpanned(); j++) {
-            GridUnit gu = new GridUnit(pgu, currentTableRow, table.getColumn(columnIndex + j), j, 0);
+            GridUnit gu = new GridUnit(pgu, currentTableRow, j, 0);
             row.set(columnIndex + j, gu);
             cellRow[j] = gu;
         }
@@ -96,8 +95,7 @@ class FixedColRowGroupBuilder extends RowGroupBuilder {
             row = (List) rows.get(currentRowIndex + i);
             cellRow = new GridUnit[cell.getNumberColumnsSpanned()];
             for (int j = 0; j < cell.getNumberColumnsSpanned(); j++) {
-                GridUnit gu = new GridUnit(pgu, currentTableRow, table.getColumn(columnIndex + j),
-                        j, i);
+                GridUnit gu = new GridUnit(pgu, currentTableRow, j, i);
                 row.set(columnIndex + j, gu);
                 cellRow[j] = gu;
             }
index 75d0c55165f2bbbbd75bc2d443b19d49881f55ad..edf0c99ea30cd92880fb44bc0c44ffec3bfb2d2b 100644 (file)
@@ -56,9 +56,6 @@ public class GridUnit {
     /** Table row occupied by this grid unit (may be null). */
     private TableRow row;
 
-    /** Table column that this grid unit belongs to */
-    private TableColumn column;
-
     /** index of grid unit within cell in column direction */
     private int colSpanIndex;
 
@@ -80,13 +77,11 @@ public class GridUnit {
      * 
      * @param table the containing table
      * @param row the table-row element this grid unit belongs to (if any)
-     * @param column table column this grid unit belongs to
      * @param colSpanIndex index of this grid unit in the span, in column direction
      * @param rowSpanIndex index of this grid unit in the span, in row direction
      */
-    protected GridUnit(Table table, TableRow row, TableColumn column, int colSpanIndex,
-            int rowSpanIndex) {
-        this(row, column, colSpanIndex, rowSpanIndex);
+    protected GridUnit(Table table, TableRow row, int colSpanIndex, int rowSpanIndex) {
+        this(row, colSpanIndex, rowSpanIndex);
         setBorders(table);
     }
 
@@ -95,13 +90,11 @@ public class GridUnit {
      * 
      * @param cell table cell which occupies this grid unit
      * @param row the table-row element this grid unit belongs to (if any)
-     * @param column table column this grid unit belongs to
      * @param colSpanIndex index of this grid unit in the span, in column direction
      * @param rowSpanIndex index of this grid unit in the span, in row direction
      */
-    protected GridUnit(TableCell cell, TableRow row, TableColumn column, int colSpanIndex,
-            int rowSpanIndex) {
-        this(row, column, colSpanIndex, rowSpanIndex);
+    protected GridUnit(TableCell cell, TableRow row, int colSpanIndex, int rowSpanIndex) {
+        this(row, colSpanIndex, rowSpanIndex);
         this.cell = cell;
         setBorders(cell.getTable());
     }
@@ -111,19 +104,16 @@ public class GridUnit {
      * 
      * @param primary the before-start grid unit of the cell containing this grid unit
      * @param row the table-row element this grid unit belongs to (if any)
-     * @param column table column this grid unit belongs to
      * @param colSpanIndex index of this grid unit in the span, in column direction
      * @param rowSpanIndex index of this grid unit in the span, in row direction
      */
-    GridUnit(PrimaryGridUnit primary, TableRow row, TableColumn column, int colSpanIndex,
-            int rowSpanIndex) {
-        this(primary.getCell(), row, column, colSpanIndex, rowSpanIndex);
+    GridUnit(PrimaryGridUnit primary, TableRow row, int colSpanIndex, int rowSpanIndex) {
+        this(primary.getCell(), row, colSpanIndex, rowSpanIndex);
         this.primary = primary;
     }
 
-    private GridUnit(TableRow row, TableColumn column, int colSpanIndex, int rowSpanIndex) {
+    private GridUnit(TableRow row, int colSpanIndex, int rowSpanIndex) {
         this.row = row;
-        this.column = column;
         this.colSpanIndex = colSpanIndex;
         this.rowSpanIndex = rowSpanIndex;
     }
@@ -165,10 +155,6 @@ public class GridUnit {
         return cell;
     }
 
-    public TableColumn getColumn() {
-        return column;
-    }
-
     /**
      * Returns the fo:table-row element (if any) this grid unit belongs to.
      * 
index b73cd62d7a040c0eaf7eeb31d894d49404f31a53..4c4ffa9cea641a3f28697a1a30b66e2074efa9a0 100644 (file)
@@ -56,14 +56,13 @@ public class PrimaryGridUnit extends GridUnit {
      *
      * @param cell table cell which occupies this grid unit
      * @param row the table-row element this grid unit belongs to (if any)
-     * @param column table column this grid unit belongs to
      * @param colIndex index of the column this grid unit belongs to, zero-based
      */
-    PrimaryGridUnit(TableCell cell, TableRow row, TableColumn column, int colIndex) {
-        super(cell, row, column, 0, 0);
+    PrimaryGridUnit(TableCell cell, TableRow row, int colIndex) {
+        super(cell, row, 0, 0);
         this.colIndex = colIndex;
-        this.isSeparateBorderModel = column.getTable().isSeparateBorderModel(); // TODO
-        this.halfBorderSeparationBPD = column.getTable().getBorderSeparation().getBPD().getLength()
+        this.isSeparateBorderModel = cell.getTable().isSeparateBorderModel(); // TODO
+        this.halfBorderSeparationBPD = cell.getTable().getBorderSeparation().getBPD().getLength()
                 .getValue() / 2;  // TODO
     }