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 30ce49f8e..d0889cc11 100644 --- a/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java +++ b/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java @@ -144,7 +144,7 @@ public class SVSheetTable extends JTable { HSSFCell cell = (HSSFCell) getValueAt(row, col); String formula = ""; if (cell != null) { - if (cell.getCellTypeEnum() == CellType.FORMULA) { + if (cell.getCellType() == 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 9db98d95e..3de27df0d 100644 --- a/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java +++ b/src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java @@ -166,7 +166,7 @@ public class SVTableCellEditor extends AbstractCellEditor implements TableCellEd //Set the value that is rendered for the cell - switch (cell.getCellTypeEnum()) { + switch (cell.getCellType()) { 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 fe7163c8c..ab8b1faf6 100644 --- a/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java +++ b/src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java @@ -168,7 +168,7 @@ public class SVTableCellRenderer extends JLabel isBorderSet=true; //Set the value that is rendered for the cell - switch (c.getCellTypeEnum()) { + switch (c.getCellType()) { case BLANK: setValue(""); break; 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 af486dbc9..a2e39c4c6 100644 --- a/src/examples/src/org/apache/poi/ss/examples/ToCSV.java +++ b/src/examples/src/org/apache/poi/ss/examples/ToCSV.java @@ -544,7 +544,7 @@ public class ToCSV { csvLine.add(""); } else { - if(cell.getCellTypeEnum() != CellType.FORMULA) { + if(cell.getCellType() != CellType.FORMULA) { csvLine.add(this.formatter.formatCellValue(cell)); } else { diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java index 4b947959e..88b55d535 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java @@ -102,7 +102,7 @@ public class HSSFHyperlink implements Hyperlink { link_type = getType(record); } else { - link_type = other.getTypeEnum(); + link_type = other.getType(); record = new HyperlinkRecord(); setFirstRow(other.getFirstRow()); setFirstColumn(other.getFirstColumn()); diff --git a/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java b/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java index cc27e66c4..c9b408fa5 100644 --- a/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java +++ b/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java @@ -62,7 +62,7 @@ final class SheetRefEvaluator { public boolean isSubTotal(int rowIndex, int columnIndex){ boolean subtotal = false; EvaluationCell cell = getSheet().getCell(rowIndex, columnIndex); - if(cell != null && cell.getCellTypeEnum() == CellType.FORMULA){ + if(cell != null && cell.getCellType() == CellType.FORMULA){ EvaluationWorkbook wb = _bookEvaluator.getWorkbook(); for(Ptg ptg : wb.getFormulaTokens(cell)){ if(ptg instanceof FuncVarPtg){ diff --git a/src/java/org/apache/poi/ss/usermodel/DataFormatter.java b/src/java/org/apache/poi/ss/usermodel/DataFormatter.java index 6bcf20009..1df507f22 100644 --- a/src/java/org/apache/poi/ss/usermodel/DataFormatter.java +++ b/src/java/org/apache/poi/ss/usermodel/DataFormatter.java @@ -978,7 +978,7 @@ public class DataFormatter implements Observer { return ""; } - CellType cellType = cell.getCellTypeEnum(); + CellType cellType = cell.getCellType(); if (cellType == CellType.FORMULA) { if (evaluator == null) { return cell.getCellFormula(); diff --git a/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java b/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java index a0d293c78..bca76a376 100644 --- a/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java +++ b/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java @@ -42,7 +42,7 @@ public class DataSources { return new AbstractCellRangeDataSource(sheet, cellRangeAddress) { public Number getPointAt(int index) { CellValue cellValue = getCellValueAt(index); - if (cellValue != null && cellValue.getCellTypeEnum() == CellType.NUMERIC) { + if (cellValue != null && cellValue.getCellType() == CellType.NUMERIC) { return Double.valueOf(cellValue.getNumberValue()); } else { return null; @@ -59,7 +59,7 @@ public class DataSources { return new AbstractCellRangeDataSource(sheet, cellRangeAddress) { public String getPointAt(int index) { CellValue cellValue = getCellValueAt(index); - if (cellValue != null && cellValue.getCellTypeEnum() == CellType.STRING) { + if (cellValue != null && cellValue.getCellType() == CellType.STRING) { return cellValue.getStringValue(); } else { return null; diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java index 9cb9f698c..503dd8257 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java @@ -392,7 +392,7 @@ public class SXSSFCell implements Cell { * For strings we throw an exception. For blank cells we return a null. *

* @return the value of the cell as a date - * @throws IllegalStateException if the cell type returned by {@link #getCellTypeEnum()} is CellType.STRING + * @throws IllegalStateException if the cell type returned by {@link #getCellType()} is CellType.STRING * @exception NumberFormatException if the cell value isn't a parsable double. * @see org.apache.poi.ss.usermodel.DataFormatter for formatting this date into a string similar to how excel does. */ @@ -512,7 +512,7 @@ public class SXSSFCell implements Cell { * For strings, numbers, and errors, we throw an exception. For blank cells we return a false. *

* @return the value of the cell as a boolean - * @throws IllegalStateException if the cell type returned by {@link #getCellTypeEnum()} + * @throws IllegalStateException if the cell type returned by {@link #getCellType()} * is not CellType.BOOLEAN, CellType.BLANK or CellType.FORMULA */ @Override @@ -547,7 +547,7 @@ public class SXSSFCell implements Cell { *

* * @return the value of the cell as an error code - * @throws IllegalStateException if the cell type returned by {@link #getCellTypeEnum()} isn't CellType.ERROR + * @throws IllegalStateException if the cell type returned by {@link #getCellType()} isn't CellType.ERROR * @see org.apache.poi.ss.usermodel.FormulaError for error codes */ @Override @@ -727,7 +727,7 @@ public class SXSSFCell implements Cell { */ @Override public String toString() { - switch (getCellTypeEnum()) { + switch (getCellType()) { case BLANK: return ""; case BOOLEAN: diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java index 572383bec..21abbe74d 100644 --- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java +++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java @@ -256,7 +256,7 @@ public class SXSSFRow implements Row, Comparable case RETURN_NULL_AND_BLANK: return cell; case RETURN_BLANK_AS_NULL: - boolean isBlank = (cell != null && cell.getCellTypeEnum() == CellType.BLANK); + boolean isBlank = (cell != null && cell.getCellType() == CellType.BLANK); return (isBlank) ? null : cell; case CREATE_NULL_AS_BLANK: return (cell == null) ? createCell(cellnum, CellType.BLANK) : cell; diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java index a35209132..df3cfb383 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java @@ -75,7 +75,7 @@ public final class XSSFFormulaUtils { for (Sheet sh : _wb) { for (Row row : sh) { for (Cell cell : row) { - if (cell.getCellTypeEnum() == CellType.FORMULA) { + if (cell.getCellType() == CellType.FORMULA) { updateFormula((XSSFCell) cell, oldName, newName); } } diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java index 0489afcac..21b7b01bc 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java @@ -275,7 +275,7 @@ public abstract class BaseTestXSSFPivotTable { @Test public void testAddDataColumnWithOffsetData() { offsetPivotTable.addColumnLabel(DataConsolidateFunction.SUM, 1); - assertEquals(CellType.NUMERIC, offsetOuterCell.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, offsetOuterCell.getCellType()); offsetPivotTable.addColumnLabel(DataConsolidateFunction.SUM, 0); } diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java index 2c4fc7aa7..fccfd7cf8 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java @@ -486,7 +486,7 @@ public final class TestXSSFFormulaParser { for (Row row : xsheet) { for (Cell cell : row) { - if (cell.getCellTypeEnum() == CellType.FORMULA) { + if (cell.getCellType() == CellType.FORMULA) { try { evaluator.evaluateFormulaCell(cell); } catch (Exception e) { diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java index ddb814d15..3cbbfc517 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java @@ -158,7 +158,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { doTestHyperlinkContents(sheet); assertEquals(HyperlinkType.URL, - sheet.getRow(17).getCell(2).getHyperlink().getTypeEnum()); + sheet.getRow(17).getCell(2).getHyperlink().getType()); assertEquals("POI SS Link", sheet.getRow(17).getCell(2).getHyperlink().getLabel()); assertEquals("http://poi.apache.org/spreadsheet/", @@ -179,7 +179,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { doTestHyperlinkContents(sheet); assertEquals(HyperlinkType.URL, - sheet.getRow(17).getCell(2).getHyperlink().getTypeEnum()); + sheet.getRow(17).getCell(2).getHyperlink().getType()); assertEquals("POI SS Link", sheet.getRow(17).getCell(2).getHyperlink().getLabel()); assertEquals("http://poi.apache.org/spreadsheet/", @@ -197,7 +197,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { // First is a link to poi assertEquals(HyperlinkType.URL, - sheet.getRow(3).getCell(2).getHyperlink().getTypeEnum()); + sheet.getRow(3).getCell(2).getHyperlink().getType()); assertEquals(null, sheet.getRow(3).getCell(2).getHyperlink().getLabel()); assertEquals("http://poi.apache.org/", @@ -205,7 +205,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { // Next is an internal doc link assertEquals(HyperlinkType.DOCUMENT, - sheet.getRow(14).getCell(2).getHyperlink().getTypeEnum()); + sheet.getRow(14).getCell(2).getHyperlink().getType()); assertEquals("Internal hyperlink to A2", sheet.getRow(14).getCell(2).getHyperlink().getLabel()); assertEquals("Sheet1!A2", @@ -213,7 +213,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { // Next is a file assertEquals(HyperlinkType.FILE, - sheet.getRow(15).getCell(2).getHyperlink().getTypeEnum()); + sheet.getRow(15).getCell(2).getHyperlink().getType()); assertEquals(null, sheet.getRow(15).getCell(2).getHyperlink().getLabel()); assertEquals("WithVariousData.xlsx", @@ -221,7 +221,7 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { // Last is a mailto assertEquals(HyperlinkType.EMAIL, - sheet.getRow(16).getCell(2).getHyperlink().getTypeEnum()); + sheet.getRow(16).getCell(2).getHyperlink().getType()); assertEquals(null, sheet.getRow(16).getCell(2).getHyperlink().getLabel()); assertEquals("mailto:dev@poi.apache.org?subject=XSSF%20Hyperlinks", @@ -238,13 +238,13 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { assertEquals(sh1.getNumberOfComments(), sh2.getNumberOfComments()); XSSFHyperlink l1 = sh1.getHyperlink(0, 1); - assertEquals(HyperlinkType.DOCUMENT, l1.getTypeEnum()); + assertEquals(HyperlinkType.DOCUMENT, l1.getType()); assertEquals("B1", l1.getCellRef()); assertEquals("Sort on Titel", l1.getTooltip()); XSSFHyperlink l2 = sh2.getHyperlink(0, 1); assertEquals(l1.getTooltip(), l2.getTooltip()); - assertEquals(HyperlinkType.DOCUMENT, l2.getTypeEnum()); + assertEquals(HyperlinkType.DOCUMENT, l2.getType()); assertEquals("B1", l2.getCellRef()); } @@ -309,22 +309,22 @@ public final class TestXSSFHyperlink extends BaseTestHyperlink { XSSFHyperlink link = sh.getHyperlink(A2); assertEquals("address", "A2", link.getCellRef()); - assertEquals("link type", HyperlinkType.URL, link.getTypeEnum()); + assertEquals("link type", HyperlinkType.URL, link.getType()); assertEquals("link target", "http://twitter.com/#!/apacheorg", link.getAddress()); link = sh.getHyperlink(A3); assertEquals("address", "A3", link.getCellRef()); - assertEquals("link type", HyperlinkType.URL, link.getTypeEnum()); + assertEquals("link type", HyperlinkType.URL, link.getType()); assertEquals("link target", "http://www.bailii.org/databases.html#ie", link.getAddress()); link = sh.getHyperlink(A4); assertEquals("address", "A4", link.getCellRef()); - assertEquals("link type", HyperlinkType.URL, link.getTypeEnum()); + assertEquals("link type", HyperlinkType.URL, link.getType()); assertEquals("link target", "https://en.wikipedia.org/wiki/Apache_POI#See_also", link.getAddress()); link = sh.getHyperlink(A7); assertEquals("address", "A7", link.getCellRef()); - assertEquals("link type", HyperlinkType.DOCUMENT, link.getTypeEnum()); + assertEquals("link type", HyperlinkType.DOCUMENT, link.getType()); assertEquals("link target", "Sheet1", link.getAddress()); wb.close(); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java index dee55ab94..9b2c9ffbc 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java @@ -1470,44 +1470,44 @@ public final class TestXSSFSheet extends BaseTestXSheet { // Blank cell = CellUtil.getCell(destRow, col++); - assertEquals("[Blank] C7 cell type", CellType.BLANK, cell.getCellTypeEnum()); + assertEquals("[Blank] C7 cell type", CellType.BLANK, cell.getCellType()); // Error cell = CellUtil.getCell(destRow, col++); - assertEquals("[Error] D7 cell type", CellType.ERROR, cell.getCellTypeEnum()); + assertEquals("[Error] D7 cell type", CellType.ERROR, cell.getCellType()); final FormulaError error = FormulaError.forInt(cell.getErrorCellValue()); assertEquals("[Error] D7 cell value", FormulaError.NA, error); //FIXME: XSSFCell and HSSFCell expose different interfaces. getErrorCellString would be helpful here // Date cell = CellUtil.getCell(destRow, col++); - assertEquals("[Date] E7 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Date] E7 cell type", CellType.NUMERIC, cell.getCellType()); final Date date = LocaleUtil.getLocaleCalendar(2000, Calendar.JANUARY, 1).getTime(); assertEquals("[Date] E7 cell value", date, cell.getDateCellValue()); // Boolean cell = CellUtil.getCell(destRow, col++); - assertEquals("[Boolean] F7 cell type", CellType.BOOLEAN, cell.getCellTypeEnum()); + assertEquals("[Boolean] F7 cell type", CellType.BOOLEAN, cell.getCellType()); assertEquals("[Boolean] F7 cell value", true, cell.getBooleanCellValue()); // String cell = CellUtil.getCell(destRow, col++); - assertEquals("[String] G7 cell type", CellType.STRING, cell.getCellTypeEnum()); + assertEquals("[String] G7 cell type", CellType.STRING, cell.getCellType()); assertEquals("[String] G7 cell value", "Hello", cell.getStringCellValue()); // Int cell = CellUtil.getCell(destRow, col++); - assertEquals("[Int] H7 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Int] H7 cell type", CellType.NUMERIC, cell.getCellType()); assertEquals("[Int] H7 cell value", 15, (int) cell.getNumericCellValue()); // Float cell = CellUtil.getCell(destRow, col++); - assertEquals("[Float] I7 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Float] I7 cell type", CellType.NUMERIC, cell.getCellType()); assertEquals("[Float] I7 cell value", 12.5, cell.getNumericCellValue(), FLOAT_PRECISION); // Cell Formula cell = CellUtil.getCell(destRow, col++); assertEquals("J7", new CellReference(cell).formatAsString()); - assertEquals("[Cell Formula] J7 cell type", CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals("[Cell Formula] J7 cell type", CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula] J7 cell formula", "5+2", cell.getCellFormula()); System.out.println("Cell formula evaluation currently unsupported"); @@ -1516,21 +1516,21 @@ public final class TestXSSFSheet extends BaseTestXSheet { cell = CellUtil.getCell(destRow, col++); assertEquals("K7", new CellReference(cell).formatAsString()); assertEquals("[Cell Formula with Reference] K7 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Reference] K7 cell formula", "J7+H$2", cell.getCellFormula()); // Cell Formula with Reference spanning multiple rows cell = CellUtil.getCell(destRow, col++); assertEquals("[Cell Formula with Reference spanning multiple rows] L7 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Reference spanning multiple rows] L7 cell formula", "G7&\" \"&G8", cell.getCellFormula()); // Cell Formula with Reference spanning multiple rows cell = CellUtil.getCell(destRow, col++); assertEquals("[Cell Formula with Area Reference] M7 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Area Reference] M7 cell formula", "SUM(H7:I8)", cell.getCellFormula()); @@ -1539,13 +1539,13 @@ public final class TestXSSFSheet extends BaseTestXSheet { System.out.println("Array formulas currently unsupported"); // FIXME: Array Formula set with Sheet.setArrayFormula() instead of cell.setFormula() /* - assertEquals("[Array Formula] N7 cell type", CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals("[Array Formula] N7 cell type", CellType.FORMULA, cell.getCellType()); assertEquals("[Array Formula] N7 cell formula", "{SUM(H7:J7*{1,2,3})}", cell.getCellFormula()); */ // Data Format cell = CellUtil.getCell(destRow, col++); - assertEquals("[Data Format] O7 cell type;", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Data Format] O7 cell type;", CellType.NUMERIC, cell.getCellType()); assertEquals("[Data Format] O7 cell value", 100.20, cell.getNumericCellValue(), FLOAT_PRECISION); //FIXME: currently fails final String moneyFormat = "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)"; @@ -1624,83 +1624,83 @@ public final class TestXSSFSheet extends BaseTestXSheet { // Blank col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[Blank] C10 cell type", CellType.BLANK, cell.getCellTypeEnum()); + assertEquals("[Blank] C10 cell type", CellType.BLANK, cell.getCellType()); cell = CellUtil.getCell(destRow2, col); - assertEquals("[Blank] C11 cell type", CellType.BLANK, cell.getCellTypeEnum()); + assertEquals("[Blank] C11 cell type", CellType.BLANK, cell.getCellType()); // Error col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[Error] D10 cell type", CellType.ERROR, cell.getCellTypeEnum()); + assertEquals("[Error] D10 cell type", CellType.ERROR, cell.getCellType()); FormulaError error = FormulaError.forInt(cell.getErrorCellValue()); assertEquals("[Error] D10 cell value", FormulaError.NA, error); //FIXME: XSSFCell and HSSFCell expose different interfaces. getErrorCellString would be helpful here cell = CellUtil.getCell(destRow2, col); - assertEquals("[Error] D11 cell type", CellType.ERROR, cell.getCellTypeEnum()); + assertEquals("[Error] D11 cell type", CellType.ERROR, cell.getCellType()); error = FormulaError.forInt(cell.getErrorCellValue()); assertEquals("[Error] D11 cell value", FormulaError.NAME, error); //FIXME: XSSFCell and HSSFCell expose different interfaces. getErrorCellString would be helpful here // Date col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[Date] E10 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Date] E10 cell type", CellType.NUMERIC, cell.getCellType()); Date date = LocaleUtil.getLocaleCalendar(2000, Calendar.JANUARY, 1).getTime(); assertEquals("[Date] E10 cell value", date, cell.getDateCellValue()); cell = CellUtil.getCell(destRow2, col); - assertEquals("[Date] E11 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Date] E11 cell type", CellType.NUMERIC, cell.getCellType()); date = LocaleUtil.getLocaleCalendar(2000, Calendar.JANUARY, 2).getTime(); assertEquals("[Date] E11 cell value", date, cell.getDateCellValue()); // Boolean col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[Boolean] F10 cell type", CellType.BOOLEAN, cell.getCellTypeEnum()); + assertEquals("[Boolean] F10 cell type", CellType.BOOLEAN, cell.getCellType()); assertEquals("[Boolean] F10 cell value", true, cell.getBooleanCellValue()); cell = CellUtil.getCell(destRow2, col); - assertEquals("[Boolean] F11 cell type", CellType.BOOLEAN, cell.getCellTypeEnum()); + assertEquals("[Boolean] F11 cell type", CellType.BOOLEAN, cell.getCellType()); assertEquals("[Boolean] F11 cell value", false, cell.getBooleanCellValue()); // String col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[String] G10 cell type", CellType.STRING, cell.getCellTypeEnum()); + assertEquals("[String] G10 cell type", CellType.STRING, cell.getCellType()); assertEquals("[String] G10 cell value", "Hello", cell.getStringCellValue()); cell = CellUtil.getCell(destRow2, col); - assertEquals("[String] G11 cell type", CellType.STRING, cell.getCellTypeEnum()); + assertEquals("[String] G11 cell type", CellType.STRING, cell.getCellType()); assertEquals("[String] G11 cell value", "World", cell.getStringCellValue()); // Int col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[Int] H10 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Int] H10 cell type", CellType.NUMERIC, cell.getCellType()); assertEquals("[Int] H10 cell value", 15, (int) cell.getNumericCellValue()); cell = CellUtil.getCell(destRow2, col); - assertEquals("[Int] H11 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Int] H11 cell type", CellType.NUMERIC, cell.getCellType()); assertEquals("[Int] H11 cell value", 42, (int) cell.getNumericCellValue()); // Float col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[Float] I10 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Float] I10 cell type", CellType.NUMERIC, cell.getCellType()); assertEquals("[Float] I10 cell value", 12.5, cell.getNumericCellValue(), FLOAT_PRECISION); cell = CellUtil.getCell(destRow2, col); - assertEquals("[Float] I11 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Float] I11 cell type", CellType.NUMERIC, cell.getCellType()); assertEquals("[Float] I11 cell value", 5.5, cell.getNumericCellValue(), FLOAT_PRECISION); // Cell Formula col++; cell = CellUtil.getCell(destRow1, col); - assertEquals("[Cell Formula] J10 cell type", CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals("[Cell Formula] J10 cell type", CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula] J10 cell formula", "5+2", cell.getCellFormula()); cell = CellUtil.getCell(destRow2, col); - assertEquals("[Cell Formula] J11 cell type", CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals("[Cell Formula] J11 cell type", CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula] J11 cell formula", "6+18", cell.getCellFormula()); // Cell Formula with Reference @@ -1708,25 +1708,25 @@ public final class TestXSSFSheet extends BaseTestXSheet { // Formula row references should be adjusted by destRowNum-srcRowNum cell = CellUtil.getCell(destRow1, col); assertEquals("[Cell Formula with Reference] K10 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Reference] K10 cell formula", "J10+H$2", cell.getCellFormula()); cell = CellUtil.getCell(destRow2, col); - assertEquals("[Cell Formula with Reference] K11 cell type", CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals("[Cell Formula with Reference] K11 cell type", CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Reference] K11 cell formula", "J11+H$2", cell.getCellFormula()); // Cell Formula with Reference spanning multiple rows col++; cell = CellUtil.getCell(destRow1, col); assertEquals("[Cell Formula with Reference spanning multiple rows] L10 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Reference spanning multiple rows] L10 cell formula", "G10&\" \"&G11", cell.getCellFormula()); cell = CellUtil.getCell(destRow2, col); assertEquals("[Cell Formula with Reference spanning multiple rows] L11 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Reference spanning multiple rows] L11 cell formula", "G11&\" \"&G12", cell.getCellFormula()); @@ -1734,13 +1734,13 @@ public final class TestXSSFSheet extends BaseTestXSheet { col++; cell = CellUtil.getCell(destRow1, col); assertEquals("[Cell Formula with Area Reference] M10 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Area Reference] M10 cell formula", "SUM(H10:I11)", cell.getCellFormula()); cell = CellUtil.getCell(destRow2, col); assertEquals("[Cell Formula with Area Reference] M11 cell type", - CellType.FORMULA, cell.getCellTypeEnum()); + CellType.FORMULA, cell.getCellType()); assertEquals("[Cell Formula with Area Reference] M11 cell formula", "SUM($H$3:I10)", cell.getCellFormula()); //Also acceptable: SUM($H10:I$3), but this AreaReference isn't in ascending order @@ -1750,19 +1750,19 @@ public final class TestXSSFSheet extends BaseTestXSheet { // System.out.println("Array formulas currently unsupported"); /* // FIXME: Array Formula set with Sheet.setArrayFormula() instead of cell.setFormula() - assertEquals("[Array Formula] N10 cell type", CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals("[Array Formula] N10 cell type", CellType.FORMULA, cell.getCellType()); assertEquals("[Array Formula] N10 cell formula", "{SUM(H10:J10*{1,2,3})}", cell.getCellFormula()); cell = CellUtil.getCell(destRow2, col); // FIXME: Array Formula set with Sheet.setArrayFormula() instead of cell.setFormula() - assertEquals("[Array Formula] N11 cell type", CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals("[Array Formula] N11 cell type", CellType.FORMULA, cell.getCellType()); assertEquals("[Array Formula] N11 cell formula", "{SUM(H11:J11*{1,2,3})}", cell.getCellFormula()); */ // Data Format col++; cell = CellUtil.getCell(destRow2, col); - assertEquals("[Data Format] O10 cell type", CellType.NUMERIC, cell.getCellTypeEnum()); + assertEquals("[Data Format] O10 cell type", CellType.NUMERIC, cell.getCellType()); assertEquals("[Data Format] O10 cell value", 100.20, cell.getNumericCellValue(), FLOAT_PRECISION); final String moneyFormat = "\"$\"#,##0.00_);[Red]\\(\"$\"#,##0.00\\)"; assertEquals("[Data Format] O10 cell data format", moneyFormat, cell.getCellStyle().getDataFormatString()); diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java index 07ba9f901..fc8e308cb 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java @@ -113,7 +113,7 @@ public final class TestXSSFSheetShiftRows extends BaseTestSheetShiftRows { } Cell readCell = readRow.getCell(0); //noinspection deprecation - if(readCell.getCellTypeEnum() == CellType.NUMERIC) { + if(readCell.getCellType() == CellType.NUMERIC) { assertEquals(expect, Double.toString(readCell.getNumericCellValue())); } else { assertEquals(expect, readCell.getStringCellValue()); @@ -413,7 +413,7 @@ public final class TestXSSFSheetShiftRows extends BaseTestSheetShiftRows { assertNotNull(row); Cell cell = row.getCell(cellAddress.getColumn()); assertNotNull(cell); - assertEquals(CellType.FORMULA, cell.getCellTypeEnum()); + assertEquals(CellType.FORMULA, cell.getCellType()); return cell.getCellFormula(); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java index e73b5ad8a..73cef448f 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java @@ -129,31 +129,31 @@ public final class TestHyperlink { hl1 = tb1.getTextParagraphs().get(0).getTextRuns().get(0).getHyperlink(); assertNotNull(hl1); assertEquals("dev@poi.apache.org", hl1.getLabel()); - assertEquals(HyperlinkType.EMAIL, hl1.getTypeEnum()); + assertEquals(HyperlinkType.EMAIL, hl1.getType()); HSLFTextBox tb2 = (HSLFTextBox)slides.get(1).getShapes().get(0); hl2 = tb2.getTextParagraphs().get(0).getTextRuns().get(0).getHyperlink(); assertNotNull(hl2); assertEquals(InteractiveInfoAtom.LINK_LastSlide, hl2.getInfo().getInteractiveInfoAtom().getHyperlinkType()); - assertEquals(HyperlinkType.DOCUMENT, hl2.getTypeEnum()); + assertEquals(HyperlinkType.DOCUMENT, hl2.getType()); HSLFTextBox tb3 = (HSLFTextBox)slides.get(2).getShapes().get(0); hl3 = tb3.getTextParagraphs().get(0).getTextRuns().get(1).getHyperlink(); assertNotNull(hl3); assertEquals(ppt2.getSlides().get(0)._getSheetNumber(), Integer.parseInt(hl3.getAddress().split(",")[0])); - assertEquals(HyperlinkType.DOCUMENT, hl3.getTypeEnum()); + assertEquals(HyperlinkType.DOCUMENT, hl3.getType()); HSLFTextBox tb4 = (HSLFTextBox)slides.get(3).getShapes().get(0); hl4 = tb4.getTextParagraphs().get(0).getTextRuns().get(0).getHyperlink(); assertNotNull(hl4); assertEquals("http://poi.apache.org", hl4.getLabel()); - assertEquals(HyperlinkType.URL, hl4.getTypeEnum()); + assertEquals(HyperlinkType.URL, hl4.getType()); tb5 = (HSLFTextBox)slides.get(4).getShapes().get(0); hl5 = tb5.getHyperlink(); assertNotNull(hl5); assertEquals(InteractiveInfoAtom.LINK_FirstSlide, hl5.getInfo().getInteractiveInfoAtom().getHyperlinkType()); - assertEquals(HyperlinkType.DOCUMENT, hl5.getTypeEnum()); + assertEquals(HyperlinkType.DOCUMENT, hl5.getType()); ppt2.close(); } diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java index 1efd586cf..8bb83852e 100644 --- a/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java +++ b/src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java @@ -870,7 +870,7 @@ public final class TestBugs { assertEquals(hlRun.getId(), hlShape.getId()); assertEquals(hlRun.getAddress(), hlShape.getAddress()); assertEquals(hlRun.getLabel(), hlShape.getLabel()); - assertEquals(hlRun.getTypeEnum(), hlShape.getTypeEnum()); + assertEquals(hlRun.getType(), hlShape.getType()); assertEquals(hlRun.getStartIndex(), hlShape.getStartIndex()); assertEquals(hlRun.getEndIndex(), hlShape.getEndIndex()); diff --git a/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java b/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java index 291b3a500..53f5f4ac7 100644 --- a/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java +++ b/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java @@ -99,7 +99,7 @@ public final class TestFormulaParserEval extends TestCase { } throw e; } - assertEquals(CellType.NUMERIC, result.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, result.getCellType()); assertEquals(42.0, result.getNumberValue(), 0.0); } } diff --git a/src/testcases/org/apache/poi/hssf/model/TestRVA.java b/src/testcases/org/apache/poi/hssf/model/TestRVA.java index cf5fc4ab3..174e7bb8d 100644 --- a/src/testcases/org/apache/poi/hssf/model/TestRVA.java +++ b/src/testcases/org/apache/poi/hssf/model/TestRVA.java @@ -80,7 +80,7 @@ public final class TestRVA { break; } HSSFCell cell = row.getCell(0); - if (cell == null || cell.getCellTypeEnum() == CellType.BLANK) { + if (cell == null || cell.getCellType() == CellType.BLANK) { break; } diff --git a/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java b/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java index 98f1e855c..fd8a9c03a 100644 --- a/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java +++ b/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java @@ -228,7 +228,7 @@ public final class TestSharedFormulaRecord extends TestCase { private static void confirmCellEvaluation(HSSFWorkbook wb, HSSFCell cell, double expectedValue) { HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(wb); CellValue cv = fe.evaluate(cell); - assertEquals(CellType.NUMERIC, cv.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, cv.getCellType()); assertEquals(expectedValue, cv.getNumberValue(), 0.0); } diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java index cbfc6d9b8..f0f95261a 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java @@ -68,7 +68,7 @@ public final class TestBug42464 { Iterator it = row.cellIterator(); while(it.hasNext()) { HSSFCell cell = (HSSFCell)it.next(); - if(cell.getCellTypeEnum() != CellType.FORMULA) { + if(cell.getCellType() != CellType.FORMULA) { continue; } FormulaRecordAggregate record = (FormulaRecordAggregate) cell.getCellValueRecord(); diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestExternalReferenceChange.java b/src/testcases/org/apache/poi/hssf/usermodel/TestExternalReferenceChange.java index 9e3d4c33a..86d59d8c7 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestExternalReferenceChange.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestExternalReferenceChange.java @@ -51,7 +51,7 @@ public class TestExternalReferenceChange extends TestCase { HSSFSheet lSheet = mainWorkbook.getSheetAt(0); HSSFCell lA1Cell = lSheet.getRow(0).getCell(0); - assertEquals(CellType.FORMULA, lA1Cell.getCellTypeEnum()); + assertEquals(CellType.FORMULA, lA1Cell.getCellType()); HSSFFormulaEvaluator lMainWorkbookEvaluator = new HSSFFormulaEvaluator(mainWorkbook); HSSFFormulaEvaluator lSourceEvaluator = new HSSFFormulaEvaluator(sourceWorkbook); diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java index 35c307ba4..1ed7dd3a5 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java @@ -384,7 +384,7 @@ public final class TestHSSFDataFormatter { HSSFRow row = sheet.getRow(0); HSSFCell cellA1 = row.getCell(0); - assertEquals(CellType.NUMERIC, cellA1.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, cellA1.getCellType()); assertEquals(2345.0, cellA1.getNumericCellValue(), 0.0001); assertEquals("@", cellA1.getCellStyle().getDataFormatString()); diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java index 347fb219f..33dfb308d 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java @@ -392,7 +392,7 @@ public final class TestWorkbook { HSSFSheet s = wb.getSheetAt(0); HSSFCell c = s.getRow(0).getCell(0); - assertEquals(CellType.NUMERIC, c.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, c.getCellType()); wb.close(); } diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java b/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java index 3a0a5b9b7..825a07e0d 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java @@ -78,18 +78,18 @@ public class TestIfError extends TestCase { FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator(); assertEquals("Checks that the cell is numeric", - CellType.NUMERIC, evaluator.evaluate(cell1).getCellTypeEnum()); + CellType.NUMERIC, evaluator.evaluate(cell1).getCellType()); assertEquals("Divides 210 by 35 and returns 6.0", 6.0, evaluator.evaluate(cell1).getNumberValue(), accuracy); assertEquals("Checks that the cell is numeric", - CellType.STRING, evaluator.evaluate(cell2).getCellTypeEnum()); + CellType.STRING, evaluator.evaluate(cell2).getCellType()); assertEquals("Rounds -10 to a nearest multiple of -3 (-9)", "Error in calculation", evaluator.evaluate(cell2).getStringValue()); assertEquals("Check that C1 returns string", - CellType.STRING, evaluator.evaluate(cell3).getCellTypeEnum()); + CellType.STRING, evaluator.evaluate(cell3).getCellType()); assertEquals("Check that C1 returns string \"error\"", "error", evaluator.evaluate(cell3).getStringValue()); } diff --git a/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java b/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java index be7a6e830..a20050f7e 100644 --- a/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java +++ b/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java @@ -63,7 +63,7 @@ public final class TestYearFracCalculatorFromSpreadsheet { HSSFRow row = (HSSFRow) rowIterator.next(); HSSFCell cell = row.getCell(SS.YEARFRAC_FORMULA_COLUMN); - if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) { + if (cell == null || cell.getCellType() != CellType.FORMULA) { continue; } processRow(row, cell, formulaEvaluator); diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java b/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java index 948106495..565f756d0 100644 --- a/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java +++ b/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java @@ -58,7 +58,7 @@ public final class TestFormulaBugs { FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator(); CellValue cv = fe.evaluate(cell); - assertEquals(CellType.NUMERIC, cv.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, cv.getCellType()); assertEquals(3.0, cv.getNumberValue(), 0.0); wb.close(); @@ -106,11 +106,11 @@ public final class TestFormulaBugs { FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator(); CellValue cv; cv = fe.evaluate(cell); - assertEquals(CellType.NUMERIC, cv.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, cv.getCellType()); assertEquals(1.0, cv.getNumberValue(), 0.0); cv = fe.evaluate(row.getCell(1)); - assertEquals(CellType.BOOLEAN, cv.getCellTypeEnum()); + assertEquals(CellType.BOOLEAN, cv.getCellType()); assertEquals(true, cv.getBooleanValue()); wb.close(); @@ -160,7 +160,7 @@ public final class TestFormulaBugs { FormulaEvaluator fe = wb.getCreationHelper().createFormulaEvaluator(); CellValue cv = fe.evaluate(cell); - assertEquals(CellType.NUMERIC, cv.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, cv.getCellType()); assertEquals(expectedResult, cv.getNumberValue(), 0.0); wb.close(); diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java b/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java index 71cf649dd..c3a5eec23 100644 --- a/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java +++ b/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java @@ -78,7 +78,7 @@ public final class TestPercentEval extends TestCase { // else some other unexpected error throw e; } - assertEquals(CellType.NUMERIC, cv.getCellTypeEnum()); + assertEquals(CellType.NUMERIC, cv.getCellType()); assertEquals(0.5, cv.getNumberValue(), 0.0); } } diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java b/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java index 527477bbc..19f5c7653 100644 --- a/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java +++ b/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java @@ -73,7 +73,7 @@ public final class TestAddress extends TestCase { cell.setCellFormula(formulaText); fe.notifyUpdateCell(cell); CellValue result = fe.evaluate(cell); - assertEquals(result.getCellTypeEnum(), CellType.STRING); + assertEquals(result.getCellType(), CellType.STRING); assertEquals(expectedResult, result.getStringValue()); } } diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java b/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java index c7c33ad9b..e9af8c12e 100644 --- a/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java +++ b/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java @@ -104,7 +104,7 @@ public final class TestCalendarFieldFunction extends TestCase { cell11.setCellFormula(formulaText); evaluator.clearAllCachedResultValues(); CellValue cv = evaluator.evaluate(cell11); - if (cv.getCellTypeEnum() != CellType.NUMERIC) { + if (cv.getCellType() != CellType.NUMERIC) { throw new AssertionFailedError("Wrong result type: " + cv.formatAsString()); } double actualValue = cv.getNumberValue(); diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java b/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java index 39bb4d085..a7647d2bb 100644 --- a/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java +++ b/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java @@ -60,7 +60,7 @@ public final class TestClean extends TestCase { cell.setCellFormula(formulaText); fe.notifyUpdateCell(cell); CellValue result = fe.evaluate(cell); - assertEquals(result.getCellTypeEnum(), CellType.STRING); + assertEquals(result.getCellType(), CellType.STRING); assertEquals(expectedResult, result.getStringValue()); } } diff --git a/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java b/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java index 8800ef358..4fecae452 100644 --- a/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java +++ b/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java @@ -128,7 +128,7 @@ public final class TestIrr extends TestCase { private static void assertFormulaResult(CellValue cv, HSSFCell cell){ double actualValue = cv.getNumberValue(); double expectedValue = cell.getNumericCellValue(); // cached formula result calculated by Excel - assertEquals("Invalid formula result: " + cv, CellType.NUMERIC, cv.getCellTypeEnum()); + assertEquals("Invalid formula result: " + cv, CellType.NUMERIC, cv.getCellType()); assertEquals(expectedValue, actualValue, 1E-4); // should agree within 0.01% } } diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java index 882be57da..ffd86f5f7 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java @@ -750,7 +750,7 @@ public abstract class BaseTestSheetShiftRows { private void verifyHyperlink(Cell cell, HyperlinkType linkType, String ref) { assertTrue(cellHasHyperlink(cell)); Hyperlink link = cell.getHyperlink(); - assertEquals(linkType, link.getTypeEnum()); + assertEquals(linkType, link.getType()); assertEquals(ref, link.getAddress()); }