You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2008/05/06 17:38:08 UTC
svn commit: r653816 -
/poi/trunk/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java
Author: nick
Date: Tue May 6 08:38:08 2008
New Revision: 653816
URL: http://svn.apache.org/viewvc?rev=653816&view=rev
Log:
Fix int -> short issues that no longer apply
Modified:
poi/trunk/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java
Modified: poi/trunk/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java?rev=653816&r1=653815&r2=653816&view=diff
==============================================================================
--- poi/trunk/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java (original)
+++ poi/trunk/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java Tue May 6 08:38:08 2008
@@ -55,10 +55,10 @@
*/
public static HSSFRow getRow( int rowCounter, HSSFSheet sheet )
{
- HSSFRow row = sheet.getRow( (short) rowCounter );
+ HSSFRow row = sheet.getRow( rowCounter );
if ( row == null )
{
- row = sheet.createRow( (short) rowCounter );
+ row = sheet.createRow( rowCounter );
}
return row;
@@ -66,7 +66,8 @@
/**
- * Get a specific cell from a row. If the cell doesn't exist, then create it.
+ * 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 column The column index that the cell is in.
@@ -74,11 +75,11 @@
*/
public static HSSFCell getCell( HSSFRow row, int column )
{
- HSSFCell cell = row.getCell( (short) column );
+ HSSFCell cell = row.getCell( column );
if ( cell == null )
{
- cell = row.createCell( (short) column );
+ cell = row.createCell( (short)column );
}
return cell;
}
@@ -98,7 +99,7 @@
{
HSSFCell cell = getCell( row, column );
- cell.setCellValue( value );
+ cell.setCellValue(new HSSFRichTextString(value));
if ( style != null )
{
cell.setCellStyle( style );
@@ -222,7 +223,7 @@
public static HSSFCell translateUnicodeValues( HSSFCell cell )
{
- String s = cell.getStringCellValue();
+ String s = cell.getRichStringCellValue().getString();
boolean foundUnicode = false;
for ( Iterator i = unicodeMappings.entrySet().iterator(); i.hasNext(); )
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org