import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.helpers.RowShifter;
import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.ss.util.CellUtil;
import org.apache.poi.util.Beta;
import org.apache.poi.util.Internal;
import org.apache.poi.xssf.model.StylesTable;
// srcRow is blank. Overwrite cells with blank values, blank styles, etc per cell copy policy
for (Cell destCell : this) {
final XSSFCell srcCell = null;
- // FIXME: remove type casting when copyCellFrom(Cell, CellCopyPolicy) is added to Cell interface
- ((XSSFCell)destCell).copyCellFrom(srcCell, policy);
+ CellUtil.copyCell(srcCell, destCell, policy);
}
if (policy.isCopyMergedRegions()) {
}
else {
- for (final Cell c : srcRow){
- final XSSFCell srcCell = (XSSFCell)c;
- final XSSFCell destCell = createCell(srcCell.getColumnIndex());
- destCell.copyCellFrom(srcCell, policy);
+ for (final Cell c : srcRow) {
+ final XSSFCell destCell = createCell(c.getColumnIndex());
+ destCell.copyCellFrom(c, policy);
}
final int sheetIndex = _sheet.getWorkbook().getSheetIndex(_sheet);