*/
public class EmptyGridUnit extends GridUnit {
- private TableBody body;
-
/**
* @param table the containing table
* @param row the table-row element this grid unit belongs to (if any)
return false;
}
- /** {@inheritDoc} */
- public TableBody getBody() {
- return this.body;
- }
-
/** {@inheritDoc} */
public boolean isLastGridUnitColSpan() {
return true;
package org.apache.fop.fo.flow.table;
-import org.apache.fop.fo.FONode;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo;
import org.apache.fop.layoutmgr.table.CollapsingBorderModel;
this.row = row;
}
- public TableBody getBody() {
- FONode node = getCell();
- while (node != null && !(node instanceof TableBody)) {
- node = node.getParent();
- }
- return (TableBody) node;
- }
-
/**
* Returns the before-start grid unit of the cell containing this grid unit.
*
import java.util.List;
import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.FONode;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.layoutmgr.ElementListUtils;
import org.apache.fop.layoutmgr.table.TableCellLayoutManager;
.getValue() / 2; // TODO
}
+ /**
+ * Returns the fo:table-header/footer/body element containing this cell.
+ *
+ * @return the enclosing table part
+ */
+ public TableBody getTableBody() {
+ FONode node = cell.getParent();
+ if (node instanceof TableRow) {
+ node = node.getParent();
+ }
+ return (TableBody) node;
+ }
+
public TableCellLayoutManager getCellLM() {
assert cellLM != null;
return cellLM;
lst.add(tcpos);
CellPart part = (CellPart)tcpos.cellParts.get(0);
if (body == null) {
- body = part.pgu.getBody();
+ body = part.pgu.getTableBody();
}
if (tcpos.getFlag(TableContentPosition.FIRST_IN_ROWGROUP)
&& tcpos.getRow().getFlag(EffRow.FIRST_IN_PART)) {