_cell.setS(idx);
}
}
+
+ private boolean isFormulaCell() {
+ if (_cell.getF() != null || getSheet().isCellInArrayFormulaContext(this)) {
+ return true;
+ }
+ return false;
+ }
/**
* Return the cell type.
*/
@Override
public int getCellType() {
-
- if (_cell.getF() != null || getSheet().isCellInArrayFormulaContext(this)) {
- return CELL_TYPE_FORMULA;
- }
+ if (isFormulaCell()) return CELL_TYPE_FORMULA;
return getBaseCellType(true);
}
*/
@Override
public int getCachedFormulaResultType() {
- if (_cell.getF() == null) {
+ if (! isFormulaCell()) {
throw new IllegalStateException("Only formula cells have cached results");
}