You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/04/17 02:20:38 UTC

svn commit: r1739531 - /poi/trunk/src/java/org/apache/poi/hssf/util/HSSFCellUtil.java

Author: onealj
Date: Sun Apr 17 00:20:37 2016
New Revision: 1739531

URL: http://svn.apache.org/viewvc?rev=1739531&view=rev
Log:
bug 59338: patch from Mark Murphy to deprecate HSSFCellUtil class in favor of CellUtil.

Modified:
    poi/trunk/src/java/org/apache/poi/hssf/util/HSSFCellUtil.java

Modified: poi/trunk/src/java/org/apache/poi/hssf/util/HSSFCellUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/util/HSSFCellUtil.java?rev=1739531&r1=1739530&r2=1739531&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/util/HSSFCellUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/util/HSSFCellUtil.java Sun Apr 17 00:20:37 2016
@@ -17,7 +17,6 @@
 
 package org.apache.poi.hssf.util;
 
-
 import org.apache.poi.hssf.usermodel.HSSFCell;
 import org.apache.poi.hssf.usermodel.HSSFCellStyle;
 import org.apache.poi.hssf.usermodel.HSSFFont;
@@ -27,12 +26,14 @@ import org.apache.poi.hssf.usermodel.HSS
 import org.apache.poi.ss.util.CellUtil;
 
 /**
- *  Various utility functions that make working with a cells and rows easier.  The various
+ * Various utility functions that make working with a cells and rows easier.  The various
  * methods that deal with style's allow you to create your HSSFCellStyles as you need them.
  * When you apply a style change to a cell, the code will attempt to see if a style already
  * exists that meets your needs.  If not, then it will create a new style.  This is to prevent
  * creating too many styles.  there is an upper limit in Excel on the number of styles that
  * can be supported.
+ * 
+ * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil} instead.
  */
 public final class HSSFCellUtil {
 
@@ -43,9 +44,10 @@ public final class HSSFCellUtil {
     /**
      *  Get a row from the spreadsheet, and create it if it doesn't exist.
      *
-     *@param  rowIndex  The 0 based row number
-     *@param  sheet       The sheet that the row is part of.
-     *@return             The row indicated by the rowCounter
+     * @param  rowIndex  The 0 based row number
+     * @param  sheet       The sheet that the row is part of.
+     * @return             The row indicated by the rowCounter
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#getRow} instead.
      */
     public static HSSFRow getRow(int rowIndex, HSSFSheet sheet) {
     	return (HSSFRow) CellUtil.getRow(rowIndex, sheet);
@@ -55,9 +57,10 @@ public final class HSSFCellUtil {
      * Get a specific cell from a row. If the cell doesn't exist,
      *  then create it.
      *
-     *@param  row     The row that the cell is part of
-     *@param  columnIndex  The column index that the cell is in.
-     *@return         The cell indicated by the column.
+     * @param  row     The row that the cell is part of
+     * @param  columnIndex  The column index that the cell is in.
+     * @return         The cell indicated by the column.
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#getCell} instead.
      */
     public static HSSFCell getCell(HSSFRow row, int columnIndex) {
         return (HSSFCell) CellUtil.getCell(row, columnIndex);
@@ -71,6 +74,7 @@ public final class HSSFCellUtil {
      * @param  value   The value of the cell
      * @param  style   If the style is not null, then set
      * @return         A new HSSFCell
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#createCell} instead.
      */
     public static HSSFCell createCell(HSSFRow row, int column, String value, HSSFCellStyle style) {
     	return (HSSFCell) CellUtil.createCell(row, column, value, style);
@@ -79,10 +83,11 @@ public final class HSSFCellUtil {
     /**
      *  Create a cell, and give it a value.
      *
-     *@param  row     the row to create the cell in
-     *@param  column  the column index to create the cell in
-     *@param  value   The value of the cell
-     *@return         A new HSSFCell.
+     * @param  row     the row to create the cell in
+     * @param  column  the column index to create the cell in
+     * @param  value   The value of the cell
+     * @return         A new HSSFCell.
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#createCell} instead.
      */
     public static HSSFCell createCell(HSSFRow row, int column, String value) {
         return createCell( row, column, value, null );
@@ -91,9 +96,10 @@ public final class HSSFCellUtil {
     /**
      *  Take a cell, and align it.
      *
-     *@param  cell     the cell to set the alignment for
-     *@param  workbook               The workbook that is being worked with.
-     *@param  align  the column alignment to use.
+     * @param  cell     the cell to set the alignment for
+     * @param  workbook               The workbook that is being worked with.
+     * @param  align  the column alignment to use.
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#setAlignment} instead.
      *
      * @see HSSFCellStyle for alignment options
      */
@@ -104,9 +110,10 @@ public final class HSSFCellUtil {
     /**
      *  Take a cell, and apply a font to it
      *
-     *@param  cell     the cell to set the alignment for
-     *@param  workbook               The workbook that is being worked with.
-     *@param  font  The HSSFFont that you want to set...
+     * @param  cell     the cell to set the alignment for
+     * @param  workbook  The workbook that is being worked with.
+     * @param  font  The HSSFFont that you want to set.
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#setFont} instead.
      */
     public static void setFont(HSSFCell cell, HSSFWorkbook workbook, HSSFFont font) {
     	CellUtil.setFont(cell, workbook, font);
@@ -119,12 +126,11 @@ public final class HSSFCellUtil {
      *  propertyName and propertyValue to the style. This is necessary because
      *  Excel has an upper limit on the number of Styles that it supports.
      *
-     *@param  workbook               The workbook that is being worked with.
-     *@param  propertyName           The name of the property that is to be
-     *      changed.
-     *@param  propertyValue          The value of the property that is to be
-     *      changed.
-     *@param  cell                   The cell that needs it's style changes
+     * @param  workbook               The workbook that is being worked with.
+     * @param  propertyName           The name of the property that is to be changed.
+     * @param  propertyValue          The value of the property that is to be changed.
+     * @param  cell                   The cell that needs it's style changes
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#setCellStyleProperty} instead.
      */
     public static void setCellStyleProperty(HSSFCell cell, HSSFWorkbook workbook,
 			String propertyName, Object propertyValue) {
@@ -135,8 +141,10 @@ public final class HSSFCellUtil {
      *  Looks for text in the cell that should be unicode, like α and provides the
      *  unicode version of it.
      *
-     *@param  cell  The cell to check for unicode values
-     *@return       translated to unicode
+     * @param  cell  The cell to check for unicode values
+     * @return       translated to unicode (the cell is modified in-place and returned)
+     * 
+     * @deprecated 3.15 beta2. Removed in 3.17. Use {@link org.apache.poi.ss.util.CellUtil#translateUnicodeValues} instead.
      */
     public static HSSFCell translateUnicodeValues(HSSFCell cell){
     	CellUtil.translateUnicodeValues(cell);



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