pulled *Cell.getCellTypeEnum() to common base

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1852252 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vladislav Galas 2019-01-26 23:19:47 +00:00
parent bc30eceb02
commit 70b4b88a3a
5 changed files with 18 additions and 47 deletions

View 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

View 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

View 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.

View 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},

View 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},