]> source.dussan.org Git - poi.git/commitdiff
use non-deprecated versions of getCellType
authorPJ Fanning <fanningpj@apache.org>
Mon, 18 Sep 2017 16:31:55 +0000 (16:31 +0000)
committerPJ Fanning <fanningpj@apache.org>
Mon, 18 Sep 2017 16:31:55 +0000 (16:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808741 13f79535-47bb-0310-9956-ffa450edef68

34 files changed:
src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
src/examples/src/org/apache/poi/hssf/view/SVTableCellEditor.java
src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
src/examples/src/org/apache/poi/ss/examples/ToCSV.java
src/java/org/apache/poi/hssf/usermodel/HSSFHyperlink.java
src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java
src/java/org/apache/poi/ss/usermodel/DataFormatter.java
src/java/org/apache/poi/ss/usermodel/charts/DataSources.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/BaseTestXSSFPivotTable.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFHyperlink.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
src/scratchpad/testcases/org/apache/poi/hslf/model/TestHyperlink.java
src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java
src/testcases/org/apache/poi/hssf/model/TestRVA.java
src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java
src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java
src/testcases/org/apache/poi/hssf/usermodel/TestExternalReferenceChange.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java
src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java
src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java
src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java
src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java
src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java
src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java
src/testcases/org/apache/poi/ss/formula/functions/TestClean.java
src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java

index 30ce49f8e59636ab1a6e18d17b7480b1e09923e3..d0889cc11fd544e605b52c6904353019f27cf49f 100644 (file)
@@ -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();
index 9db98d95ed96c9b140bccf21db60cffe53cb9800..3de27df0d3cfdb53aa66669183afdc867fbed721 100644 (file)
@@ -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;
index fe7163c8c3e78e358c74a6c9802c2fc439067f46..ab8b1faf60d589fbb40c3eab57a69d671f80a172 100644 (file)
@@ -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;
index af486dbc972577d598091c57d18a7ebd3e776f63..a2e39c4c69caa0c8eaa0b6dadf3f0358de105766 100644 (file)
@@ -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 {
index 4b947959e64a43c2725a7ff0037abe8e41116e85..88b55d535779d5689ea45bfad1613b804f3d4dcd 100644 (file)
@@ -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());
index cc27e66c48bdb0fa9ea4a17f1714a2cb3e7745a1..c9b408fa51f1d4b5dba9f2bbdf5fe18e08fc309c 100644 (file)
@@ -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){
index 6bcf20009037404bf86d45e17e42ba761c80c48b..1df507f22f491fa6fd0897803e3858976f42bae6 100644 (file)
@@ -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();
index a0d293c78b190c452266f2c55291dc051b7ad14a..bca76a3762399f3d7c3516aaf1d63c65da3debc7 100644 (file)
@@ -42,7 +42,7 @@ public class DataSources {
         return new AbstractCellRangeDataSource<Number>(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<String>(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;
index 9cb9f698c711695fda37c79fd3733fd456305db9..503dd8257a147deebdc33fad595c7bd091d541ec 100644 (file)
@@ -392,7 +392,7 @@ public class SXSSFCell implements Cell {
      * For strings we throw an exception. For blank cells we return a null.
      * </p>
      * @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 <code>double</code>.
      * @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.
      * </p>
      * @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 {
      * </p>
      *
      * @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:
index 572383becf31525f05260b4815e727d885ed7f21..21abbe74d1aef5cc76652187e01b240dc1704846 100644 (file)
@@ -256,7 +256,7 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
             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;
index a35209132c4781b2ac31d5b3dbdcffffead14070..df3cfb3830f7b8f89e181c29307ae6267f2060ff 100644 (file)
@@ -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);
                     }
                 }
index 0489afcac019b79cf4750938efce57984beda49a..21b7b01bc0e75d29bb4efee51789fe46ec2c3096 100644 (file)
@@ -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);
     }
index 2c4fc7aa73bbec10a48094c72feb61774bf394e1..fccfd7cf85d16dd28f6ad80fac1e877908a45fdc 100644 (file)
@@ -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) {
index ddb814d15e195093f9e6aa9478bb198364de56b0..3cbbfc517cd2c1342f629e8c1e4f79bb3d2ea962 100644 (file)
@@ -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();
index dee55ab9476a9eb8df3409fdc5a3a619b5775ad6..9b2c9ffbc617c89e1391c1c67c835559d62af309 100644 (file)
@@ -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());
index 07ba9f901ab3fd68a010d3e81260d4037c204926..fc8e308cb72bc41f05a1fa04f2d08b341b3e1b96 100644 (file)
@@ -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();
     }
 
index e73b5ad8aee8aa4bac8ea2414ff73771b5d9d442..73cef448f20f8d8585bcbbbd478a6e576ae0b2df 100644 (file)
@@ -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();
     }
index 1efd586cf092254d0d94c895837381f5185e97b2..8bb83852e1d02c5aa37df361869a460fec6e1088 100644 (file)
@@ -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());
 
index 291b3a50008e9fa8a96b339ef28a31e62f15b793..53f5f4ac75660818dc2505a96efe8bd0adee87f9 100644 (file)
@@ -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);
        }
 }
index cf5fc4ab360087c3da19f92d1229a640bb766191..174e7bb8db225bb3a1d53889079b456cf17bf1ed 100644 (file)
@@ -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;
             }
 
index 98f1e855c755772ba0a32f56fcafaaa936a4d688..fd8a9c03a72affe86e1c8611bb78db1f1ca4bfcd 100644 (file)
@@ -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);
     }
 
index cbfc6d9b88177ef92b9ea818747c85522b07113f..f0f95261a7ddacdc79925d0dce17648b8063f343 100644 (file)
@@ -68,7 +68,7 @@ public final class TestBug42464 {
                Iterator<Cell> 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();
index 9e3d4c33a5fd7e925f31719a22fed5d047fe7aee..86d59d8c7429e6885847c0c8cac7e5225898aa16 100644 (file)
@@ -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);
index 35c307ba4cfaca3d583bd4aea9d019fca3307a5f..1ed7dd3a5da30f7b6d8afb255c1f814ad70f37d9 100644 (file)
@@ -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());
 
index 347fb219f59c78dfbee2cc60a7b07c668692daa2..33dfb308d451900b333e1e1d36460ae4077ea325 100644 (file)
@@ -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();
     }
index 3a0a5b9b76097f0c2c153a9e68aee104fe4c7a96..825a07e0d12707a0e65cc6a91a5c85af888e1852 100644 (file)
@@ -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());
     }
index be7a6e83036eede16c2fd3956e4d83c58e2a46e0..a20050f7ee5deedcf4f02015738e3ce5513c5442 100644 (file)
@@ -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);
index 9481064952afe0a73d75cbb09ee1f5f1d77b8900..565f756d081037c3b34785e2f86ba649e13d86db 100644 (file)
@@ -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();
index 71cf649dd8e3dfd8e1178eacb3e4e67ea264f2b3..c3a5eec233ceb8f14aceef028302d92f5727fdb5 100644 (file)
@@ -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);
        }
 }
index 527477bbccf030a02457b311f04716839edf6df6..19f5c7653c160b2d11bafdb2a9807a5930b6c78e 100644 (file)
@@ -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());
     }
 }
index c7c33ad9b21f6f1f208bf1a2b9f3e36d9252e499..e9af8c12ee91bc4b5f9e62a7b5b82a1d86ac5d7a 100644 (file)
@@ -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();
index 39bb4d0857bc53a74db4450efad6fbab1580da7b..a7647d2bb381183970698483a24d019eee4027f2 100644 (file)
@@ -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());
     }
 }
index 8800ef358f086daea5a89d0a9c2264a6441a09dc..4fecae4528ae4569a1f8067f2eddaacedf96712f 100644 (file)
@@ -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%
     }
 }
index 882be57da8432f8e341007df3d90e7fc453912af..ffd86f5f75432162e968eee30ac56f8cb6ccddcb 100644 (file)
@@ -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());
     }