poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1751256 [3/3] - in /poi/trunk/src: examples/src/org/apache/poi/hssf/usermodel/examples/ examples/src/org/apache/poi/hssf/view/ examples/src/org/apache/poi/ss/examples/ examples/src/org/apache/poi/ss/examples/html/ java/org/apache/poi/hssf/...
Date Mon, 04 Jul 2016 11:54:20 GMT
Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java?rev=1751256&r1=1751255&r2=1751256&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java Mon Jul  4 11:54:20
2016
@@ -60,13 +60,13 @@ public abstract class BaseTestCell {
 
         cell.setCellValue(1.2);
         assertEquals(1.2, cell.getNumericCellValue(), 0.0001);
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         assertProhibitedValueAccess(cell, CellType.BOOLEAN, CellType.STRING,
                 CellType.FORMULA, CellType.ERROR);
 
         cell.setCellValue(false);
         assertEquals(false, cell.getBooleanCellValue());
-        assertEquals(CellType.BOOLEAN, cell.getCellType());
+        assertEquals(CellType.BOOLEAN, cell.getCellTypeEnum());
         cell.setCellValue(true);
         assertEquals(true, cell.getBooleanCellValue());
         assertProhibitedValueAccess(cell, CellType.NUMERIC, CellType.STRING,
@@ -75,14 +75,14 @@ public abstract class BaseTestCell {
         cell.setCellValue(factory.createRichTextString("Foo"));
         assertEquals("Foo", cell.getRichStringCellValue().getString());
         assertEquals("Foo", cell.getStringCellValue());
-        assertEquals(CellType.STRING, cell.getCellType());
+        assertEquals(CellType.STRING, cell.getCellTypeEnum());
         assertProhibitedValueAccess(cell, CellType.NUMERIC, CellType.BOOLEAN,
                 CellType.FORMULA, CellType.ERROR);
 
         cell.setCellValue("345");
         assertEquals("345", cell.getRichStringCellValue().getString());
         assertEquals("345", cell.getStringCellValue());
-        assertEquals(CellType.STRING, cell.getCellType());
+        assertEquals(CellType.STRING, cell.getCellTypeEnum());
         assertProhibitedValueAccess(cell, CellType.NUMERIC, CellType.BOOLEAN,
                 CellType.FORMULA, CellType.ERROR);
 
@@ -90,19 +90,19 @@ public abstract class BaseTestCell {
         c.setTimeInMillis(123456789);
         cell.setCellValue(c.getTime());
         assertEquals(c.getTime().getTime(), cell.getDateCellValue().getTime());
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         assertProhibitedValueAccess(cell, CellType.BOOLEAN, CellType.STRING,
                 CellType.FORMULA, CellType.ERROR);
 
         cell.setCellValue(c);
         assertEquals(c.getTime().getTime(), cell.getDateCellValue().getTime());
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         assertProhibitedValueAccess(cell, CellType.BOOLEAN, CellType.STRING,
                 CellType.FORMULA, CellType.ERROR);
 
         cell.setCellErrorValue(FormulaError.NA.getCode());
         assertEquals(FormulaError.NA.getCode(), cell.getErrorCellValue());
-        assertEquals(CellType.ERROR, cell.getCellType());
+        assertEquals(CellType.ERROR, cell.getCellTypeEnum());
         assertProhibitedValueAccess(cell, CellType.NUMERIC, CellType.BOOLEAN,
                 CellType.FORMULA, CellType.STRING);
         
@@ -176,13 +176,13 @@ public abstract class BaseTestCell {
         c = r.getCell(1);
         assertEquals(0, c.getRowIndex());
         assertEquals(1, c.getColumnIndex());
-        assertEquals(CellType.BOOLEAN, c.getCellType());
+        assertEquals(CellType.BOOLEAN, c.getCellTypeEnum());
         assertEquals("B1 value", true, c.getBooleanCellValue());
         
         c = r.getCell(2);
         assertEquals(0, c.getRowIndex());
         assertEquals(2, c.getColumnIndex());
-        assertEquals(CellType.BOOLEAN, c.getCellType());
+        assertEquals(CellType.BOOLEAN, c.getCellTypeEnum());
         assertEquals("C1 value", false, c.getBooleanCellValue());
         
         wb2.close();
@@ -226,13 +226,13 @@ public abstract class BaseTestCell {
         c = r.getCell(1);
         assertEquals(0, c.getRowIndex());
         assertEquals(1, c.getColumnIndex());
-        assertEquals(CellType.ERROR, c.getCellType());
+        assertEquals(CellType.ERROR, c.getCellTypeEnum());
         assertEquals("B1 value == #NULL!", FormulaError.NULL.getCode(), c.getErrorCellValue());
 
         c = r.getCell(2);
         assertEquals(0, c.getRowIndex());
         assertEquals(2, c.getColumnIndex());
-        assertEquals(CellType.ERROR, c.getCellType());
+        assertEquals(CellType.ERROR, c.getCellTypeEnum());
         assertEquals("C1 value == #DIV/0!", FormulaError.DIV0.getCode(), c.getErrorCellValue());
 
         wb2.close();
@@ -272,7 +272,7 @@ public abstract class BaseTestCell {
         r = s.getRow(0);
         c = r.getCell(0);
 
-        assertEquals("Formula Cell at 0,0", CellType.FORMULA, c.getCellType());
+        assertEquals("Formula Cell at 0,0", CellType.FORMULA, c.getCellTypeEnum());
         cs = c.getCellStyle();
 
         assertNotNull("Formula Cell Style", cs);
@@ -347,25 +347,25 @@ public abstract class BaseTestCell {
         Cell c1 = r.createCell(0);
         c1.setCellFormula("NA()");
         assertEquals(0.0, c1.getNumericCellValue(), 0.0);
-        assertEquals(CellType.NUMERIC, c1.getCachedFormulaResultType());
+        assertEquals(CellType.NUMERIC, c1.getCachedFormulaResultTypeEnum());
         c1.setCellValue(10);
         assertEquals(10.0, c1.getNumericCellValue(), 0.0);
-        assertEquals(CellType.FORMULA, c1.getCellType());
-        assertEquals(CellType.NUMERIC, c1.getCachedFormulaResultType());
+        assertEquals(CellType.FORMULA, c1.getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, c1.getCachedFormulaResultTypeEnum());
 
         Cell c2 = r.createCell(1);
         c2.setCellFormula("NA()");
         assertEquals(0.0, c2.getNumericCellValue(), 0.0);
-        assertEquals(CellType.NUMERIC, c2.getCachedFormulaResultType());
+        assertEquals(CellType.NUMERIC, c2.getCachedFormulaResultTypeEnum());
         c2.setCellValue("I changed!");
         assertEquals("I changed!", c2.getStringCellValue());
-        assertEquals(CellType.FORMULA, c2.getCellType());
-        assertEquals(CellType.STRING, c2.getCachedFormulaResultType());
+        assertEquals(CellType.FORMULA, c2.getCellTypeEnum());
+        assertEquals(CellType.STRING, c2.getCachedFormulaResultTypeEnum());
 
         //calglin Cell.setCellFormula(null) for a non-formula cell
         Cell c3 = r.createCell(2);
         c3.setCellFormula(null);
-        assertEquals(CellType.BLANK, c3.getCellType());
+        assertEquals(CellType.BLANK, c3.getCellTypeEnum());
         wb.close();
 
     }
@@ -420,11 +420,11 @@ public abstract class BaseTestCell {
         Cell cell = createACell(wb);
 
         cell.setCellValue("TRUE");
-        assertEquals(CellType.STRING, cell.getCellType());
+        assertEquals(CellType.STRING, cell.getCellTypeEnum());
         // test conversion of cell from text to boolean
         cell.setCellType(CellType.BOOLEAN);
 
-        assertEquals(CellType.BOOLEAN, cell.getCellType());
+        assertEquals(CellType.BOOLEAN, cell.getCellTypeEnum());
         assertEquals(true, cell.getBooleanCellValue());
         cell.setCellType(CellType.STRING);
         assertEquals("TRUE", cell.getRichStringCellValue().getString());
@@ -432,7 +432,7 @@ public abstract class BaseTestCell {
         // 'false' text to bool and back
         cell.setCellValue("FALSE");
         cell.setCellType(CellType.BOOLEAN);
-        assertEquals(CellType.BOOLEAN, cell.getCellType());
+        assertEquals(CellType.BOOLEAN, cell.getCellTypeEnum());
         assertEquals(false, cell.getBooleanCellValue());
         cell.setCellType(CellType.STRING);
         assertEquals("FALSE", cell.getRichStringCellValue().getString());
@@ -589,17 +589,17 @@ public abstract class BaseTestCell {
 
         cell = row.createCell(0, CellType.NUMERIC);
         cell.setCellValue(1.0);
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         assertEquals(1.0, cell.getNumericCellValue(), 0.0);
 
         cell = row.createCell(1, CellType.NUMERIC);
         cell.setCellValue(2.0);
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         assertEquals(2.0, cell.getNumericCellValue(), 0.0);
 
         cell = row.createCell(2, CellType.FORMULA);
         cell.setCellFormula("SUM(A1:B1)");
-        assertEquals(CellType.FORMULA, cell.getCellType());
+        assertEquals(CellType.FORMULA, cell.getCellTypeEnum());
         assertEquals("SUM(A1:B1)", cell.getCellFormula());
 
         //serialize and check again
@@ -607,15 +607,15 @@ public abstract class BaseTestCell {
         wb1.close();
         row = wb2.getSheetAt(0).getRow(0);
         cell = row.getCell(0);
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         assertEquals(1.0, cell.getNumericCellValue(), 0.0);
 
         cell = row.getCell(1);
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         assertEquals(2.0, cell.getNumericCellValue(), 0.0);
 
         cell = row.getCell(2);
-        assertEquals(CellType.FORMULA, cell.getCellType());
+        assertEquals(CellType.FORMULA, cell.getCellTypeEnum());
         assertEquals("SUM(A1:B1)", cell.getCellFormula());
         wb2.close();
     }
@@ -672,17 +672,17 @@ public abstract class BaseTestCell {
 
         Cell cell0 = row.createCell(0);
         cell0.setCellValue(Double.NaN);
-        assertEquals("Double.NaN should change cell type to CellType#ERROR", CellType.ERROR,
cell0.getCellType());
+        assertEquals("Double.NaN should change cell type to CellType#ERROR", CellType.ERROR,
cell0.getCellTypeEnum());
         assertEquals("Double.NaN should change cell value to #NUM!", FormulaError.NUM, forInt(cell0.getErrorCellValue()));
 
         Cell cell1 = row.createCell(1);
         cell1.setCellValue(Double.POSITIVE_INFINITY);
-        assertEquals("Double.POSITIVE_INFINITY should change cell type to CellType#ERROR",
CellType.ERROR, cell1.getCellType());
+        assertEquals("Double.POSITIVE_INFINITY should change cell type to CellType#ERROR",
CellType.ERROR, cell1.getCellTypeEnum());
         assertEquals("Double.POSITIVE_INFINITY should change cell value to #DIV/0!", FormulaError.DIV0,
forInt(cell1.getErrorCellValue()));
 
         Cell cell2 = row.createCell(2);
         cell2.setCellValue(Double.NEGATIVE_INFINITY);
-        assertEquals("Double.NEGATIVE_INFINITY should change cell type to CellType#ERROR",
CellType.ERROR, cell2.getCellType());
+        assertEquals("Double.NEGATIVE_INFINITY should change cell type to CellType#ERROR",
CellType.ERROR, cell2.getCellTypeEnum());
         assertEquals("Double.NEGATIVE_INFINITY should change cell value to #DIV/0!", FormulaError.DIV0,
forInt(cell2.getErrorCellValue()));
 
         Workbook wb2 = _testDataProvider.writeOutAndReadBack(wb1);
@@ -690,15 +690,15 @@ public abstract class BaseTestCell {
         row = wb2.getSheetAt(0).getRow(0);
 
         cell0 = row.getCell(0);
-        assertEquals(CellType.ERROR, cell0.getCellType());
+        assertEquals(CellType.ERROR, cell0.getCellTypeEnum());
         assertEquals(FormulaError.NUM, forInt(cell0.getErrorCellValue()));
 
         cell1 = row.getCell(1);
-        assertEquals(CellType.ERROR, cell1.getCellType());
+        assertEquals(CellType.ERROR, cell1.getCellTypeEnum());
         assertEquals(FormulaError.DIV0, forInt(cell1.getErrorCellValue()));
 
         cell2 = row.getCell(2);
-        assertEquals(CellType.ERROR, cell2.getCellType());
+        assertEquals(CellType.ERROR, cell2.getCellTypeEnum());
         assertEquals(FormulaError.DIV0, forInt(cell2.getErrorCellValue()));
         wb2.close();
     }
@@ -899,21 +899,21 @@ public abstract class BaseTestCell {
         RichTextString nullStr = null;
         cell.setCellValue(nullStr);
         assertEquals("", cell.getStringCellValue());
-        assertEquals(CellType.BLANK, cell.getCellType());
+        assertEquals(CellType.BLANK, cell.getCellTypeEnum());
 
         cell = sheet.createRow(0).createCell(1);
         cell.setCellValue(1.2d);
-        assertEquals(CellType.NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellTypeEnum());
         cell.setCellValue(nullStr);
         assertEquals("", cell.getStringCellValue());
-        assertEquals(CellType.BLANK, cell.getCellType());
+        assertEquals(CellType.BLANK, cell.getCellTypeEnum());
 
         cell = sheet.createRow(0).createCell(1);
         cell.setCellValue(wb.getCreationHelper().createRichTextString("Test"));
-        assertEquals(CellType.STRING, cell.getCellType());
+        assertEquals(CellType.STRING, cell.getCellTypeEnum());
         cell.setCellValue(nullStr);
         assertEquals("", cell.getStringCellValue());
-        assertEquals(CellType.BLANK, cell.getCellType());
+        assertEquals(CellType.BLANK, cell.getCellTypeEnum());
 
         wb.close();
     }

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java?rev=1751256&r1=1751255&r2=1751256&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java Mon Jul  4 11:54:20
2016
@@ -256,36 +256,36 @@ public abstract class BaseTestRow {
         row.createCell(5).setCellValue(4);
 
         // First up, no policy given, uses default
-        assertEquals(CellType.STRING,  row.getCell(0).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(1).getCellType());
+        assertEquals(CellType.STRING,  row.getCell(0).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(1).getCellTypeEnum());
         assertEquals(null, row.getCell(2));
         assertEquals(null, row.getCell(3));
-        assertEquals(CellType.BLANK,   row.getCell(4).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(5).getCellType());
+        assertEquals(CellType.BLANK,   row.getCell(4).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(5).getCellTypeEnum());
 
         // RETURN_NULL_AND_BLANK - same as default
-        assertEquals(CellType.STRING,  row.getCell(0, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
+        assertEquals(CellType.STRING,  row.getCell(0, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
         assertEquals(null, row.getCell(2, MissingCellPolicy.RETURN_NULL_AND_BLANK));
         assertEquals(null, row.getCell(3, MissingCellPolicy.RETURN_NULL_AND_BLANK));
-        assertEquals(CellType.BLANK,   row.getCell(4, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellType());
+        assertEquals(CellType.BLANK,   row.getCell(4, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_NULL_AND_BLANK).getCellTypeEnum());
 
         // RETURN_BLANK_AS_NULL - nearly the same
-        assertEquals(CellType.STRING,  row.getCell(0, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
+        assertEquals(CellType.STRING,  row.getCell(0, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellTypeEnum());
         assertEquals(null, row.getCell(2, MissingCellPolicy.RETURN_BLANK_AS_NULL));
         assertEquals(null, row.getCell(3, MissingCellPolicy.RETURN_BLANK_AS_NULL));
         assertEquals(null, row.getCell(4, MissingCellPolicy.RETURN_BLANK_AS_NULL));
-        assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellType());
+        assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.RETURN_BLANK_AS_NULL).getCellTypeEnum());
 
         // CREATE_NULL_AS_BLANK - creates as needed
-        assertEquals(CellType.STRING,  row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
-        assertEquals(CellType.BLANK,   row.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
-        assertEquals(CellType.BLANK,   row.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
-        assertEquals(CellType.BLANK,   row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellType());
+        assertEquals(CellType.STRING,  row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
+        assertEquals(CellType.BLANK,   row.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
+        assertEquals(CellType.BLANK,   row.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
+        assertEquals(CellType.BLANK,   row.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK).getCellTypeEnum());
 
         // Check created ones get the right column
         assertEquals(0, row.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getColumnIndex());
@@ -300,12 +300,12 @@ public abstract class BaseTestRow {
         //  that that is now used if no policy given
         workbook.setMissingCellPolicy(MissingCellPolicy.RETURN_BLANK_AS_NULL);
 
-        assertEquals(CellType.STRING,  row.getCell(0).getCellType());
-        assertEquals(CellType.NUMERIC, row.getCell(1).getCellType());
+        assertEquals(CellType.STRING,  row.getCell(0).getCellTypeEnum());
+        assertEquals(CellType.NUMERIC, row.getCell(1).getCellTypeEnum());
         assertEquals(null, row.getCell(2));
         assertEquals(null, row.getCell(3));
         assertEquals(null, row.getCell(4));
-        assertEquals(CellType.NUMERIC, row.getCell(5).getCellType());
+        assertEquals(CellType.NUMERIC, row.getCell(5).getCellTypeEnum());
         
         workbook.close();
     }
@@ -420,7 +420,7 @@ public abstract class BaseTestRow {
         assertTrue(cell5 == it.next());
         assertTrue(it.hasNext());
         assertTrue(cell2 == it.next());
-        assertEquals(CellType.STRING, cell5.getCellType());
+        assertEquals(CellType.STRING, cell5.getCellTypeEnum());
         wb.close();
     }
 

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java?rev=1751256&r1=1751255&r2=1751256&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java Mon
Jul  4 11:54:20 2016
@@ -344,7 +344,7 @@ public abstract class BaseTestSheetAutos
             Sheet sheet = workbook.getSheetAt(i);
             for (Row r : sheet) {
                 for (Cell c : r) {
-                    if (c.getCellType() == CellType.FORMULA){
+                    if (c.getCellTypeEnum() == CellType.FORMULA){
                         eval.evaluateFormulaCell(c);
                     }
                 }

Modified: poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java?rev=1751256&r1=1751255&r2=1751256&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
(original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
Mon Jul  4 11:54:20 2016
@@ -133,7 +133,7 @@ public abstract class BaseTestSheetUpdat
 
         for(Cell acell : cells){
             assertTrue(acell.isPartOfArrayFormulaGroup());
-            assertEquals(CellType.FORMULA, acell.getCellType());
+            assertEquals(CellType.FORMULA, acell.getCellTypeEnum());
             assertEquals("SUM(A1:A3*B1:B3)", acell.getCellFormula());
             //retrieve the range and check it is the same
             assertEquals(range.formatAsString(), acell.getArrayFormulaRange().formatAsString());
@@ -210,7 +210,7 @@ public abstract class BaseTestSheetUpdat
 
         for(Cell acell : cr){
             assertFalse(acell.isPartOfArrayFormulaGroup());
-            assertEquals(CellType.BLANK, acell.getCellType());
+            assertEquals(CellType.BLANK, acell.getCellTypeEnum());
         }
 
         // cells C4:C6 are not included in array formula,
@@ -279,7 +279,7 @@ public abstract class BaseTestSheetUpdat
         CellRange<? extends Cell> srange =
                 sheet.setArrayFormula("SUM(A4:A6,B4:B6)", CellRangeAddress.valueOf("B5"));
         Cell scell = srange.getTopLeftCell();
-        assertEquals(CellType.FORMULA, scell.getCellType());
+        assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
         assertEquals(0.0, scell.getNumericCellValue(), 0);
         scell.setCellValue(1.1);
         assertEquals(1.1, scell.getNumericCellValue(), 0);
@@ -288,7 +288,7 @@ public abstract class BaseTestSheetUpdat
         CellRange<? extends Cell> mrange =
                 sheet.setArrayFormula("A1:A3*B1:B3", CellRangeAddress.valueOf("C1:C3"));
         for(Cell mcell : mrange){
-            assertEquals(CellType.FORMULA, mcell.getCellType());
+            assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
             assertEquals(0.0, mcell.getNumericCellValue(), 0);
             double fmlaResult = 1.2;
             mcell.setCellValue(fmlaResult);
@@ -307,10 +307,10 @@ public abstract class BaseTestSheetUpdat
         CellRange<? extends Cell> srange =
                 sheet.setArrayFormula("SUM(A4:A6,B4:B6)", CellRangeAddress.valueOf("B5"));
         Cell scell = srange.getTopLeftCell();
-        assertEquals(CellType.FORMULA, scell.getCellType());
+        assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
         assertEquals(0.0, scell.getNumericCellValue(), 0);
         scell.setCellType(CellType.STRING);
-        assertEquals(CellType.STRING, scell.getCellType());
+        assertEquals(CellType.STRING, scell.getCellTypeEnum());
         scell.setCellValue("string cell");
         assertEquals("string cell", scell.getStringCellValue());
 
@@ -319,7 +319,7 @@ public abstract class BaseTestSheetUpdat
                 sheet.setArrayFormula("A1:A3*B1:B3", CellRangeAddress.valueOf("C1:C3"));
         for(Cell mcell : mrange){
             try {
-                assertEquals(CellType.FORMULA, mcell.getCellType());
+                assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
                 mcell.setCellType(CellType.NUMERIC);
                 fail("expected exception");
             } catch (IllegalStateException e){
@@ -329,7 +329,7 @@ public abstract class BaseTestSheetUpdat
             }
             // a failed invocation of Cell.setCellType leaves the cell
             // in the state that it was in prior to the invocation
-            assertEquals(CellType.FORMULA, mcell.getCellType());
+            assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
             assertTrue(mcell.isPartOfArrayFormulaGroup());
         }
         workbook.close();
@@ -344,13 +344,13 @@ public abstract class BaseTestSheetUpdat
                 sheet.setArrayFormula("SUM(A4:A6,B4:B6)", CellRangeAddress.valueOf("B5"));
         Cell scell = srange.getTopLeftCell();
         assertEquals("SUM(A4:A6,B4:B6)", scell.getCellFormula());
-        assertEquals(CellType.FORMULA, scell.getCellType());
+        assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
         assertTrue(scell.isPartOfArrayFormulaGroup());
         scell.setCellFormula("SUM(A4,A6)");
         //we are now a normal formula cell
         assertEquals("SUM(A4,A6)", scell.getCellFormula());
         assertFalse(scell.isPartOfArrayFormulaGroup());
-        assertEquals(CellType.FORMULA, scell.getCellType());
+        assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
         //check that setting formula result works
         assertEquals(0.0, scell.getNumericCellValue(), 0);
         scell.setCellValue(33.0);
@@ -396,7 +396,7 @@ public abstract class BaseTestSheetUpdat
 
         //re-create the removed cell
         scell = srow.createCell(cra.getFirstColumn());
-        assertEquals(CellType.BLANK, scell.getCellType());
+        assertEquals(CellType.BLANK, scell.getCellTypeEnum());
         assertFalse(scell.isPartOfArrayFormulaGroup());
 
         //we cannot remove cells included in a multi-cell array formula
@@ -417,7 +417,7 @@ public abstract class BaseTestSheetUpdat
             // in the state that it was in prior to the invocation
             assertSame(mcell, mrow.getCell(columnIndex));
             assertTrue(mcell.isPartOfArrayFormulaGroup());
-            assertEquals(CellType.FORMULA, mcell.getCellType());
+            assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
         }
         
         workbook.close();
@@ -433,7 +433,7 @@ public abstract class BaseTestSheetUpdat
         CellRange<? extends Cell> srange =
                 sheet.setArrayFormula("SUM(A4:A6,B4:B6)", cra);
         Cell scell = srange.getTopLeftCell();
-        assertEquals(CellType.FORMULA, scell.getCellType());
+        assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
 
         Row srow = scell.getRow();
         assertSame(srow, sheet.getRow(cra.getFirstRow()));
@@ -442,7 +442,7 @@ public abstract class BaseTestSheetUpdat
 
         //re-create the removed row and cell
         scell = sheet.createRow(cra.getFirstRow()).createCell(cra.getFirstColumn());
-        assertEquals(CellType.BLANK, scell.getCellType());
+        assertEquals(CellType.BLANK, scell.getCellTypeEnum());
         assertFalse(scell.isPartOfArrayFormulaGroup());
 
         //we cannot remove rows with cells included in a multi-cell array formula
@@ -463,7 +463,7 @@ public abstract class BaseTestSheetUpdat
             assertSame(mrow, sheet.getRow(mrow.getRowNum()));
             assertSame(mcell, mrow.getCell(columnIndex));
             assertTrue(mcell.isPartOfArrayFormulaGroup());
-            assertEquals(CellType.FORMULA, mcell.getCellType());
+            assertEquals(CellType.FORMULA, mcell.getCellTypeEnum());
         }
         
         workbook.close();
@@ -481,7 +481,7 @@ public abstract class BaseTestSheetUpdat
         Cell scell = srange.getTopLeftCell();
         sheet.addMergedRegion(CellRangeAddress.valueOf("B5:C6"));
         //we are still an array formula
-        assertEquals(CellType.FORMULA, scell.getCellType());
+        assertEquals(CellType.FORMULA, scell.getCellTypeEnum());
         assertTrue(scell.isPartOfArrayFormulaGroup());
         assertEquals(1, sheet.getNumMergedRegions());
         

Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java?rev=1751256&r1=1751255&r2=1751256&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java Mon Jul  4 11:54:20
2016
@@ -50,7 +50,7 @@ public final class TestSheetBuilder exte
         Row firstRow = sheet.getRow(0);
         Cell firstCell = firstRow.getCell(0);
 
-        assertEquals(firstCell.getCellType(), CellType.NUMERIC);
+        assertEquals(firstCell.getCellTypeEnum(), CellType.NUMERIC);
         assertEquals(1.0, firstCell.getNumericCellValue(), 0.00001);
 
 
@@ -59,11 +59,11 @@ public final class TestSheetBuilder exte
         assertNull(secondRow.getCell(2));
 
         Row thirdRow = sheet.getRow(2);
-        assertEquals(CellType.STRING, thirdRow.getCell(0).getCellType());
+        assertEquals(CellType.STRING, thirdRow.getCell(0).getCellTypeEnum());
         String cellValue = thirdRow.getCell(0).getStringCellValue();
         assertEquals(testData[2][0].toString(), cellValue);
 
-        assertEquals(CellType.FORMULA, thirdRow.getCell(2).getCellType());
+        assertEquals(CellType.FORMULA, thirdRow.getCell(2).getCellTypeEnum());
         assertEquals("A1+B2", thirdRow.getCell(2).getCellFormula());
     }
 
@@ -73,7 +73,7 @@ public final class TestSheetBuilder exte
 
         Cell emptyCell = sheet.getRow(1).getCell(1);
         assertNotNull(emptyCell);
-        assertEquals(CellType.BLANK, emptyCell.getCellType());
+        assertEquals(CellType.BLANK, emptyCell.getCellTypeEnum());
     }
 
     public void testSheetName() {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message