aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2017-09-18 13:38:07 +0000
committerPJ Fanning <fanningpj@apache.org>2017-09-18 13:38:07 +0000
commite3ddb77bc18cd01735d3ce98afecf6ec5ab984dd (patch)
treec3b344f5c1a15519ea15ecc4e4f5d1c5e96f3bec /src/java
parentbc0c0b19d27e1144c0abd3e284b9f924535ef50a (diff)
downloadpoi-e3ddb77bc18cd01735d3ce98afecf6ec5ab984dd.tar.gz
poi-e3ddb77bc18cd01735d3ce98afecf6ec5ab984dd.zip
update getCellType to return CellType enum instead of int
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808703 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java8
-rw-r--r--src/java/org/apache/poi/ss/util/SheetUtil.java4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java b/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java
index 866669016f..c6dadfff7f 100644
--- a/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java
+++ b/src/java/org/apache/poi/ss/formula/DataValidationEvaluator.java
@@ -255,10 +255,10 @@ public class DataValidationEvaluator {
* @return true if the cell or cached cell formula result type match the given type
*/
public static boolean isType(Cell cell, CellType type) {
- final CellType cellType = cell.getCellTypeEnum();
+ final CellType cellType = cell.getCellType();
return cellType == type
|| (cellType == CellType.FORMULA
- && cell.getCachedFormulaResultTypeEnum() == type
+ && cell.getCachedFormulaResultType() == type
);
}
diff --git a/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java b/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
index b1fe124d56..127978eedb 100644
--- a/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
+++ b/src/java/org/apache/poi/ss/formula/WorkbookEvaluator.java
@@ -250,7 +250,7 @@ public final class WorkbookEvaluator {
// avoid tracking dependencies to cells that have constant definition
boolean shouldCellDependencyBeRecorded = _stabilityClassifier == null ? true
: !_stabilityClassifier.isCellFinal(sheetIndex, rowIndex, columnIndex);
- if (srcCell == null || srcCell.getCellTypeEnum() != CellType.FORMULA) {
+ if (srcCell == null || srcCell.getCellType() != CellType.FORMULA) {
ValueEval result = getValueFromNonFormulaCell(srcCell);
if (shouldCellDependencyBeRecorded) {
tracker.acceptPlainValueDependency(_workbookIx, sheetIndex, rowIndex, columnIndex, result);
@@ -288,7 +288,7 @@ public final class WorkbookEvaluator {
} catch (RuntimeException re) {
if (re.getCause() instanceof WorkbookNotFoundException && _ignoreMissingWorkbooks) {
logInfo(re.getCause().getMessage() + " - Continuing with cached value!");
- switch(srcCell.getCachedFormulaResultTypeEnum()) {
+ switch(srcCell.getCachedFormulaResultType()) {
case NUMERIC:
result = new NumberEval(srcCell.getNumericCellValue());
break;
@@ -306,7 +306,7 @@ public final class WorkbookEvaluator {
break;
case FORMULA:
default:
- throw new RuntimeException("Unexpected cell type '" + srcCell.getCellTypeEnum()+"' found!");
+ throw new RuntimeException("Unexpected cell type '" + srcCell.getCellType()+"' found!");
}
} else {
throw re;
@@ -359,7 +359,7 @@ public final class WorkbookEvaluator {
if (cell == null) {
return BlankEval.instance;
}
- CellType cellType = cell.getCellTypeEnum();
+ CellType cellType = cell.getCellType();
switch (cellType) {
case NUMERIC:
return new NumberEval(cell.getNumericCellValue());
diff --git a/src/java/org/apache/poi/ss/util/SheetUtil.java b/src/java/org/apache/poi/ss/util/SheetUtil.java
index 075420478e..e01b8a3b37 100644
--- a/src/java/org/apache/poi/ss/util/SheetUtil.java
+++ b/src/java/org/apache/poi/ss/util/SheetUtil.java
@@ -138,11 +138,11 @@ public class SheetUtil {
}
CellStyle style = cell.getCellStyle();
- CellType cellType = cell.getCellTypeEnum();
+ CellType cellType = cell.getCellType();
// for formula cells we compute the cell width for the cached formula result
if (cellType == CellType.FORMULA)
- cellType = cell.getCachedFormulaResultTypeEnum();
+ cellType = cell.getCachedFormulaResultType();
Font font = wb.getFontAt(style.getFontIndex());