aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2008-05-06 15:38:08 +0000
committerNick Burch <nick@apache.org>2008-05-06 15:38:08 +0000
commit700d7a5dea73a629ca7da76cf9e517995f28890a (patch)
tree07de097dfdefb0c22ad137b8e7b2a8969cbaf2ff
parent32a94f8e45426f29fcda9c1c48b7e39b6a3dd0de (diff)
downloadpoi-700d7a5dea73a629ca7da76cf9e517995f28890a.tar.gz
poi-700d7a5dea73a629ca7da76cf9e517995f28890a.zip
Fix int -> short issues that no longer apply
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@653816 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java b/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java
index 7c17614ec3..5e2cf1e0fe 100644
--- a/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java
+++ b/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java
@@ -55,10 +55,10 @@ public class HSSFCellUtil
*/
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 @@ public class HSSFCellUtil
/**
- * 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 class HSSFCellUtil
*/
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 @@ public class HSSFCellUtil
{
HSSFCell cell = getCell( row, column );
- cell.setCellValue( value );
+ cell.setCellValue(new HSSFRichTextString(value));
if ( style != null )
{
cell.setCellStyle( style );
@@ -222,7 +223,7 @@ public class HSSFCellUtil
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(); )