]> source.dussan.org Git - poi.git/commitdiff
pulled *Cell.getCellTypeEnum() to common base
authorVladislav Galas <gallon@apache.org>
Sat, 26 Jan 2019 23:19:47 +0000 (23:19 +0000)
committerVladislav Galas <gallon@apache.org>
Sat, 26 Jan 2019 23:19:47 +0000 (23:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1852252 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
src/java/org/apache/poi/ss/usermodel/Cell.java
src/java/org/apache/poi/ss/usermodel/CellBase.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java

index 10734219a65e191f725d4bcefe9989fa51feda5e..b1cf8a4845446174e5166ee160795db91418de98 100644 (file)
@@ -418,18 +418,6 @@ public class HSSFCell extends CellBase {
     {
         return _cellType;
     }
-    
-    /**
-     * get the cells type (numeric, formula or string)
-     * @since POI 3.15 beta 3
-     */
-    @Deprecated
-    @Removal(version = "4.2")
-    @Override
-    public CellType getCellTypeEnum()
-    {
-        return getCellType();
-    }
 
     /**
      * set a numeric value for the cell
index 4f344ba8e933c7096479d84f4f810b07c1ed7937..533f21a92f249d1478251a73fa1a83267475a7f5 100644 (file)
@@ -111,10 +111,16 @@ public interface Cell {
     CellType getCellType();
 
     /**
-     * Return the cell type.
+     * Return the cell type.  Tables in an array formula return
+     * {@link CellType#FORMULA} for all cells, even though the formula is only defined
+     * in the OOXML file for the top left cell of the array.
+     * <p>
+     * NOTE: POI does not support data table formulas.
+     * Cells in a data table appear to POI as plain cells typed from their cached value.
      *
      * @return the cell type
      * @since POI 3.15 beta 3
+     * @deprecated will be removed in 4.2
      * Will be renamed to <code>getCellType()</code> when we make the CellType enum transition in POI 4.0. See bug 59791.
      */
     @Deprecated
index 14d0555f801e476a26bdccd06d4dd0b89d1df522..46fa21f3f4bb91836990d61fbf3bff73b0bda85e 100644 (file)
@@ -21,6 +21,7 @@ import org.apache.poi.ss.formula.FormulaParseException;
 import org.apache.poi.ss.util.CellAddress;
 import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.CellReference;
+import org.apache.poi.util.Removal;
 
 /**
  * Common implementation-independent logic shared by all implementations of {@link Cell}.
@@ -125,6 +126,16 @@ public abstract class CellBase implements Cell {
         setCellFormulaImpl(formula);
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    @Deprecated
+    @Removal(version = "4.2")
+    @Override
+    public final CellType getCellTypeEnum() {
+        return getCellType();
+    }
+
     /**
      * Implementation-specific setting the formula. Formula is not null.
      * Shall not change the value.
index 54b8236f728bd46028b6f156725b9c67f9ecf057..be01f3ef549101f6da874075dca3189712fb89e8 100644 (file)
@@ -128,21 +128,6 @@ public class SXSSFCell extends CellBase {
         return _value.getType();
     }
     
-    /**
-     * Return the cell type.
-     *
-     * @return the cell type
-     * @since POI 3.15 beta 3
-     * @deprecated use <code>getCellType</code> instead
-     */
-    @Deprecated
-    @Removal(version = "4.2")
-    @Override
-    public CellType getCellTypeEnum()
-    {
-        return getCellType();
-    }
-
     /**
      * Only valid for formula cells
      * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
index f49121982df4c330d4e988141639c6f2cdc793ee..42c34da85afa0e3a9fc2e572452347369243d8ba 100644 (file)
@@ -712,25 +712,6 @@ public final class XSSFCell extends CellBase {
         return getBaseCellType(true);
     }
 
-    /**
-     * Return the cell type.  Tables in an array formula return 
-     * {@link CellType#FORMULA} for all cells, even though the formula is only defined
-     * in the OOXML file for the top left cell of the array. 
-     * <p>
-     * NOTE: POI does not support data table formulas.
-     * Cells in a data table appear to POI as plain cells typed from their cached value.
-     *
-     * @return the cell type
-     * @since POI 3.15 beta 3
-     * @deprecated use <code>getCellType</code> instead
-     */
-    @Deprecated
-    @Removal(version = "4.2")
-    @Override
-    public CellType getCellTypeEnum() {
-        return getCellType();
-    }
-
     /**
      * Only valid for formula cells
      * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},