mirror of https://github.com/apache/poi.git
fix class cast issur recently introduced in BaseXSSFFormulaEvaluator
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1844311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6b433ae8b3
commit
59ee53ca71
|
@ -73,9 +73,14 @@ public abstract class BaseXSSFFormulaEvaluator extends BaseFormulaEvaluator {
|
|||
}
|
||||
|
||||
protected void setCellType(Cell cell, CellType cellType) {
|
||||
if (cell instanceof XSSFCell) {
|
||||
EvaluationWorkbook evaluationWorkbook = getEvaluationWorkbook();
|
||||
BaseXSSFEvaluationWorkbook xewb = BaseXSSFEvaluationWorkbook.class.isAssignableFrom(evaluationWorkbook.getClass()) ? (BaseXSSFEvaluationWorkbook) evaluationWorkbook : null;
|
||||
|
||||
((XSSFCell) cell).setCellType(cellType, xewb);
|
||||
} else {
|
||||
// could be an SXSSFCell
|
||||
cell.setCellType(cellType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue