poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1751240 [1/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/ java/org/apache/poi/hssf/record/ java/org/apache/poi/hssf/usermodel/ ja...
Date Mon, 04 Jul 2016 10:15:19 GMT
Author: onealj
Date: Mon Jul  4 10:15:18 2016
New Revision: 1751240

URL: http://svn.apache.org/viewvc?rev=1751240&view=rev
Log:
bug 59791: replace deprecated Cell.CELL_TYPE_* usage with CellType.*

Modified:
    poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java
    poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java
    poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java
    poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java
    poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
    poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
    poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
    poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java
    poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java
    poi/trunk/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java
    poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefEval.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java
    poi/trunk/src/java/org/apache/poi/ss/util/cellwalk/CellWalk.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/TestStructuredReferences.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/functions/TestProper.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidation.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPivotTable.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRow.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheet.java
    poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFSheetShiftRows.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/QuickTest.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestFormulaParserEval.java
    poi/trunk/src/testcases/org/apache/poi/hssf/model/TestRVA.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSharedFormulaRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestExternalReferenceChange.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorDocs.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFFormulaEvaluator.java
    poi/trunk/src/testcases/org/apache/poi/ss/format/TestCellFormat.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/BaseTestExternalFunctions.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/TestEvaluationCache.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/TestMissingWorkbook.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/atp/TestIfError.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/atp/TestRandBetween.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/BaseTestCircularReferences.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestFormulaBugs.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/eval/TestPercentEval.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/CountifsTests.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestAddress.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCalendarFieldFunction.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestClean.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestCountFuncs.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestDate.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestFind.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestFixed.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIndirect.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIrr.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestIsBlank.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestLogicalFunction.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestMirr.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/functions/TestNper.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/udf/TestAggregatingUDFFinder.java
    poi/trunk/src/testcases/org/apache/poi/ss/formula/udf/TestDefaultUDFFinder.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestRow.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetShiftRows.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetUpdateArrayFormulas.java
    poi/trunk/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
    poi/trunk/src/testcases/org/apache/poi/ss/util/TestSheetBuilder.java

Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/CellTypes.java Mon Jul  4 10:15:18 2016
@@ -17,15 +17,15 @@
 
 package org.apache.poi.hssf.usermodel.examples;
 
-import org.apache.poi.hssf.usermodel.HSSFCell;
-import org.apache.poi.hssf.usermodel.HSSFRow;
-import org.apache.poi.hssf.usermodel.HSSFSheet;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.Date;
 
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.CellType;
+
 public class CellTypes {
     public static void main(String[] args) throws IOException {
         HSSFWorkbook wb = new HSSFWorkbook();
@@ -35,7 +35,7 @@ public class CellTypes {
         row.createCell(1).setCellValue(new Date());
         row.createCell(2).setCellValue("a string");
         row.createCell(3).setCellValue(true);
-        row.createCell(4).setCellType(HSSFCell.CELL_TYPE_ERROR);
+        row.createCell(4).setCellType(CellType.ERROR);
 
         // Write the output to a file
         FileOutputStream fileOut = new FileOutputStream("workbook.xls");

Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/HyperlinkFormula.java Mon Jul  4 10:15:18 2016
@@ -17,11 +17,15 @@
 
 package org.apache.poi.hssf.usermodel.examples;
 
-import org.apache.poi.hssf.usermodel.*;
-
 import java.io.FileOutputStream;
 import java.io.IOException;
 
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.CellType;
+
 /**
  * Test if hyperlink formula, with url that got more than 127 characters, works
  *
@@ -34,7 +38,7 @@ public class HyperlinkFormula {
         HSSFRow row = sheet.createRow(0);
 
         HSSFCell cell = row.createCell(0);
-        cell.setCellType(HSSFCell.CELL_TYPE_FORMULA);
+        cell.setCellType(CellType.FORMULA);
         cell.setCellFormula("HYPERLINK(\"http://127.0.0.1:8080/toto/truc/index.html?test=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\", \"test\")");
 
         FileOutputStream fileOut = new FileOutputStream("workbook.xls");

Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/NewLinesInCells.java Mon Jul  4 10:15:18 2016
@@ -18,6 +18,7 @@
 package org.apache.poi.hssf.usermodel.examples;
 
 import org.apache.poi.hssf.usermodel.*;
+import org.apache.poi.ss.usermodel.CellType;
 
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -47,7 +48,7 @@ public class NewLinesInCells {
 		r = s.createRow(2);
 		r.setHeight((short) 0x349);
 		c = r.createCell(2);
-		c.setCellType(HSSFCell.CELL_TYPE_STRING);
+		c.setCellType(CellType.STRING);
 		c.setCellValue("Use \n with word wrap on to create a new line");
 		c.setCellStyle(cs);
 		s.setColumnWidth(2, (int) ((50 * 8) / ((double) 1 / 20)));

Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/hssf/usermodel/examples/ReadWriteWorkbook.java Mon Jul  4 10:15:18 2016
@@ -17,16 +17,17 @@
 
 package org.apache.poi.hssf.usermodel.examples;
 
-import org.apache.poi.poifs.filesystem.POIFSFileSystem;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.hssf.usermodel.HSSFSheet;
-import org.apache.poi.hssf.usermodel.HSSFRow;
-import org.apache.poi.hssf.usermodel.HSSFCell;
-
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.ss.usermodel.CellType;
+
 /**
  * This example demonstrates opening a workbook, modifying it and writing
  * the results back out.
@@ -50,7 +51,7 @@ public class ReadWriteWorkbook {
             HSSFCell cell = row.getCell(3);
             if (cell == null)
                 cell = row.createCell(3);
-            cell.setCellType(HSSFCell.CELL_TYPE_STRING);
+            cell.setCellType(CellType.STRING);
             cell.setCellValue("a test");
 
             // Write the output to a file

Modified: poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/hssf/view/SVSheetTable.java Mon Jul  4 10:15:18 2016
@@ -16,20 +16,37 @@
 ==================================================================== */
 package org.apache.poi.hssf.view;
 
-import org.apache.poi.hssf.view.brush.PendingPaintings;
-import org.apache.poi.hssf.usermodel.HSSFCell;
-import org.apache.poi.hssf.usermodel.HSSFSheet;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.Row;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.Toolkit;
+import java.awt.event.HierarchyEvent;
+import java.awt.event.HierarchyListener;
 
-import javax.swing.*;
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JViewport;
+import javax.swing.ListSelectionModel;
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
-import javax.swing.table.*;
+import javax.swing.table.JTableHeader;
+import javax.swing.table.TableCellRenderer;
+import javax.swing.table.TableColumn;
+import javax.swing.table.TableColumnModel;
+import javax.swing.table.TableModel;
 import javax.swing.text.JTextComponent;
-import java.awt.*;
-import java.awt.event.HierarchyEvent;
-import java.awt.event.HierarchyListener;
+
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.view.brush.PendingPaintings;
+import org.apache.poi.ss.usermodel.CellType;
+import org.apache.poi.ss.usermodel.Row;
 
 /**
  * This class is a table that represents the values in a single worksheet.
@@ -125,7 +142,7 @@ public class SVSheetTable extends JTable
       HSSFCell cell = (HSSFCell) getValueAt(row, col);
       String formula = "";
       if (cell != null) {
-        if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
+        if (cell.getCellType() == CellType.FORMULA) {
           formula = cell.getCellFormula();
         } else {
           formula = cell.toString();

Modified: poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java (original)
+++ poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java Mon Jul  4 10:15:18 2016
@@ -29,6 +29,7 @@ import java.util.ArrayList;
 
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.DataFormatter;
 import org.apache.poi.ss.usermodel.FormulaEvaluator;
 import org.apache.poi.ss.usermodel.Row;
@@ -541,7 +542,7 @@ public class ToCSV {
                     csvLine.add("");
                 }
                 else {
-                    if(cell.getCellType() != Cell.CELL_TYPE_FORMULA) {
+                    if(cell.getCellType() != CellType.FORMULA) {
                         csvLine.add(this.formatter.formatCellValue(cell));
                     }
                     else {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/RecordInputStream.java Mon Jul  4 10:15:18 2016
@@ -283,10 +283,10 @@ public final class RecordInputStream imp
 		long valueLongBits = readLong();
 		double result = Double.longBitsToDouble(valueLongBits);
 		if (Double.isNaN(result)) {
-            // YK: Excel doesn't write NaN but instead converts the cell type into CELL_TYPE_ERROR.
+            // YK: Excel doesn't write NaN but instead converts the cell type into {@link CellType#ERROR}.
             // HSSF prior to version 3.7 had a bug: it could write Double.NaN but could not read such a file back.
             // This behavior was fixed in POI-3.7.
-            //throw new RuntimeException("Did not expect to read NaN"); // (Because Excel typically doesn't write NaN
+            //throw new RuntimeException("Did not expect to read NaN"); // (Because Excel typically doesn't write NaN)
 		}
 		return result;
 	}

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java Mon Jul  4 10:15:18 2016
@@ -22,6 +22,7 @@ import org.apache.poi.hssf.record.Extend
 import org.apache.poi.hssf.record.FontRecord;
 import org.apache.poi.hssf.record.common.UnicodeString;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 
 /**
@@ -141,7 +142,7 @@ public class HSSFOptimiser {
 			HSSFSheet s = workbook.getSheetAt(sheetNum);
 			for (Row row : s) {
 			   for (Cell cell : row) {
-					if(cell.getCellType() == Cell.CELL_TYPE_STRING) {
+					if(cell.getCellType() == CellType.STRING) {
 						HSSFRichTextString rtr = (HSSFRichTextString)cell.getRichStringCellValue();
 						UnicodeString u = rtr.getRawUnicodeString();
 						

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java Mon Jul  4 10:15:18 2016
@@ -99,7 +99,7 @@ public final class HSSFRow implements Ro
     /**
      * Use this to create new cells within the row and return it.
      * <p>
-     * The cell that is returned is a CELL_TYPE_BLANK. The type can be changed
+     * The cell that is returned is a {@link CellType#BLANK}. The type can be changed
      * either through calling <code>setCellValue</code> or <code>setCellType</code>.
      *
      * @param column - the column number this cell represents

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Mon Jul  4 10:15:18 2016
@@ -40,7 +40,6 @@ import org.apache.poi.hssf.record.Escher
 import org.apache.poi.hssf.record.ExtendedFormatRecord;
 import org.apache.poi.hssf.record.HyperlinkRecord;
 import org.apache.poi.hssf.record.NameRecord;
-import org.apache.poi.hssf.record.NoteRecord;
 import org.apache.poi.hssf.record.Record;
 import org.apache.poi.hssf.record.RecordBase;
 import org.apache.poi.hssf.record.RowRecord;
@@ -62,6 +61,7 @@ import org.apache.poi.ss.formula.ptg.Uni
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellRange;
 import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.DataValidation;
 import org.apache.poi.ss.usermodel.DataValidationHelper;
 import org.apache.poi.ss.usermodel.Row;
@@ -2338,7 +2338,7 @@ public final class HSSFSheet implements
         CellRange<HSSFCell> result = getCellRange(range);
         // clear all cells in the range
         for (Cell c : result) {
-            c.setCellType(Cell.CELL_TYPE_BLANK);
+            c.setCellType(CellType.BLANK);
         }
         return result;
     }

Modified: poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/format/CellFormat.java Mon Jul  4 10:15:18 2016
@@ -410,7 +410,7 @@ public class CellFormat {
 
     /**
      * Returns the ultimate cell type, following the results of formulas.  If
-     * the cell is a {@link Cell#CELL_TYPE_FORMULA}, this returns the result of
+     * the cell is a {@link CellType#FORMULA}, this returns the result of
      * {@link Cell#getCachedFormulaResultType()}.  Otherwise this returns the
      * result of {@link Cell#getCellType()}.
      *

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCache.java Mon Jul  4 10:15:18 2016
@@ -17,16 +17,16 @@
 
 package org.apache.poi.ss.formula;
 
+import org.apache.poi.ss.formula.FormulaCellCache.IEntryOperation;
+import org.apache.poi.ss.formula.FormulaUsedBlankCellSet.BookSheetKey;
+import org.apache.poi.ss.formula.PlainCellCache.Loc;
 import org.apache.poi.ss.formula.eval.BlankEval;
 import org.apache.poi.ss.formula.eval.BoolEval;
 import org.apache.poi.ss.formula.eval.ErrorEval;
 import org.apache.poi.ss.formula.eval.NumberEval;
 import org.apache.poi.ss.formula.eval.StringEval;
 import org.apache.poi.ss.formula.eval.ValueEval;
-import org.apache.poi.ss.formula.FormulaCellCache.IEntryOperation;
-import org.apache.poi.ss.formula.FormulaUsedBlankCellSet.BookSheetKey;
-import org.apache.poi.ss.formula.PlainCellCache.Loc;
-import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 
 /**
  * Performance optimisation for {@link org.apache.poi.ss.usermodel.FormulaEvaluator}.
@@ -56,7 +56,7 @@ final class EvaluationCache {
 		Loc loc = new Loc(bookIndex, sheetIndex, rowIndex, columnIndex);
 		PlainValueCellCacheEntry pcce = _plainCellCache.get(loc);
 
-		if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
+		if (cell.getCellType() == CellType.FORMULA) {
 			if (fcce == null) {
 				fcce = new FormulaCellCacheEntry();
 				if (pcce == null) {
@@ -197,7 +197,7 @@ final class EvaluationCache {
 	}
 	public void notifyDeleteCell(int bookIndex, int sheetIndex, EvaluationCell cell) {
 
-		if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
+		if (cell.getCellType() == CellType.FORMULA) {
 			FormulaCellCacheEntry fcce = _formulaCellCache.remove(cell);
 			if (fcce == null) {
 				// formula cell has not been evaluated yet

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/SheetRefEvaluator.java Mon Jul  4 10:15:18 2016
@@ -20,7 +20,7 @@ package org.apache.poi.ss.formula;
 import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.formula.ptg.FuncVarPtg;
 import org.apache.poi.ss.formula.ptg.Ptg;
-import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 
 /**
  * Evaluator for cells within a specific Sheet
@@ -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.getCellType() == Cell.CELL_TYPE_FORMULA){
+        if(cell != null && cell.getCellType() == CellType.FORMULA){
             EvaluationWorkbook wb = _bookEvaluator.getWorkbook();
             for(Ptg ptg : wb.getFormulaTokens(cell)){
                 if(ptg instanceof FuncVarPtg){

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefEval.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefEval.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefEval.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/RefEval.java Mon Jul  4 10:15:18 2016
@@ -18,13 +18,14 @@
 package org.apache.poi.ss.formula.eval;
 
 import org.apache.poi.ss.formula.SheetRange;
+import org.apache.poi.ss.usermodel.CellType;
 
 /**
  * RefEval is the super interface for Ref2D and Ref3DEval. Basically a RefEval
  * impl should contain reference to the original ReferencePtg or Ref3DPtg as
  * well as the final "value" resulting from the evaluation of the cell
- * reference. Thus if the Cell has type CELL_TYPE_NUMERIC, the contained
- * value object should be of type NumberEval; if cell type is CELL_TYPE_STRING,
+ * reference. Thus if the Cell has type {@link CellType#NUMERIC}, the contained
+ * value object should be of type NumberEval; if cell type is {@link CellType#STRING},
  * contained value object should be of type StringEval
  */
 public interface RefEval extends ValueEval, SheetRange {

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java Mon Jul  4 10:15:18 2016
@@ -127,12 +127,12 @@ public interface Cell {
      *
      * @throws IllegalArgumentException if the specified cell type is invalid
      * @throws IllegalStateException if the current value cannot be converted to the new type
-     * @see #CELL_TYPE_NUMERIC
-     * @see #CELL_TYPE_STRING
-     * @see #CELL_TYPE_FORMULA
-     * @see #CELL_TYPE_BLANK
-     * @see #CELL_TYPE_BOOLEAN
-     * @see #CELL_TYPE_ERROR
+     * @see CellType#NUMERIC
+     * @see CellType#STRING
+     * @see CellType#FORMULA
+     * @see CellType#BLANK
+     * @see CellType#BOOLEAN
+     * @see CellType#ERROR
      * @deprecated POI 3.15 beta 3. Use {@link #setCellType(CellType)} instead.
      */
     void setCellType(int cellType);

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/FormulaEvaluator.java Mon Jul  4 10:15:18 2016
@@ -96,8 +96,8 @@ public interface FormulaEvaluator {
      *  the result of the formula, use {@link #evaluateInCell(Cell)}
      * @param cell The cell to evaluate
      * @return The type of the formula result, i.e. -1 if the cell is not a formula, 
-     *      or one of Cell.CELL_TYPE_NUMERIC, Cell.CELL_TYPE_STRING, Cell.CELL_TYPE_BOOLEAN, Cell.CELL_TYPE_ERROR
-     *      Note: the cell's type remains as Cell.CELL_TYPE_FORMULA however.
+     *      or one of CellType.NUMERIC, CellType.STRING, CellType.BOOLEAN, CellType.ERROR
+     *      Note: the cell's type remains as CellType.FORMULA however.
      */
     CellType evaluateFormulaCell(Cell cell);
 

Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/charts/DataSources.java Mon Jul  4 10:15:18 2016
@@ -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.getCellType() == Cell.CELL_TYPE_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.getCellType() == Cell.CELL_TYPE_STRING) {
+                if (cellValue != null && cellValue.getCellType() == CellType.STRING) {
                     return cellValue.getStringValue();
                 } else {
                     return null;

Modified: poi/trunk/src/java/org/apache/poi/ss/util/cellwalk/CellWalk.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/cellwalk/CellWalk.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/cellwalk/CellWalk.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/cellwalk/CellWalk.java Mon Jul  4 10:15:18 2016
@@ -18,6 +18,7 @@
 package org.apache.poi.ss.util.cellwalk;
 
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.util.CellRangeAddress;
@@ -100,7 +101,7 @@ public class CellWalk {
     }
 
     private boolean isEmpty(Cell cell) {
-        return (cell.getCellType() == Cell.CELL_TYPE_BLANK);
+        return (cell.getCellType() == CellType.BLANK);
     }
 
     /**

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java Mon Jul  4 10:15:18 2016
@@ -22,6 +22,7 @@ import org.apache.poi.ss.formula.IStabil
 import org.apache.poi.ss.formula.WorkbookEvaluator;
 import org.apache.poi.ss.formula.udf.UDFFinder;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.util.POILogFactory;
@@ -120,7 +121,7 @@ public final class SXSSFFormulaEvaluator
             // Evaluate what we have
             for (Row r : sheet) {
                 for (Cell c : r) {
-                    if (c.getCellType() == Cell.CELL_TYPE_FORMULA) {
+                    if (c.getCellType() == CellType.FORMULA) {
                         eval.evaluateFormulaCell(c);
                     }
                 }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java Mon Jul  4 10:15:18 2016
@@ -110,7 +110,7 @@ public abstract class BaseXSSFFormulaEva
      *  and the result. If you want the cell replaced with
      *  the result of the formula, use {@link #evaluate(org.apache.poi.ss.usermodel.Cell)} }
      * @param cell The cell to evaluate
-     * @return The type of the formula result (the cell's type remains as HSSFCell.CELL_TYPE_FORMULA however)
+     * @return The type of the formula result (the cell's type remains as CellType.FORMULA however)
      */
     public CellType evaluateFormulaCell(Cell cell) {
         if (cell == null || cell.getCellType() != CellType.FORMULA) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotCacheDefinition.java Mon Jul  4 10:15:18 2016
@@ -29,6 +29,7 @@ import org.apache.poi.POIXMLDocumentPart
 import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackageRelationship;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.util.AreaReference;
@@ -143,7 +144,7 @@ public class XSSFPivotCacheDefinition ex
             //General number format
             cf.setNumFmtId(0);
             Cell cell = row.getCell(i);
-            cell.setCellType(Cell.CELL_TYPE_STRING);
+            cell.setCellType(CellType.STRING);
             cf.setName(row.getCell(i).getStringCellValue());
             cf.addNewSharedItems();
         }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java Mon Jul  4 10:15:18 2016
@@ -31,6 +31,7 @@ import org.apache.poi.POIXMLDocumentPart
 import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackageRelationship;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.DataConsolidateFunction;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.util.AreaReference;
@@ -39,26 +40,7 @@ import org.apache.poi.util.Beta;
 import org.apache.poi.util.Internal;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlOptions;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCacheSource;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTColFields;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDataField;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDataFields;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTField;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTItems;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTLocation;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageField;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPageFields;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotCacheDefinition;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotField;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotFields;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotTableDefinition;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotTableStyle;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRowFields;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTWorksheetSource;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STAxis;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataConsolidateFunction;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STItemType;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.STSourceType;
+import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
 
 public class XSSFPivotTable extends POIXMLDocumentPart {
 
@@ -357,7 +339,7 @@ public class XSSFPivotTable extends POIX
         dataField.setSubtotal(STDataConsolidateFunction.Enum.forInt(function.getValue()));
         Cell cell = getDataSheet().getRow(pivotArea.getFirstCell().getRow())
                 .getCell(pivotArea.getFirstCell().getCol() + columnIndex);
-        cell.setCellType(Cell.CELL_TYPE_STRING);
+        cell.setCellType(CellType.STRING);
         dataField.setName(valueFieldName);
         dataField.setFld(columnIndex);
         dataFields.setCount(dataFields.sizeOfDataFieldArray());

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java Mon Jul  4 10:15:18 2016
@@ -43,7 +43,6 @@ import javax.xml.namespace.QName;
 
 import org.apache.poi.POIXMLDocumentPart;
 import org.apache.poi.POIXMLException;
-
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException;
 import org.apache.poi.openxml4j.opc.PackagePart;
@@ -58,6 +57,7 @@ import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellCopyPolicy;
 import org.apache.poi.ss.usermodel.CellRange;
 import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.DataValidation;
 import org.apache.poi.ss.usermodel.DataValidationHelper;
 import org.apache.poi.ss.usermodel.Footer;
@@ -3782,7 +3782,7 @@ public class XSSFSheet extends POIXMLDoc
                 arrayFormulas.remove(range);
                 CellRange<XSSFCell> cr = getCellRange(range);
                 for (XSSFCell c : cr) {
-                    c.setCellType(Cell.CELL_TYPE_BLANK);
+                    c.setCellType(CellType.BLANK);
                 }
                 return cr;
             }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFFormulaUtils.java Mon Jul  4 10:15:18 2016
@@ -26,6 +26,7 @@ import org.apache.poi.ss.formula.ptg.Ptg
 import org.apache.poi.ss.formula.ptg.Pxg;
 import org.apache.poi.ss.formula.ptg.Pxg3D;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.xssf.usermodel.XSSFCell;
@@ -76,7 +77,7 @@ public final class XSSFFormulaUtils {
         for (Sheet sh : _wb) {
             for (Row row : sh) {
                 for (Cell cell : row) {
-                    if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
+                    if (cell.getCellType() == CellType.FORMULA) {
                         updateFormula((XSSFCell) cell, oldName, newName);
                     }
                 }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/TestStructuredReferences.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/TestStructuredReferences.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/TestStructuredReferences.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/TestStructuredReferences.java Mon Jul  4 10:15:18 2016
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertFal
 import static org.junit.Assert.fail;
 
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.apache.poi.ss.usermodel.FormulaEvaluator;
 import org.apache.poi.ss.usermodel.Table;
@@ -72,7 +73,7 @@ public class TestStructuredReferences {
     private static void confirm(FormulaEvaluator fe, Cell cell, double expectedResult) {
         fe.clearAllCachedResultValues();
         CellValue cv = fe.evaluate(cell);
-        if (cv.getCellType() != Cell.CELL_TYPE_NUMERIC) {
+        if (cv.getCellType() != CellType.NUMERIC) {
             fail("expected numeric cell type but got " + cv.formatAsString());
         }
         assertEquals(expectedResult, cv.getNumberValue(), 0.0);

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/functions/TestProper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/functions/TestProper.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/functions/TestProper.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/ss/formula/functions/TestProper.java Mon Jul  4 10:15:18 2016
@@ -23,6 +23,7 @@ import junit.framework.TestCase;
 import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.apache.poi.ss.usermodel.FormulaEvaluator;
 import org.apache.poi.ss.usermodel.Sheet;
@@ -52,7 +53,7 @@ public final class TestProper extends Te
     private void confirm(Workbook wb) {
         Sheet sheet = wb.createSheet("new sheet");
         cell11 = sheet.createRow(0).createCell(0);
-        cell11.setCellType(XSSFCell.CELL_TYPE_FORMULA);
+        cell11.setCellType(CellType.FORMULA);
 
         confirm("PROPER(\"hi there\")", "Hi There");
         confirm("PROPER(\"what's up\")", "What'S Up");
@@ -77,7 +78,7 @@ public final class TestProper extends Te
         cell11.setCellFormula(formulaText);
         evaluator.clearAllCachedResultValues();
         CellValue cv = evaluator.evaluate(cell11);
-        if (cv.getCellType() != Cell.CELL_TYPE_STRING) {
+        if (cv.getCellType() != CellType.STRING) {
             throw new AssertionFailedError("Wrong result type: " + cv.formatAsString());
         }
         String actualValue = cv.getStringValue();

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/extractor/TestXSSFExportToXML.java Mon Jul  4 10:15:18 2016
@@ -32,6 +32,7 @@ import junit.framework.TestCase;
 
 import org.apache.poi.POIXMLDocumentPart;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.util.XMLHelper;
@@ -513,30 +514,30 @@ public final class TestXSSFExportToXML e
        
        Cell cString = row.createCell(0);
        cString.setCellValue("somestring");
-       cString.setCellType(XSSFCell.CELL_TYPE_STRING);
+       cString.setCellType(CellType.STRING);
        
        Cell cBoolean = row.createCell(1);
        cBoolean.setCellValue(true);
-       cBoolean.setCellType(XSSFCell.CELL_TYPE_BOOLEAN);
+       cBoolean.setCellType(CellType.BOOLEAN);
        
        Cell cError = row.createCell(2);
-       cError.setCellType(XSSFCell.CELL_TYPE_ERROR);
+       cError.setCellType(CellType.ERROR);
        
        Cell cFormulaString = row.createCell(3);
        cFormulaString.setCellFormula("A1");
-       cFormulaString.setCellType(XSSFCell.CELL_TYPE_FORMULA);
+       cFormulaString.setCellType(CellType.FORMULA);
        
        Cell cFormulaNumeric = row.createCell(4);
        cFormulaNumeric.setCellFormula("F1");
-       cFormulaNumeric.setCellType(XSSFCell.CELL_TYPE_FORMULA);
+       cFormulaNumeric.setCellType(CellType.FORMULA);
        
        Cell cNumeric = row.createCell(5);
        cNumeric.setCellValue(1.2);
-       cNumeric.setCellType(XSSFCell.CELL_TYPE_NUMERIC);
+       cNumeric.setCellType(CellType.NUMERIC);
        
        Cell cDate = row.createCell(6);
        cDate.setCellValue(new Date());
-       cDate.setCellType(XSSFCell.CELL_TYPE_NUMERIC);
+       cDate.setCellType(CellType.NUMERIC);
        
        boolean found = false;
        for (POIXMLDocumentPart p : wb.getRelations()) {

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/model/TestCalculationChain.java Mon Jul  4 10:15:18 2016
@@ -17,9 +17,12 @@
 
 package org.apache.poi.xssf.model;
 
-import org.apache.poi.xssf.usermodel.*;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.xssf.XSSFTestDataSamples;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCalcCell;
 
 import junit.framework.TestCase;
 
@@ -39,7 +42,7 @@ public final class TestCalculationChain
         XSSFSheet sheet = wb.getSheet("Test");
         XSSFCell cell = sheet.getRow(0).getCell(4);
 
-        assertEquals(XSSFCell.CELL_TYPE_FORMULA, cell.getCellType());
+        assertEquals(CellType.FORMULA, cell.getCellType());
         cell.setCellFormula(null);
 
         //the count of items is less by one
@@ -50,9 +53,9 @@ public final class TestCalculationChain
         assertEquals(10, c.getI());
         assertEquals("C1", c.getR());
 
-        assertEquals(XSSFCell.CELL_TYPE_STRING, cell.getCellType());
+        assertEquals(CellType.STRING, cell.getCellType());
         cell.setCellValue("ABC");
-        assertEquals(XSSFCell.CELL_TYPE_STRING, cell.getCellType());
+        assertEquals(CellType.STRING, cell.getCellType());
     }
 
 

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFWorkbook.java Mon Jul  4 10:15:18 2016
@@ -37,6 +37,7 @@ import org.apache.poi.POITestCase;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.ss.usermodel.BaseTestXWorkbook;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
@@ -524,7 +525,7 @@ public final class TestSXSSFWorkbook ext
                 Arrays.fill(useless, 0, 10, ' ');
                 System.arraycopy(prefix, 0, useless, 0, prefix.length);
                 String ul = new String(useless);
-                r.createCell(col, Cell.CELL_TYPE_STRING).setCellValue(ul);
+                r.createCell(col, CellType.STRING).setCellValue(ul);
                 ul = null;
             }
         }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java Mon Jul  4 10:15:18 2016
@@ -34,6 +34,7 @@ import org.apache.poi.ss.usermodel.Borde
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellCopyPolicy;
 import org.apache.poi.ss.usermodel.CellStyle;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CreationHelper;
 import org.apache.poi.ss.usermodel.DataFormatter;
 import org.apache.poi.ss.usermodel.Font;
@@ -70,7 +71,7 @@ public final class TestXSSFCell extends
         Sheet sheet = wb.getSheetAt(0);
         Row row = sheet.getRow(0);
         Cell cell = row.getCell(0);
-        cell.setCellType(Cell.CELL_TYPE_STRING);
+        cell.setCellType(CellType.STRING);
         cell.setCellValue("456");
         wb.close();
     }
@@ -133,13 +134,13 @@ public final class TestXSSFCell extends
         assertNull(str.getString());
         cell_0.setCellValue(str);
         assertEquals(0, sst.getCount());
-        assertEquals(Cell.CELL_TYPE_BLANK, cell_0.getCellType());
+        assertEquals(CellType.BLANK, cell_0.getCellType());
 
         //case 2. cell.setCellValue((String)null);
         Cell cell_1 = row.createCell(1);
         cell_1.setCellValue((String)null);
         assertEquals(0, sst.getCount());
-        assertEquals(Cell.CELL_TYPE_BLANK, cell_1.getCellType());
+        assertEquals(CellType.BLANK, cell_1.getCellType());
         wb.close();
     }
 
@@ -151,7 +152,7 @@ public final class TestXSSFCell extends
             CTCell ctCell = cell.getCTCell(); //low-level bean holding cell's xml
     
             cell.setCellFormula("A2");
-            assertEquals(Cell.CELL_TYPE_FORMULA, cell.getCellType());
+            assertEquals(CellType.FORMULA, cell.getCellType());
             assertEquals("A2", cell.getCellFormula());
             //the value is not set and cell's type='N' which means blank
             assertEquals(STCellType.N, ctCell.getT());
@@ -159,7 +160,7 @@ public final class TestXSSFCell extends
             //set cached formula value
             cell.setCellValue("t='str'");
             //we are still of 'formula' type
-            assertEquals(Cell.CELL_TYPE_FORMULA, cell.getCellType());
+            assertEquals(CellType.FORMULA, cell.getCellType());
             assertEquals("A2", cell.getCellFormula());
             //cached formula value is set and cell's type='STR'
             assertEquals(STCellType.STR, ctCell.getT());
@@ -167,14 +168,14 @@ public final class TestXSSFCell extends
     
             //now remove the formula, the cached formula result remains
             cell.setCellFormula(null);
-            assertEquals(Cell.CELL_TYPE_STRING, cell.getCellType());
+            assertEquals(CellType.STRING, cell.getCellType());
             assertEquals(STCellType.STR, ctCell.getT());
             //the line below failed prior to fix of Bug #47889
             assertEquals("t='str'", cell.getStringCellValue());
     
             //revert to a blank cell
             cell.setCellValue((String)null);
-            assertEquals(Cell.CELL_TYPE_BLANK, cell.getCellType());
+            assertEquals(CellType.BLANK, cell.getCellType());
             assertEquals(STCellType.N, ctCell.getT());
             assertEquals("", cell.getStringCellValue());
         } finally {
@@ -194,7 +195,7 @@ public final class TestXSSFCell extends
 
         //try a string cell
         cell = sh.getRow(0).getCell(0);
-        assertEquals(Cell.CELL_TYPE_STRING, cell.getCellType());
+        assertEquals(CellType.STRING, cell.getCellType());
         assertEquals("a", cell.getStringCellValue());
         assertEquals("a", cell.toString());
         //Gnumeric produces spreadsheets without styles
@@ -203,7 +204,7 @@ public final class TestXSSFCell extends
 
         //try a numeric cell
         cell = sh.getRow(1).getCell(0);
-        assertEquals(Cell.CELL_TYPE_NUMERIC, cell.getCellType());
+        assertEquals(CellType.NUMERIC, cell.getCellType());
         assertEquals(1.0, cell.getNumericCellValue(), 0);
         assertEquals("1.0", cell.toString());
         //Gnumeric produces spreadsheets without styles
@@ -513,7 +514,7 @@ public final class TestXSSFCell extends
         final CellCopyPolicy policy = new CellCopyPolicy();
         destCell.copyCellFrom(srcCell, policy);
         
-        assertEquals(Cell.CELL_TYPE_FORMULA, destCell.getCellType());
+        assertEquals(CellType.FORMULA, destCell.getCellType());
         assertEquals("2+3", destCell.getCellFormula());
         assertEquals(srcCell.getCellStyle(), destCell.getCellStyle());
     }
@@ -525,7 +526,7 @@ public final class TestXSSFCell extends
         // Paste values only
         final CellCopyPolicy policy = new CellCopyPolicy.Builder().cellFormula(false).build();
         destCell.copyCellFrom(srcCell, policy);
-        assertEquals(Cell.CELL_TYPE_NUMERIC, destCell.getCellType());
+        assertEquals(CellType.NUMERIC, destCell.getCellType());
     }
     
     @Test
@@ -552,8 +553,8 @@ public final class TestXSSFCell extends
         assertEquals(srcCell.getCellStyle(), destCell.getCellStyle());
         
         // Old cell value should not have been overwritten
-        assertNotEquals(Cell.CELL_TYPE_BLANK, destCell.getCellType());
-        assertEquals(Cell.CELL_TYPE_BOOLEAN, destCell.getCellType());
+        assertNotEquals(CellType.BLANK, destCell.getCellType());
+        assertEquals(CellType.BOOLEAN, destCell.getCellType());
         assertEquals(true, destCell.getBooleanCellValue());
     }
     

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidation.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidation.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFDataValidation.java Mon Jul  4 10:15:18 2016
@@ -24,6 +24,7 @@ import java.util.List;
 
 import org.apache.poi.ss.usermodel.BaseTestDataValidation;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.DataValidation;
 import org.apache.poi.ss.usermodel.DataValidationConstraint;
 import org.apache.poi.ss.usermodel.DataValidationConstraint.OperatorType;
@@ -141,7 +142,7 @@ public class TestXSSFDataValidation exte
 				Cell cell_13 = row1.createCell(3);
 				
 				
-				cell_13.setCellType(Cell.CELL_TYPE_NUMERIC);				
+				cell_13.setCellType(CellType.NUMERIC);				
 				cell_13.setCellValue(validationType==ValidationType.DECIMAL ? dvalue.doubleValue() : value.intValue());
 
 				
@@ -204,11 +205,11 @@ public class TestXSSFDataValidation exte
 				
 				
 				String value1String = validationType==ValidationType.DECIMAL ? dvalue.toString() : value.toString();
-				cell_13.setCellType(Cell.CELL_TYPE_NUMERIC);				
+				cell_13.setCellType(CellType.NUMERIC);				
 				cell_13.setCellValue(validationType==ValidationType.DECIMAL ? dvalue.doubleValue() : value.intValue());
 
 				String value2String = validationType==ValidationType.DECIMAL ? dvalue2.toString() : value2.toString();
-				cell_14.setCellType(Cell.CELL_TYPE_NUMERIC);
+				cell_14.setCellType(CellType.NUMERIC);
 				cell_14.setCellValue(validationType==ValidationType.DECIMAL ? dvalue2.doubleValue() : value2.intValue());
 				
 				

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaEvaluation.java Mon Jul  4 10:15:18 2016
@@ -26,6 +26,7 @@ import java.util.Map;
 import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.ss.usermodel.BaseTestFormulaEvaluator;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.apache.poi.ss.usermodel.FormulaError;
 import org.apache.poi.ss.usermodel.FormulaEvaluator;
@@ -369,32 +370,32 @@ public final class TestXSSFFormulaEvalua
             
             // sheet1 A1
             XSSFCell cell = sheet1.createRow(0).createCell(0);
-            cell.setCellType(Cell.CELL_TYPE_NUMERIC);
+            cell.setCellType(CellType.NUMERIC);
             cell.setCellValue(1.0);
             
             // sheet2 A1
             cell = sheet2.createRow(0).createCell(0);
-            cell.setCellType(Cell.CELL_TYPE_NUMERIC);
+            cell.setCellType(CellType.NUMERIC);
             cell.setCellValue(1.0);
             
             // sheet2 B1
             cell = sheet2.getRow(0).createCell(1);
-            cell.setCellType(Cell.CELL_TYPE_NUMERIC);
+            cell.setCellType(CellType.NUMERIC);
             cell.setCellValue(1.0);
             
             // sheet3 A1
             cell = sheet3.createRow(0).createCell(0);
-            cell.setCellType(Cell.CELL_TYPE_NUMERIC);
+            cell.setCellType(CellType.NUMERIC);
             cell.setCellValue(1.0);
             
             // sheet1 A2 formulae
             cell = sheet1.createRow(1).createCell(0);
-            cell.setCellType(Cell.CELL_TYPE_FORMULA);
+            cell.setCellType(CellType.FORMULA);
             cell.setCellFormula("SUM(Sheet1:Sheet3!A1)");
             
             // sheet1 A3 formulae
             cell = sheet1.createRow(2).createCell(0);
-            cell.setCellType(Cell.CELL_TYPE_FORMULA);
+            cell.setCellType(CellType.FORMULA);
             cell.setCellFormula("SUM(Sheet1:Sheet3!A1:B1)");
             
             wb.getCreationHelper().createFormulaEvaluator().evaluateAll();
@@ -416,8 +417,8 @@ public final class TestXSSFFormulaEvalua
             XSSFSheet sheet = wb.createSheet("test");
             XSSFRow row = sheet.createRow(0);
             XSSFRow row2 = sheet.createRow(1);
-            XSSFCell cellA2 = row2.createCell(0, Cell.CELL_TYPE_FORMULA);
-            XSSFCell cellB1 = row.createCell(1, Cell.CELL_TYPE_NUMERIC);
+            XSSFCell cellA2 = row2.createCell(0, CellType.FORMULA);
+            XSSFCell cellB1 = row.createCell(1, CellType.NUMERIC);
             cellB1.setCellValue(10);
             XSSFFormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
             cellA2.setCellFormula("IF(B1=0,\"\",((ROW()-ROW(A$1))*12))");
@@ -441,8 +442,8 @@ public final class TestXSSFFormulaEvalua
             XSSFSheet sheet = wb.createSheet("test");
             XSSFRow row = sheet.createRow(0);
             XSSFRow row2 = sheet.createRow(1);
-            XSSFCell cellA2 = row2.createCell(0, Cell.CELL_TYPE_FORMULA);
-            XSSFCell cellB1 = row.createCell(1, Cell.CELL_TYPE_NUMERIC);
+            XSSFCell cellA2 = row2.createCell(0, CellType.FORMULA);
+            XSSFCell cellB1 = row.createCell(1, CellType.NUMERIC);
             cellB1.setCellValue(10);
             XSSFFormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
             cellA2.setCellFormula("IF(B1=0,\"\",((ROW(A$1))))");
@@ -466,8 +467,8 @@ public final class TestXSSFFormulaEvalua
             XSSFSheet sheet = wb.createSheet("test");
             XSSFRow row = sheet.createRow(0);
             XSSFRow row2 = sheet.createRow(1);
-            XSSFCell cellA2 = row2.createCell(0, Cell.CELL_TYPE_FORMULA);
-            XSSFCell cellB1 = row.createCell(1, Cell.CELL_TYPE_NUMERIC);
+            XSSFCell cellA2 = row2.createCell(0, CellType.FORMULA);
+            XSSFCell cellB1 = row.createCell(1, CellType.NUMERIC);
             cellB1.setCellValue(10);
             XSSFFormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
 
@@ -492,8 +493,8 @@ public final class TestXSSFFormulaEvalua
             XSSFSheet sheet = wb.createSheet("test");
             XSSFRow row = sheet.createRow(0);
             XSSFRow row2 = sheet.createRow(1);
-            XSSFCell cellA2 = row2.createCell(0, Cell.CELL_TYPE_FORMULA);
-            XSSFCell cellB1 = row.createCell(1, Cell.CELL_TYPE_NUMERIC);
+            XSSFCell cellA2 = row2.createCell(0, CellType.FORMULA);
+            XSSFCell cellB1 = row.createCell(1, CellType.NUMERIC);
             cellB1.setCellValue(10);
             XSSFFormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
             
@@ -512,8 +513,8 @@ public final class TestXSSFFormulaEvalua
             XSSFSheet sheet = wb.createSheet("test");
             XSSFRow row = sheet.createRow(0);
             XSSFRow row2 = sheet.createRow(1);
-            XSSFCell cellA2 = row2.createCell(0, Cell.CELL_TYPE_FORMULA);
-            XSSFCell cellB1 = row.createCell(1, Cell.CELL_TYPE_NUMERIC);
+            XSSFCell cellA2 = row2.createCell(0, CellType.FORMULA);
+            XSSFCell cellB1 = row.createCell(1, CellType.NUMERIC);
             cellB1.setCellValue(10);
             XSSFFormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
             
@@ -532,8 +533,8 @@ public final class TestXSSFFormulaEvalua
             XSSFSheet sheet = wb.createSheet("test");
             XSSFRow row = sheet.createRow(0);
             XSSFRow row2 = sheet.createRow(1);
-            XSSFCell cellA2 = row2.createCell(0, Cell.CELL_TYPE_FORMULA);
-            XSSFCell cellB1 = row.createCell(1, Cell.CELL_TYPE_NUMERIC);
+            XSSFCell cellA2 = row2.createCell(0, CellType.FORMULA);
+            XSSFCell cellB1 = row.createCell(1, CellType.NUMERIC);
             cellB1.setCellValue(10);
             XSSFFormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
 
@@ -552,8 +553,8 @@ public final class TestXSSFFormulaEvalua
             XSSFSheet sheet = wb.createSheet("test");
             XSSFRow row = sheet.createRow(0);
             XSSFRow row2 = sheet.createRow(1);
-            XSSFCell cellA2 = row2.createCell(0, Cell.CELL_TYPE_FORMULA);
-            XSSFCell cellB1 = row.createCell(1, Cell.CELL_TYPE_NUMERIC);
+            XSSFCell cellA2 = row2.createCell(0, CellType.FORMULA);
+            XSSFCell cellB1 = row.createCell(1, CellType.NUMERIC);
             cellB1.setCellValue(10);
             XSSFFormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();
 
@@ -575,9 +576,9 @@ public final class TestXSSFFormulaEvalua
 
         wb.getCreationHelper().createFormulaEvaluator().evaluateAll();
 
-        assertEquals(XSSFCell.CELL_TYPE_ERROR, getCell(sheet, 0,0).getCachedFormulaResultType());
+        assertEquals(CellType.ERROR, getCell(sheet, 0,0).getCachedFormulaResultType());
         assertEquals(FormulaError.VALUE.getCode(), getCell(sheet, 0,0).getErrorCellValue());
-        assertEquals(XSSFCell.CELL_TYPE_ERROR, getCell(sheet, 0,1).getCachedFormulaResultType());
+        assertEquals(CellType.ERROR, getCell(sheet, 0,1).getCachedFormulaResultType());
         assertEquals(FormulaError.VALUE.getCode(), getCell(sheet, 0,1).getErrorCellValue());
         
         wb.close();
@@ -596,11 +597,11 @@ public final class TestXSSFFormulaEvalua
 
         wb.getCreationHelper().createFormulaEvaluator().evaluateAll();
 
-        assertEquals(XSSFCell.CELL_TYPE_ERROR, getCell(sheet, 0, 0).getCachedFormulaResultType());
+        assertEquals(CellType.ERROR, getCell(sheet, 0, 0).getCachedFormulaResultType());
         assertEquals(FormulaError.VALUE.getCode(), getCell(sheet, 0, 0).getErrorCellValue());
-        assertEquals(XSSFCell.CELL_TYPE_ERROR, getCell(sheet, 1, 0).getCachedFormulaResultType());
+        assertEquals(CellType.ERROR, getCell(sheet, 1, 0).getCachedFormulaResultType());
         assertEquals(FormulaError.VALUE.getCode(), getCell(sheet, 1, 0).getErrorCellValue());
-        assertEquals(XSSFCell.CELL_TYPE_ERROR, getCell(sheet, 0, 3).getCachedFormulaResultType());
+        assertEquals(CellType.ERROR, getCell(sheet, 0, 3).getCachedFormulaResultType());
         assertEquals(FormulaError.VALUE.getCode(), getCell(sheet, 0, 3).getErrorCellValue());
         
         wb.close();
@@ -639,7 +640,7 @@ public final class TestXSSFFormulaEvalua
         if (cell == null) {
             cell = r.createCell(column);
         }
-        cell.setCellType(XSSFCell.CELL_TYPE_FORMULA);
+        cell.setCellType(CellType.FORMULA);
         cell.setCellFormula(formula);
     }
 

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFFormulaParser.java Mon Jul  4 10:15:18 2016
@@ -370,12 +370,12 @@ public final class TestXSSFFormulaParser
             assertEquals("MIN",            toFormulaString(ptgs[1], fpb));
 
             // Check we can round-trip - try to set a new one to a new single cell
-            Cell newF = s1.getRow(0).createCell(10, Cell.CELL_TYPE_FORMULA);
+            Cell newF = s1.getRow(0).createCell(10, CellType.FORMULA);
             newF.setCellFormula("SUM(Sheet2:Sheet3!A1)");
             assertEquals("SUM(Sheet2:Sheet3!A1)", newF.getCellFormula());
             
             // Check we can round-trip - try to set a new one to a cell range
-            newF = s1.getRow(0).createCell(11, Cell.CELL_TYPE_FORMULA);
+            newF = s1.getRow(0).createCell(11, CellType.FORMULA);
             newF.setCellFormula("MIN(Sheet1:Sheet2!A1:B2)");
             assertEquals("MIN(Sheet1:Sheet2!A1:B2)", newF.getCellFormula());
 
@@ -465,7 +465,7 @@ public final class TestXSSFFormulaParser
 
             for (Row row : xsheet) {
                 for (Cell cell : row) {
-                    if (cell.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
+                    if (cell.getCellType() == CellType.FORMULA) {
                         try {
                             evaluator.evaluateFormulaCell(cell);
                         } catch (Exception e) {

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPivotTable.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPivotTable.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPivotTable.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFPivotTable.java Mon Jul  4 10:15:18 2016
@@ -16,9 +16,8 @@
 ==================================================================== */
 package org.apache.poi.xssf.usermodel;
 
-import junit.framework.TestCase;
-
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.DataConsolidateFunction;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Workbook;
@@ -30,6 +29,8 @@ import org.openxmlformats.schemas.spread
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPivotTableDefinition;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.STDataConsolidateFunction;
 
+import junit.framework.TestCase;
+
 public class TestXSSFPivotTable extends TestCase {
     private XSSFPivotTable pivotTable;
     private XSSFPivotTable offsetPivotTable;
@@ -316,7 +317,7 @@ public class TestXSSFPivotTable extends
      */
     public void testAddDataColumnWithOffsetData() {
         offsetPivotTable.addColumnLabel(DataConsolidateFunction.SUM, 1);
-        assertEquals(Cell.CELL_TYPE_NUMERIC, offsetOuterCell.getCellType());
+        assertEquals(CellType.NUMERIC, offsetOuterCell.getCellType());
         
         offsetPivotTable.addColumnLabel(DataConsolidateFunction.SUM, 0);
     }

Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRow.java?rev=1751240&r1=1751239&r2=1751240&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRow.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFRow.java Mon Jul  4 10:15:18 2016
@@ -26,6 +26,7 @@ import java.io.IOException;
 import org.apache.poi.ss.usermodel.BaseTestXRow;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellCopyPolicy;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.xssf.XSSFITestDataProvider;
@@ -182,7 +183,7 @@ public final class TestXSSFRow extends B
         assertSame("existing references to externObserverRow are still valid", externObserverRow, sheet2.getRow(0));
         
         // Make sure copyRowFrom actually copied row (this is tested elsewhere)
-        assertEquals(Cell.CELL_TYPE_STRING, destRow.getCell(0).getCellType());
+        assertEquals(CellType.STRING, destRow.getCell(0).getCellType());
         assertEquals("hello", destRow.getCell(0).getStringCellValue());
         
         // We don't want #REF! errors if we copy a row that contains cells that are referred to by other cells outside of copied region



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


Mime
View raw message