use of org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSdtCell in project poi by apache.
the class XWPFTableRow method getTableICells.
/**
* create and return a list of all XWPFTableCell
* who belongs to this row
*
* @return a list of {@link XWPFTableCell}
*/
public List<ICell> getTableICells() {
List<ICell> cells = new ArrayList<ICell>();
//Can't use ctRow.getTcList because that only gets table cells
//Can't use ctRow.getSdtList because that only gets sdts that are at cell level
XmlCursor cursor = ctRow.newCursor();
cursor.selectPath("./*");
while (cursor.toNextSelection()) {
XmlObject o = cursor.getObject();
if (o instanceof CTTc) {
cells.add(new XWPFTableCell((CTTc) o, this, table.getBody()));
} else if (o instanceof CTSdtCell) {
cells.add(new XWPFSDTCell((CTSdtCell) o, this, table.getBody()));
}
}
cursor.dispose();
return cells;
}