aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2016-07-04 11:54:20 +0000
committerJaven O'Neal <onealj@apache.org>2016-07-04 11:54:20 +0000
commit5582593ad1f8712c7804e1d83bd5aea836ceb522 (patch)
treed88011b98ebabe59c05f8f77a26a09cf9958de88 /src/examples
parent8a9cb7c66b24d2e2fe1f71199a10cab9d62dbe7c (diff)
downloadpoi-5582593ad1f8712c7804e1d83bd5aea836ceb522.tar.gz
poi-5582593ad1f8712c7804e1d83bd5aea836ceb522.zip
bug 59791: getCellType and getCachedFormulaResultType should return an integer for backwards compatibility
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java2
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java2
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java2
-rw-r--r--src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java2
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java6
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/ToCSV.java2
-rw-r--r--src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java4
7 files changed, 10 insertions, 10 deletions
diff --git a/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java b/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java
index 6470fe923b..2f67f7f0e5 100644
--- a/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java
+++ b/src/examples/src/org/apache/poi/hssf/usermodel/examples/HSSFReadWrite.java
@@ -185,7 +185,7 @@ public final class HSSFReadWrite {
HSSFCell cell = row.getCell(c);
String value = null;
- switch (cell.getCellType()) {
+ switch (cell.getCellTypeEnum()) {
case FORMULA:
value = "FORMULA value=" + cell.getCellFormula();
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java b/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
index b33d8cba10..8f95e03fbe 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
@@ -142,7 +142,7 @@ public class SVSheetTable extends JTable {
HSSFCell cell = (HSSFCell) getValueAt(row, col);
String formula = "";
if (cell != null) {
- if (cell.getCellType() == CellType.FORMULA) {
+ if (cell.getCellTypeEnum() == CellType.FORMULA) {
formula = cell.getCellFormula();
} else {
formula = cell.toString();
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java b/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
index c4a2d1dd08..56d3e58a7d 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
@@ -151,7 +151,7 @@ public class SVTableCellEditor extends AbstractCellEditor implements TableCellEd
//Set the value that is rendered for the cell
- switch (cell.getCellType()) {
+ switch (cell.getCellTypeEnum()) {
case BLANK:
editor.setText("");
break;
diff --git a/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java b/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
index e77a18196c..6f05b09783 100644
--- a/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
+++ b/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
@@ -165,7 +165,7 @@ public class SVTableCellRenderer extends JLabel
isBorderSet=true;
//Set the value that is rendered for the cell
- switch (c.getCellType()) {
+ switch (c.getCellTypeEnum()) {
case BLANK:
setValue("");
break;
diff --git a/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java b/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java
index 0a35eaa116..dce4b0196e 100644
--- a/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java
+++ b/src/examples/src/org/apache/poi/ss/examples/ExcelComparator.java
@@ -179,7 +179,7 @@ public class ExcelComparator {
private void compareDataInCell(Locator loc1, Locator loc2) {
if (isCellTypeMatches(loc1, loc2)) {
- final CellType loc1cellType = loc1.cell.getCellType();
+ final CellType loc1cellType = loc1.cell.getCellTypeEnum();
switch(loc1cellType) {
case BLANK:
case STRING:
@@ -581,8 +581,8 @@ public class ExcelComparator {
* Checks if cell type matches.
*/
private boolean isCellTypeMatches(Locator loc1, Locator loc2) {
- CellType type1 = loc1.cell.getCellType();
- CellType type2 = loc2.cell.getCellType();
+ CellType type1 = loc1.cell.getCellTypeEnum();
+ CellType type2 = loc2.cell.getCellTypeEnum();
if (type1 == type2) return true;
addMessage(loc1, loc2,
"Cell Data-Type does not Match in :: ",
diff --git a/src/examples/src/org/apache/poi/ss/examples/ToCSV.java b/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
index 616f838706..e8bca901f8 100644
--- a/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
+++ b/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
@@ -542,7 +542,7 @@ public class ToCSV {
csvLine.add("");
}
else {
- if(cell.getCellType() != CellType.FORMULA) {
+ if(cell.getCellTypeEnum() != CellType.FORMULA) {
csvLine.add(this.formatter.formatCellValue(cell));
}
else {
diff --git a/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java b/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
index 3f2ef7ea09..59cf4180f1 100644
--- a/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
+++ b/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java
@@ -336,9 +336,9 @@ public class ToHtml {
}
private static CellType ultimateCellType(Cell c) {
- CellType type = c.getCellType();
+ CellType type = c.getCellTypeEnum();
if (type == CellType.FORMULA)
- type = c.getCachedFormulaResultType();
+ type = c.getCachedFormulaResultTypeEnum();
return type;
}