diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2008-01-24 16:51:53 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2008-01-24 16:51:53 +0000 |
commit | 6228167d445d4116243142819a9ce214b4cf4fa8 (patch) | |
tree | bb9dfd4526d81267bde58292f8e35de46862a7b0 /src | |
parent | c1492fcb2473e44a309be8fd5e432f1cc7744d4c (diff) | |
download | xmlgraphics-fop-6228167d445d4116243142819a9ce214b4cf4fa8.tar.gz xmlgraphics-fop-6228167d445d4116243142819a9ce214b4cf4fa8.zip |
Removed no longer needed reference to TableColumn in GridUnit
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@614924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
4 files changed, 15 insertions, 32 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/EmptyGridUnit.java b/src/java/org/apache/fop/fo/flow/table/EmptyGridUnit.java index 1f0f7be04..ac793f889 100644 --- a/src/java/org/apache/fop/fo/flow/table/EmptyGridUnit.java +++ b/src/java/org/apache/fop/fo/flow/table/EmptyGridUnit.java @@ -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} */ diff --git a/src/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java b/src/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java index 51279c399..b0126dff0 100644 --- a/src/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java +++ b/src/java/org/apache/fop/fo/flow/table/FixedColRowGroupBuilder.java @@ -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; } diff --git a/src/java/org/apache/fop/fo/flow/table/GridUnit.java b/src/java/org/apache/fop/fo/flow/table/GridUnit.java index 75d0c5516..edf0c99ea 100644 --- a/src/java/org/apache/fop/fo/flow/table/GridUnit.java +++ b/src/java/org/apache/fop/fo/flow/table/GridUnit.java @@ -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. * diff --git a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java index b73cd62d7..4c4ffa9ce 100644 --- a/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java +++ b/src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java @@ -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 } |