poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From one...@apache.org
Subject svn commit: r1751264 - in /poi/trunk/src: java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/ss/formula/ java/org/apache/poi/ss/formula/eval/forked/ java/org/apache/poi/ss/usermodel/ ooxml/java/org/apache/poi/xssf/streaming/ ooxml/java/org/apache/...
Date Mon, 04 Jul 2016 12:35:49 GMT
Author: onealj
Date: Mon Jul  4 12:35:49 2016
New Revision: 1751264

URL: http://svn.apache.org/viewvc?rev=1751264&view=rev
Log:
bug 59791: add @since to Cell, EvaluationCell, and FormulaEvaluator CellType getter javadocs

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
    poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCell.java
    poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
    poi/trunk/src/java/org/apache/poi/ss/usermodel/Cell.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFFormulaEvaluator.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java Mon Jul  4 12:35:49 2016
@@ -455,7 +455,9 @@ public class HSSFCell implements Cell {
     
     /**
      * get the cells type (numeric, formula or string)
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     @Override
@@ -1163,7 +1165,9 @@ public class HSSFCell implements Cell {
      * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
      *     {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
      * on the cached value of the formula
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     @Override

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java Mon Jul  4 12:35:49
2016
@@ -60,7 +60,11 @@ final class HSSFEvaluationCell implement
 	public int getCellType() {
 		return _cell.getCellType();
 	}
-	/** @deprecated POI 3.15 beta 3 */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	@Internal
 	@Override
 	public CellType getCellTypeEnum() {
@@ -100,7 +104,11 @@ final class HSSFEvaluationCell implement
 	public int getCachedFormulaResultType() {
 		return _cell.getCachedFormulaResultType();
 	}
-	/** @deprecated POI 3.15 beta 3 */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	@Internal
 	@Override
 	public CellType getCachedFormulaResultTypeEnum() {

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java Mon Jul  4
12:35:49 2016
@@ -219,32 +219,32 @@ public class HSSFFormulaEvaluator implem
 	}
 	
 	/**
-     * If cell contains formula, it evaluates the formula, and saves the result of the formula.
The
-     * cell remains as a formula cell. If the cell does not contain formula, this method
returns -1
-     * and leaves the cell unchanged.
-     *
-     * Note that the type of the <em>formula result</em> is returned, so you
know what kind of
-     * cached formula result is also stored with  the formula.
-     * <pre>
-     * int evaluatedCellType = evaluator.evaluateFormulaCell(cell);
-     * </pre>
-     * Be aware that your cell will hold both the formula, and the result. If you want the
cell
-     * replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
-     * @param cell The cell to evaluate
-     * @return -1 for non-formula cells, or the type of the <em>formula result</em>
-     * @deprecated POI 3.15 beta 3
-     */
-    @Internal
-    @Override
-    public CellType evaluateFormulaCellEnum(Cell cell) {
-        if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
-            return CellType._UNINITIALIZED;
-        }
-        CellValue cv = evaluateFormulaCellValue(cell);
-        // cell remains a formula cell, but the cached value is changed
-        setCellValue(cell, cv);
-        return cv.getCellType();
-    }
+	 * If cell contains formula, it evaluates the formula, and saves the result of the formula.
The
+	 * cell remains as a formula cell. If the cell does not contain formula, this method returns
-1
+	 * and leaves the cell unchanged.
+	 *
+	 * Note that the type of the <em>formula result</em> is returned, so you know
what kind of
+	 * cached formula result is also stored with  the formula.
+	 * <pre>
+	 * int evaluatedCellType = evaluator.evaluateFormulaCell(cell);
+	 * </pre>
+	 * Be aware that your cell will hold both the formula, and the result. If you want the cell
+	 * replaced with the result of the formula, use {@link #evaluateInCell(org.apache.poi.ss.usermodel.Cell)}
+	 * @param cell The cell to evaluate
+	 * @return -1 for non-formula cells, or the type of the <em>formula result</em>
+	 * @deprecated POI 3.15 beta 3. Will be deleted when we make the CellType enum transition.
See bug 59791.
+	 */
+	@Internal
+	@Override
+	public CellType evaluateFormulaCellEnum(Cell cell) {
+		if (cell == null || cell.getCellTypeEnum() != CellType.FORMULA) {
+			return CellType._UNINITIALIZED;
+		}
+		CellValue cv = evaluateFormulaCellValue(cell);
+		// cell remains a formula cell, but the cached value is changed
+		setCellValue(cell, cv);
+		return cv.getCellType();
+	}
 
 	/**
 	 * If cell contains formula, it evaluates the formula, and
@@ -262,7 +262,7 @@ public class HSSFFormulaEvaluator implem
 	 *  value computed for you, use {@link #evaluateFormulaCellEnum(Cell)}}
 	 */
 	@Override
-    public HSSFCell evaluateInCell(Cell cell) {
+	public HSSFCell evaluateInCell(Cell cell) {
 		if (cell == null) {
 			return null;
 		}

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCell.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/EvaluationCell.java Mon Jul  4 12:35:49 2016
@@ -44,7 +44,11 @@ public interface EvaluationCell {
 	 * @return cell type
 	 */
 	int getCellType();
-	/** @deprecated POI 3.15 beta 3 */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	CellType getCellTypeEnum();
 
 	double getNumericCellValue();
@@ -59,6 +63,10 @@ public interface EvaluationCell {
 	 * @return cell type of cached formula result
 	 */
 	int getCachedFormulaResultType();
-	/** @deprecated POI 3.15 beta 3 */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	CellType getCachedFormulaResultTypeEnum();
 }

Modified: poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java Mon
Jul  4 12:35:49 2016
@@ -113,7 +113,11 @@ final class ForkedEvaluationCell impleme
 	public int getCellType() {
 		return _cellType.getCode();
 	}
-	/** @deprecated POI 3.15 beta 3 */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	@Internal
 	@Override
 	public CellType getCellTypeEnum() {
@@ -161,7 +165,11 @@ final class ForkedEvaluationCell impleme
 	public int getCachedFormulaResultType() {
 		return _masterCell.getCachedFormulaResultType();
 	}
-	/** @deprecated POI 3.15 beta 3. */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	@Internal
 	@Override
 	public CellType getCachedFormulaResultTypeEnum() {

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=1751264&r1=1751263&r2=1751264&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 12:35:49 2016
@@ -166,7 +166,9 @@ public interface Cell {
      * Return the cell type.
      *
      * @return the cell type
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     CellType getCellTypeEnum();
@@ -188,7 +190,9 @@ public interface Cell {
      * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
      *     {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
      * on the cached value of the formula
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     CellType getCachedFormulaResultTypeEnum();

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java Mon Jul  4 12:35:49
2016
@@ -128,6 +128,7 @@ public class SXSSFCell implements Cell {
      * @see CellType#BOOLEAN
      * @see CellType#ERROR
      * @deprecated POI 3.15 beta 3. Use {@link #setCellType(CellType)} instead.
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Override
     public void setCellType(int cellType)
@@ -160,7 +161,9 @@ public class SXSSFCell implements Cell {
      * Return the cell type.
      *
      * @return the cell type
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     @Override
@@ -186,7 +189,9 @@ public class SXSSFCell implements Cell {
      * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
      *     {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
      * on the cached value of the formula
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3.
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     @Override

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java Mon Jul
 4 12:35:49 2016
@@ -62,7 +62,11 @@ final class SXSSFEvaluationCell implemen
     public int getCellType() {
         return _cell.getCellType();
     }
-    /** @deprecated POI 3.15 beta 3 */
+    /**
+     * @since POI 3.15 beta 3
+     * @deprecated POI 3.15 beta 3.
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
+     */
     @Internal
     @Override
     public CellType getCellTypeEnum() {
@@ -102,7 +106,11 @@ final class SXSSFEvaluationCell implemen
     public int getCachedFormulaResultType() {
         return _cell.getCachedFormulaResultType();
     }
-    /** @deprecated POI 3.15 beta 3 */
+    /**
+     * @since POI 3.15 beta 3
+     * @deprecated POI 3.15 beta 3.
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
+     */
     @Internal
     @Override
     public CellType getCachedFormulaResultTypeEnum() {

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=1751264&r1=1751263&r2=1751264&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 12:35:49 2016
@@ -127,7 +127,7 @@ public abstract class BaseXSSFFormulaEva
      *  so you know what kind of value is also stored with
      *  the formula.
      * <pre>
-     * int evaluatedCellType = evaluator.evaluateFormulaCell(cell);
+     * CellType evaluatedCellType = evaluator.evaluateFormulaCellEnum(cell);
      * </pre>
      * Be aware that your cell will hold both the formula,
      *  and the result. If you want the cell replaced with

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java Mon Jul  4 12:35:49
2016
@@ -678,7 +678,9 @@ public final class XSSFCell implements C
      * Return the cell type.
      *
      * @return the cell type
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     @Override
@@ -708,7 +710,9 @@ public final class XSSFCell implements C
      * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING},
      *     {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending
      * on the cached value of the formula
+     * @since POI 3.15 beta 3
      * @deprecated POI 3.15 beta 3
+     * Will be deleted when we make the CellType enum transition. See bug 59791.
      */
     @Internal
     @Override

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java?rev=1751264&r1=1751263&r2=1751264&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java Mon Jul
 4 12:35:49 2016
@@ -63,7 +63,11 @@ final class XSSFEvaluationCell implement
 	public int getCellType() {
 		return _cell.getCellType();
 	}
-	/** @deprecated POI 3.15 beta 3 */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	@Internal
 	@Override
 	public CellType getCellTypeEnum() {
@@ -103,7 +107,11 @@ final class XSSFEvaluationCell implement
 	public int getCachedFormulaResultType() {
 		return _cell.getCachedFormulaResultType();
 	}
-	/** @deprecated POI 3.15 beta 3 */
+	/**
+	 * @since POI 3.15 beta 3
+	 * @deprecated POI 3.15 beta 3.
+	 * Will be deleted when we make the CellType enum transition. See bug 59791.
+	 */
 	@Internal
 	@Override
 	public CellType getCachedFormulaResultTypeEnum() {



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


Mime
View raw message