/* package */ XSLFTableCell(CTTableCell cell, XSLFTable table) { super(cell, table.getSheet()); this.table = table; }
/** * Get assigned TableStyle * * @return the assigned TableStyle * * @since POI 3.15-beta2 */ protected XSLFTableStyle getTableStyle() { CTTable tab = getCTTable(); // TODO: support inline table style if (!tab.isSetTblPr() || !tab.getTblPr().isSetTableStyleId()) { return null; } String styleId = tab.getTblPr().getTableStyleId(); XSLFTableStyles styles = getSheet().getSlideShow().getTableStyles(); for (XSLFTableStyle style : styles.getStyles()) { if (style.getStyleId().equals(styleId)) { return style; } } return null; }
/* package */ XSLFTableCell(CTTableCell cell, XSLFTable table) { super(cell, table.getSheet()); this.table = table; }
/*package*/ XSLFTableRow(CTTableRow row, XSLFTable table){ _row = row; _table = table; _cells = new ArrayList<XSLFTableCell>(_row.sizeOfTcArray()); for(CTTableCell cell : _row.getTcList()) { _cells.add(new XSLFTableCell(cell, table.getSheet())); } }
public XSLFTableCell addCell(){ CTTableCell c = _row.addNewTc(); c.set(XSLFTableCell.prototype()); XSLFTableCell cell = new XSLFTableCell(c, _table.getSheet()); _cells.add(cell); if(_table.getNumberOfColumns() < _row.sizeOfTcArray()) { _table.getCTTable().getTblGrid().addNewGridCol().setW(Units.toEMU(100.0)); } return cell; }
/** * Get assigned TableStyle * * @return the assigned TableStyle * * @since POI 3.15-beta2 */ protected XSLFTableStyle getTableStyle() { CTTable tab = getCTTable(); // TODO: support inline table style if (!tab.isSetTblPr() || !tab.getTblPr().isSetTableStyleId()) { return null; } String styleId = tab.getTblPr().getTableStyleId(); XSLFTableStyles styles = getSheet().getSlideShow().getTableStyles(); for (XSLFTableStyle style : styles.getStyles()) { if (style.getStyleId().equals(styleId)) { return style; } } return null; }