poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r688910 [1/2] - in /poi/trunk/src: contrib/src/org/apache/poi/hssf/usermodel/contrib/ java/org/apache/poi/hssf/dev/ java/org/apache/poi/hssf/extractor/ java/org/apache/poi/hssf/usermodel/ testcases/org/apache/poi/hssf/eventmodel/ testcases/...
Date Mon, 25 Aug 2008 22:41:09 GMT
Author: josh
Date: Mon Aug 25 15:41:08 2008
New Revision: 688910

URL: http://svn.apache.org/viewvc?rev=688910&view=rev
Log:
Replaced calls to deprecated versions of createCell(), getCell(), createRow(), and getRow(). (Changing short to int)

Modified:
    poi/trunk/src/contrib/src/org/apache/poi/hssf/usermodel/contrib/HSSFCellUtil.java
    poi/trunk/src/java/org/apache/poi/hssf/dev/HSSF.java
    poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
    poi/trunk/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestAreaErrPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestArrayPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestErrPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestIntersectionPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestPercentPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestRangePtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestReferencePtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestUnionPtg.java
    poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetHiding.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetShiftRows.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestUnicodeWorkbook.java
    poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.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=688910&r1=688909&r2=688910&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 Mon Aug 25 15:41:08 2008
@@ -113,7 +113,7 @@
 
         if ( cell == null )
         {
-            cell = row.createCell( (short)column );
+            cell = row.createCell(column );
         }
         return cell;
     }

Modified: poi/trunk/src/java/org/apache/poi/hssf/dev/HSSF.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/dev/HSSF.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/dev/HSSF.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/dev/HSSF.java Mon Aug 25 15:41:08 2008
@@ -131,7 +131,7 @@
                 {
                     c.setCellStyle(cs);
                 }
-                c = r.createCell(( short ) (cellnum + 1),
+                c = r.createCell(cellnum + 1,
                                  HSSFCell.CELL_TYPE_STRING);
                 c.setCellValue(new HSSFRichTextString("TEST"));
                 s.setColumnWidth(( short ) (cellnum + 1),
@@ -346,7 +346,7 @@
                     sheet.removeRow(row);
                 }
                 HSSFRow  row  = sheet.getRow(39);
-                HSSFCell cell = row.getCell(( short ) 3);
+                HSSFCell cell = row.getCell(3);
 
                 cell.setCellType(HSSFCell.CELL_TYPE_STRING);
                 cell.setCellValue("MODIFIED CELL!!!!!");

Modified: poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java Mon Aug 25 15:41:08 2008
@@ -109,7 +109,7 @@
 				int firstCell = row.getFirstCellNum();
 				int lastCell = row.getLastCellNum();
 				for(int k=firstCell;k<lastCell;k++) {
-					HSSFCell cell = row.getCell((short)k);
+					HSSFCell cell = row.getCell(k);
 					boolean outputContents = false;
 					if(cell == null) { continue; }
 					

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java Mon Aug 25 15:41:08 2008
@@ -343,7 +343,7 @@
         }
         if(policy == CREATE_NULL_AS_BLANK) {
             if(cell == null) {
-                return createCell((short)cellnum, HSSFCell.CELL_TYPE_BLANK);
+                return createCell(cellnum, HSSFCell.CELL_TYPE_BLANK);
             }
             return cell;
         }

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java Mon Aug 25 15:41:08 2008
@@ -1817,7 +1817,7 @@
         //  new HSSFComment instances, which is bad
         HSSFRow r = getRow(row);
         if(r != null) {
-            HSSFCell c = r.getCell((short)column);
+            HSSFCell c = r.getCell(column);
             if(c != null) {
                 return c.getCellComment();
             } else {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/eventmodel/TestModelFactory.java Mon Aug 25 15:41:08 2008
@@ -139,7 +139,7 @@
         ByteArrayOutputStream stream = new ByteArrayOutputStream();
         HSSFSheet sheet = book.createSheet("Test");
         HSSFRow   row   = sheet.createRow(0);
-        HSSFCell  cell  = row.createCell((short)0);
+        HSSFCell  cell  = row.createCell(0);
         cell.setCellValue(10.5);
         book.write(stream);
         return stream;

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/TestSSTRecord.java Mon Aug 25 15:41:08 2008
@@ -365,8 +365,8 @@
     {
         HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("duprich1.xls");
         HSSFSheet sheet = wb.getSheetAt( 1 );
-        assertEquals( "01/05 (Wed)", sheet.getRow( 0 ).getCell( (short) 8 ).getStringCellValue() );
-        assertEquals( "01/05 (Wed)", sheet.getRow( 1 ).getCell( (short) 8 ).getStringCellValue() );
+        assertEquals( "01/05 (Wed)", sheet.getRow( 0 ).getCell(8 ).getStringCellValue() );
+        assertEquals( "01/05 (Wed)", sheet.getRow( 1 ).getCell(8 ).getStringCellValue() );
 
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         wb.write( baos );
@@ -375,12 +375,12 @@
         wb = HSSFTestDataSamples.openSampleWorkbook("duprich2.xls");
         sheet = wb.getSheetAt( 0 );
         int row = 0;
-        assertEquals( "Testing", sheet.getRow( row++ ).getCell( (short) 0 ).getStringCellValue() );
-        assertEquals( "rich", sheet.getRow( row++ ).getCell( (short) 0 ).getStringCellValue() );
-        assertEquals( "text", sheet.getRow( row++ ).getCell( (short) 0 ).getStringCellValue() );
-        assertEquals( "strings", sheet.getRow( row++ ).getCell( (short) 0 ).getStringCellValue() );
-        assertEquals( "Testing", sheet.getRow( row++ ).getCell( (short) 0 ).getStringCellValue() );
-        assertEquals( "Testing", sheet.getRow( row++ ).getCell( (short) 0 ).getStringCellValue() );
+        assertEquals( "Testing", sheet.getRow( row++ ).getCell(0 ).getStringCellValue() );
+        assertEquals( "rich", sheet.getRow( row++ ).getCell(0 ).getStringCellValue() );
+        assertEquals( "text", sheet.getRow( row++ ).getCell(0 ).getStringCellValue() );
+        assertEquals( "strings", sheet.getRow( row++ ).getCell(0 ).getStringCellValue() );
+        assertEquals( "Testing", sheet.getRow( row++ ).getCell(0 ).getStringCellValue() );
+        assertEquals( "Testing", sheet.getRow( row++ ).getCell(0 ).getStringCellValue() );
 
         wb.write( baos );
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/aggregates/TestValueRecordsAggregate.java Mon Aug 25 15:41:08 2008
@@ -257,7 +257,7 @@
         }
     }
     private static String getFormulaFromFirstCell(HSSFSheet s, int rowIx) {
-        return s.getRow(rowIx).getCell((short)0).getCellFormula();
+        return s.getRow(rowIx).getCell(0).getCellFormula();
     }
 
     /**

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestAreaErrPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestAreaErrPtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestAreaErrPtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestAreaErrPtg.java Mon Aug 25 15:41:08 2008
@@ -34,7 +34,7 @@
     {
         HSSFWorkbook workbook = loadWorkbook("AreaErrPtg.xls");
         assertEquals("Wrong formula string for area error", "SUM(#REF!)",
-                     workbook.getSheetAt(0).getRow(0).getCell((short) 2).getCellFormula());
+                     workbook.getSheetAt(0).getRow(0).getCell(2).getCellFormula());
     }
 }
 

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestArrayPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestArrayPtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestArrayPtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestArrayPtg.java Mon Aug 25 15:41:08 2008
@@ -103,7 +103,7 @@
 		HSSFWorkbook wb = HSSFTestDataSamples.openSampleWorkbook("ex42564-elementOrder.xls");
 
 		// The formula has an array with 3 rows and 5 columns 
-		String formula = wb.getSheetAt(0).getRow(0).getCell((short)0).getCellFormula();
+		String formula = wb.getSheetAt(0).getRow(0).getCell(0).getCellFormula();
 		// TODO - These number literals should not have '.0'. Excel has different number rendering rules
 
 		if (formula.equals("SUM({1.0,6.0,11.0;2.0,7.0,12.0;3.0,8.0,13.0;4.0,9.0,14.0;5.0,10.0,15.0})")) {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestErrPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestErrPtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestErrPtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestErrPtg.java Mon Aug 25 15:41:08 2008
@@ -34,7 +34,7 @@
     public void testReading() throws Exception
     {
         HSSFWorkbook workbook = loadWorkbook("ErrPtg.xls");
-        HSSFCell cell = workbook.getSheetAt(0).getRow(3).getCell((short) 0);
+        HSSFCell cell = workbook.getSheetAt(0).getRow(3).getCell(0);
         assertEquals("Wrong cell value", 4.0, cell.getNumericCellValue(), 0.0);
         assertEquals("Wrong cell formula", "ERROR.TYPE(#REF!)", cell.getCellFormula());
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestIntersectionPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestIntersectionPtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestIntersectionPtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestIntersectionPtg.java Mon Aug 25 15:41:08 2008
@@ -34,7 +34,7 @@
     public void testReading() throws Exception
     {
         HSSFWorkbook workbook = loadWorkbook("IntersectionPtg.xls");
-        HSSFCell cell = workbook.getSheetAt(0).getRow(4).getCell((short) 2);
+        HSSFCell cell = workbook.getSheetAt(0).getRow(4).getCell(2);
         assertEquals("Wrong cell value", 5.0, cell.getNumericCellValue(), 0.0);
         assertEquals("Wrong cell formula", "SUM(A1:B2 B2:C3)", cell.getCellFormula());
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestPercentPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestPercentPtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestPercentPtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestPercentPtg.java Mon Aug 25 15:41:08 2008
@@ -37,11 +37,11 @@
         HSSFSheet sheet = workbook.getSheetAt(0);
 
         assertEquals("Wrong numeric value for original number", 53000.0,
-                     sheet.getRow(0).getCell((short) 0).getNumericCellValue(), 0.0);
+                     sheet.getRow(0).getCell(0).getNumericCellValue(), 0.0);
         assertEquals("Wrong numeric value for percent formula result", 5300.0,
-                     sheet.getRow(1).getCell((short) 0).getNumericCellValue(), 0.0);
+                     sheet.getRow(1).getCell(0).getNumericCellValue(), 0.0);
         assertEquals("Wrong formula string for percent formula", "A1*10%",
-                     sheet.getRow(1).getCell((short) 0).getCellFormula());
+                     sheet.getRow(1).getCell(0).getCellFormula());
     }
 }
 

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestRangePtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestRangePtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestRangePtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestRangePtg.java Mon Aug 25 15:41:08 2008
@@ -34,7 +34,7 @@
     public void testReading() throws Exception
     {
         HSSFWorkbook workbook = loadWorkbook("RangePtg.xls");
-        HSSFCell cell = workbook.getSheetAt(0).getRow(3).getCell((short) 1);
+        HSSFCell cell = workbook.getSheetAt(0).getRow(3).getCell(1);
         assertEquals("Wrong cell value", 10.0, cell.getNumericCellValue(), 0.0);
         assertEquals("Wrong cell formula", "SUM(pineapple:B2)", cell.getCellFormula());
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestReferencePtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestReferencePtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestReferencePtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestReferencePtg.java Mon Aug 25 15:41:08 2008
@@ -41,41 +41,41 @@
 
         // First row
         assertEquals("Wrong numeric value for original number", 55.0,
-                     sheet.getRow(0).getCell((short) 0).getNumericCellValue(), 0.0);
+                     sheet.getRow(0).getCell(0).getNumericCellValue(), 0.0);
         assertEquals("Wrong numeric value for referemce", 55.0,
-                     sheet.getRow(0).getCell((short) 1).getNumericCellValue(), 0.0);
+                     sheet.getRow(0).getCell(1).getNumericCellValue(), 0.0);
         assertEquals("Wrong formula string for reference", "A1",
-                     sheet.getRow(0).getCell((short) 1).getCellFormula());
+                     sheet.getRow(0).getCell(1).getCellFormula());
         
         // Now moving over the 2**15 boundary
         // (Remember that excel row (n) is poi row (n-1)
         assertEquals("Wrong numeric value for original number", 32767.0,
-                sheet.getRow(32766).getCell((short) 0).getNumericCellValue(), 0.0);
+                sheet.getRow(32766).getCell(0).getNumericCellValue(), 0.0);
         assertEquals("Wrong numeric value for referemce", 32767.0,
-                sheet.getRow(32766).getCell((short) 1).getNumericCellValue(), 0.0);
+                sheet.getRow(32766).getCell(1).getNumericCellValue(), 0.0);
         assertEquals("Wrong formula string for reference", "A32767",
-                sheet.getRow(32766).getCell((short) 1).getCellFormula());
+                sheet.getRow(32766).getCell(1).getCellFormula());
         
         assertEquals("Wrong numeric value for original number", 32768.0,
-                sheet.getRow(32767).getCell((short) 0).getNumericCellValue(), 0.0);
+                sheet.getRow(32767).getCell(0).getNumericCellValue(), 0.0);
         assertEquals("Wrong numeric value for referemce", 32768.0,
-                sheet.getRow(32767).getCell((short) 1).getNumericCellValue(), 0.0);
+                sheet.getRow(32767).getCell(1).getNumericCellValue(), 0.0);
         assertEquals("Wrong formula string for reference", "A32768",
-                sheet.getRow(32767).getCell((short) 1).getCellFormula());
+                sheet.getRow(32767).getCell(1).getCellFormula());
         
         assertEquals("Wrong numeric value for original number", 32769.0,
-                sheet.getRow(32768).getCell((short) 0).getNumericCellValue(), 0.0);
+                sheet.getRow(32768).getCell(0).getNumericCellValue(), 0.0);
         assertEquals("Wrong numeric value for referemce", 32769.0,
-                sheet.getRow(32768).getCell((short) 1).getNumericCellValue(), 0.0);
+                sheet.getRow(32768).getCell(1).getNumericCellValue(), 0.0);
         assertEquals("Wrong formula string for reference", "A32769",
-                sheet.getRow(32768).getCell((short) 1).getCellFormula());
+                sheet.getRow(32768).getCell(1).getCellFormula());
         
         assertEquals("Wrong numeric value for original number", 32770.0,
-                sheet.getRow(32769).getCell((short) 0).getNumericCellValue(), 0.0);
+                sheet.getRow(32769).getCell(0).getNumericCellValue(), 0.0);
         assertEquals("Wrong numeric value for referemce", 32770.0,
-                sheet.getRow(32769).getCell((short) 1).getNumericCellValue(), 0.0);
+                sheet.getRow(32769).getCell(1).getNumericCellValue(), 0.0);
         assertEquals("Wrong formula string for reference", "A32770",
-                sheet.getRow(32769).getCell((short) 1).getCellFormula());
+                sheet.getRow(32769).getCell(1).getCellFormula());
     }
     
     public void testBug44921() {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestUnionPtg.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestUnionPtg.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestUnionPtg.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/TestUnionPtg.java Mon Aug 25 15:41:08 2008
@@ -34,7 +34,7 @@
     public void testReading() throws Exception
     {
         HSSFWorkbook workbook = loadWorkbook("UnionPtg.xls");
-        HSSFCell cell = workbook.getSheetAt(0).getRow(4).getCell((short) 2);
+        HSSFCell cell = workbook.getSheetAt(0).getRow(4).getCell(2);
         assertEquals("Wrong cell value", 24.0, cell.getNumericCellValue(), 0.0);
         assertEquals("Wrong cell formula", "SUM(A1:B2,B2:C3)", cell.getCellFormula());
     }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/record/formula/function/TestReadMissingBuiltInFuncs.java Mon Aug 25 15:41:08 2008
@@ -150,7 +150,7 @@
 			// some other unexpected error
 			throw e;
 		}
-		String result = sheet.getRow(rowIx).getCell((short)0).getCellFormula();
+		String result = sheet.getRow(rowIx).getCell(0).getCellFormula();
 		if (false) {
 			System.err.println(result);
 		}

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java Mon Aug 25 15:41:08 2008
@@ -85,7 +85,7 @@
                 c.setCellValue(rownum * 10000 + cellnum
                                + ((( double ) rownum / 1000)
                                   + (( double ) cellnum / 10000)));
-                c = r.createCell(( short ) (cellnum + 1));
+                c = r.createCell(cellnum + 1);
                 c.setCellValue("TEST");
                 c.setCellStyle(cs);
             }
@@ -112,16 +112,16 @@
         HSSFWorkbook     wb   = new HSSFWorkbook();
         HSSFSheet        s    = wb.createSheet();
         HSSFCellStyle    cs   = wb.createCellStyle();
-        HSSFRow row = s.createRow((short)0);
+        HSSFRow row = s.createRow(0);
 
         // with Date:
-        HSSFCell cell = row.createCell((short)1);
+        HSSFCell cell = row.createCell(1);
         cs.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy"));
         cell.setCellStyle(cs);
         cell.setCellValue(new Date());
 
         // with Calendar:
-        cell = row.createCell((short)2);
+        cell = row.createCell(2);
         cs.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy"));
         cell.setCellStyle(cs);
         Calendar cal = Calendar.getInstance();
@@ -143,9 +143,9 @@
         HSSFSheet        s    = wb.createSheet();
         HSSFCellStyle    cs1  = wb.createCellStyle();
         HSSFCellStyle    cs2  = wb.createCellStyle();
-        HSSFRow row = s.createRow((short)0);
-        HSSFCell cell1 = row.createCell((short)1);
-        HSSFCell cell2 = row.createCell((short)2);
+        HSSFRow row = s.createRow(0);
+        HSSFCell cell1 = row.createCell(1);
+        HSSFCell cell2 = row.createCell(2);
         
         cs1.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy"));
         cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/dd/yy"));
@@ -215,7 +215,7 @@
                                + ((( double ) rownum / 1000)
                                   + (( double ) cellnum / 10000)));
                 c.setCellStyle(cs);
-                c = r.createCell(( short ) (cellnum + 1));
+                c = r.createCell(cellnum + 1);
                 c.setCellValue("TEST");
                 c.setCellStyle(cs2);
             }

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestDataValidation.java Mon Aug 25 15:41:08 2008
@@ -111,7 +111,7 @@
 					inputBox, errorBox);
 			if (_cellStyle != null) {
 				HSSFRow row = _sheet.getRow(_sheet.getPhysicalNumberOfRows() - 1);
-				HSSFCell cell = row.createCell((short) 0);
+				HSSFCell cell = row.createCell(0);
 				cell.setCellStyle(_cellStyle);
 			}
 			writeOtherSettings(_sheet, _style_1, promptDescr);
@@ -144,26 +144,26 @@
 				boolean errorBox) {
 			HSSFRow row = sheet.createRow(sheet.getPhysicalNumberOfRows());
 			// condition's string
-			HSSFCell cell = row.createCell((short) 1);
+			HSSFCell cell = row.createCell(1);
 			cell.setCellStyle(style_1);
 			setCellValue(cell, strCondition);
 			// allow empty cells
-			cell = row.createCell((short) 2);
+			cell = row.createCell(2);
 			cell.setCellStyle(style_2);
 			setCellValue(cell, ((allowEmpty) ? "yes" : "no"));
 			// show input box
-			cell = row.createCell((short) 3);
+			cell = row.createCell(3);
 			cell.setCellStyle(style_2);
 			setCellValue(cell, ((inputBox) ? "yes" : "no"));
 			// show error box
-			cell = row.createCell((short) 4);
+			cell = row.createCell(4);
 			cell.setCellStyle(style_2);
 			setCellValue(cell, ((errorBox) ? "yes" : "no"));
 		}
 		private static void writeOtherSettings(HSSFSheet sheet, HSSFCellStyle style,
 				String strStettings) {
 			HSSFRow row = sheet.getRow(sheet.getPhysicalNumberOfRows() - 1);
-			HSSFCell cell = row.createCell((short) 5);
+			HSSFCell cell = row.createCell(5);
 			cell.setCellStyle(style);
 			setCellValue(cell, strStettings);
 		}
@@ -256,7 +256,7 @@
 			HSSFRow row = sheet.createRow(sheet.getPhysicalNumberOfRows());
 			row = sheet.createRow(sheet.getPhysicalNumberOfRows());
 			sheet.addMergedRegion(new CellRangeAddress(sheet.getPhysicalNumberOfRows()-1, sheet.getPhysicalNumberOfRows()-1, 0, 5));
-			HSSFCell cell = row.createCell((short) 0);
+			HSSFCell cell = row.createCell(0);
 			setCellValue(cell, strTypeDescription);
 			cell.setCellStyle(_style_3);
 			row = sheet.createRow(sheet.getPhysicalNumberOfRows());
@@ -267,7 +267,7 @@
 			HSSFRow row = sheet.createRow(sheet.getPhysicalNumberOfRows());
 			row.setHeight((short) 400);
 			for (int i = 0; i < 6; i++) {
-				row.createCell((short) i).setCellStyle(_style_4);
+				row.createCell(i).setCellStyle(_style_4);
 				if (i == 2 || i == 3 || i == 4) {
 					sheet.setColumnWidth((short) i, (short) 3500);
 				} else if (i == 5) {
@@ -276,17 +276,17 @@
 					sheet.setColumnWidth((short) i, (short) 8000);
 				}
 			}
-			HSSFCell cell = row.getCell((short) 0);
+			HSSFCell cell = row.getCell(0);
 			setCellValue(cell, "Data validation cells");
-			cell = row.getCell((short) 1);
+			cell = row.getCell(1);
 			setCellValue(cell, "Condition");
-			cell = row.getCell((short) 2);
+			cell = row.getCell(2);
 			setCellValue(cell, "Allow blank");
-			cell = row.getCell((short) 3);
+			cell = row.getCell(3);
 			setCellValue(cell, "Prompt box");
-			cell = row.getCell((short) 4);
+			cell = row.getCell(4);
 			setCellValue(cell, "Error box");
-			cell = row.getCell((short) 5);
+			cell = row.getCell(5);
 			setCellValue(cell, "Other settings");
 		}
 
@@ -298,7 +298,7 @@
 			HSSFSheet sheet = _currentSheet;
 			HSSFRow row = sheet.getRow(sheet.getPhysicalNumberOfRows()-1);
 			sheet.addMergedRegion(new CellRangeAddress(sheet.getPhysicalNumberOfRows()-1, sheet.getPhysicalNumberOfRows()-1, 0, 5));
-			HSSFCell cell = row.createCell((short)0);
+			HSSFCell cell = row.createCell(0);
 			setCellValue(cell, strTypeDescription);
 			cell.setCellStyle(_style_3);
 			row = sheet.createRow(sheet.getPhysicalNumberOfRows());
@@ -395,14 +395,14 @@
 		// add list data on same sheet
 		for (int i = 0; i < 10; i++) {
 			HSSFRow currRow = fSheet.createRow(i + 29);
-			setCellValue(currRow.createCell((short) 0), cellStrValue);
+			setCellValue(currRow.createCell(0), cellStrValue);
 		}
 		// add list data on another sheet
 		for (int i = 0; i < 10; i++) {
 			HSSFRow currRow = dataSheet.createRow(i + 0);
-			setCellValue(currRow.createCell((short) 0), "Data a" + i);
-			setCellValue(currRow.createCell((short) 1), "Data b" + i);
-			setCellValue(currRow.createCell((short) 2), "Data c" + i);
+			setCellValue(currRow.createCell(0), "Data a" + i);
+			setCellValue(currRow.createCell(1), "Data b" + i);
+			setCellValue(currRow.createCell(2), "Data c" + i);
 		}
 	}
 

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestFormulas.java Mon Aug 25 15:41:08 2008
@@ -54,8 +54,8 @@
         HSSFCell         c      = null;
 
         //get our minimum values
-        r = s.createRow((short)1);
-        c = r.createCell((short)1);
+        r = s.createRow(1);
+        c = r.createCell(1);
         c.setCellFormula(1 + "+" + 1);
 
         wb.write(out);
@@ -64,8 +64,8 @@
         FileInputStream in = new FileInputStream(file);
         wb = new HSSFWorkbook(in);
         s  = wb.getSheetAt(0);
-        r  = s.getRow((short)1);
-        c  = r.getCell((short)1);
+        r  = s.getRow(1);
+        c  = r.getCell(1);
 
         assertTrue("Formula is as expected",("1+1".equals(c.getCellFormula())));
         in.close();
@@ -176,24 +176,24 @@
 
         //get our minimum values
 
-        r = s.createRow((short)0);
-        c = r.createCell((short)1);
+        r = s.createRow(0);
+        c = r.createCell(1);
         c.setCellFormula(""+Float.MIN_VALUE + operator + Float.MIN_VALUE);
 
        for (short x = 1; x < Short.MAX_VALUE && x > 0; x=(short)(x*2) ) {
-            r = s.createRow((short) x);
+            r = s.createRow(x);
 
             for (short y = 1; y < 256 && y > 0; y= (short) (y +2)) {
 
-                c = r.createCell((short) y);
+                c = r.createCell(y);
                 c.setCellFormula("" + x+"."+y + operator + y +"."+x);
 
 
             }
         }
         if (s.getLastRowNum() < Short.MAX_VALUE) {
-            r = s.createRow((short)0);
-            c = r.createCell((short)0);
+            r = s.createRow(0);
+            c = r.createCell(0);
             c.setCellFormula("" + Float.MAX_VALUE + operator + Float.MAX_VALUE);
         }
         wb.write(out);
@@ -216,11 +216,11 @@
         // dont know how to check correct result .. for the moment, we just verify that the file can be read.
 
         for (short x = 1; x < Short.MAX_VALUE && x > 0; x=(short)(x*2)) {
-            r = s.getRow((short) x);
+            r = s.getRow(x);
 
             for (short y = 1; y < 256 && y > 0; y=(short)(y+2)) {
 
-                c = r.getCell((short) y);
+                c = r.getCell(y);
                 assertTrue("got a formula",c.getCellFormula()!=null);
 
                 assertTrue("loop Formula is as expected "+x+"."+y+operator+y+"."+x+"!="+c.getCellFormula(),(
@@ -337,8 +337,8 @@
         HSSFCell         c      = null;
 
         //get our minimum values
-        r = s.getRow((short)0);
-        c = r.getCell((short)1);
+        r = s.getRow(0);
+        c = r.getCell(1);
         //get our minimum values
         assertTrue("minval Formula is as expected A2"+operator+"A3 != "+c.getCellFormula(),
         ( ("A2"+operator+"A3").equals(c.getCellFormula())
@@ -346,7 +346,7 @@
 
 
         for (short x = 1; x < Short.MAX_VALUE && x > 0; x=(short)(x*2)) {
-            r = s.getRow((short) x);
+            r = s.getRow(x);
 
             for (short y = 1; y < 256 && y > 0; y++) {
 
@@ -372,7 +372,7 @@
                     refy2=(short)(y-3);
                 }
 
-                c = r.getCell((short) y);
+                c = r.getCell(y);
                 CellReference cr= new CellReference(refx1, refy1, false, false);
                 ref=cr.formatAsString();
                 cr=new CellReference(refx2,refy2, false, false);
@@ -389,8 +389,8 @@
         }
 
         //test our maximum values
-        r = s.getRow((short)0);
-        c = r.getCell((short)0);
+        r = s.getRow(0);
+        c = r.getCell(0);
 
         assertTrue("maxval Formula is as expected",(
         ("B1"+operator+"IV255").equals(c.getCellFormula())
@@ -416,8 +416,8 @@
         HSSFCell         c      = null;
 
         //get our minimum values
-        r = s.createRow((short)0);
-        c = r.createCell((short)1);
+        r = s.createRow(0);
+        c = r.createCell(1);
         c.setCellFormula(formula);
 
         wb.write(out);
@@ -429,8 +429,8 @@
         s      = wb.getSheetAt(0);
 
         //get our minimum values
-        r = s.getRow((short)0);
-        c = r.getCell((short)1);
+        r = s.getRow(0);
+        c = r.getCell(1);
         assertTrue("minval Formula is as expected",
                    formula.equals(c.getCellFormula())
                   );
@@ -496,18 +496,18 @@
         HSSFCell         c      = null;
 
         //get our minimum values
-        r = s.getRow((short)0);
-        c = r.getCell((short)1);
+        r = s.getRow(0);
+        c = r.getCell(1);
         assertTrue("minval Formula is as expected 1"+operator+"1 != "+c.getCellFormula(),
         ( ("1"+operator+"1").equals(c.getCellFormula())
         ));
 
         for (short x = 1; x < Short.MAX_VALUE && x > 0; x=(short)(x*2)) {
-            r = s.getRow((short) x);
+            r = s.getRow(x);
 
             for (short y = 1; y < 256 && y > 0; y++) {
 
-                c = r.getCell((short) y);
+                c = r.getCell(y);
 
                 assertTrue("loop Formula is as expected "+x+operator+y+"!="+c.getCellFormula(),(
                 (""+x+operator+y).equals(c.getCellFormula())
@@ -519,8 +519,8 @@
         }
 
         //test our maximum values
-        r = s.getRow((short)0);
-        c = r.getCell((short)0);
+        r = s.getRow(0);
+        c = r.getCell(0);
 
 
         assertTrue("maxval Formula is as expected",(
@@ -549,9 +549,9 @@
             HSSFCell         c      = null;
 
 
-            r = s.createRow((short) 0);
+            r = s.createRow(0);
 
-            c = r.createCell((short) 0);
+            c = r.createCell(0);
             c.setCellFormula(function+"(A2:A3)");
 
 
@@ -563,7 +563,7 @@
             wb = new HSSFWorkbook(in);
             s = wb.getSheetAt(0);
             r = s.getRow(0);
-            c = r.getCell((short)0);
+            c = r.getCell(0);
 
             assertTrue("function ="+function+"(A2:A3)",
                         ( (function+"(A2:A3)").equals((function+"(A2:A3)")) )
@@ -586,9 +586,9 @@
             HSSFCell         c      = null;
 
 
-            r = s.createRow((short) 0);
+            r = s.createRow(0);
 
-            c = r.createCell((short) 0);
+            c = r.createCell(0);
             c.setCellFormula(function+"(A2,A3)");
 
 
@@ -600,7 +600,7 @@
             wb = new HSSFWorkbook(in);
             s = wb.getSheetAt(0);
             r = s.getRow(0);
-            c = r.getCell((short)0);
+            c = r.getCell(0);
 
             assertTrue("function ="+function+"(A2,A3)",
                         ( (function+"(A2,A3)").equals(c.getCellFormula()) )
@@ -624,11 +624,11 @@
             HSSFCell         c      = null;
 
 
-            r = s.createRow((short) 0);
+            r = s.createRow(0);
 
-            c = r.createCell((short) 0);
+            c = r.createCell(0);
             c.setCellFormula(function+"(A2:A4,B2:B4)");
-            c=r.createCell((short) 1);
+            c=r.createCell(1);
             c.setCellFormula(function+"($A$2:$A4,B$2:B4)");
 
             wb.write(out);
@@ -639,13 +639,13 @@
             wb = new HSSFWorkbook(in);
             s = wb.getSheetAt(0);
             r = s.getRow(0);
-            c = r.getCell((short)0);
+            c = r.getCell(0);
 
             assertTrue("function ="+function+"(A2:A4,B2:B4)",
                         ( (function+"(A2:A4,B2:B4)").equals(c.getCellFormula()) )
                       );
 
-            c=r.getCell((short) 1);
+            c=r.getCell(1);
              assertTrue("function ="+function+"($A$2:$A4,B$2:B4)",
                         ( (function+"($A$2:$A4,B$2:B4)").equals(c.getCellFormula()) )
                       );
@@ -663,17 +663,17 @@
             HSSFCell         c      = null;
 
 
-            r = s.createRow((short) 0);
+            r = s.createRow(0);
 
-            c = r.createCell((short) 0);
+            c = r.createCell(0);
             c.setCellFormula("A3+A2");
-            c=r.createCell( (short) 1);
+            c=r.createCell(1);
             c.setCellFormula("$A3+$A2");
-            c=r.createCell( (short) 2);
+            c=r.createCell(2);
             c.setCellFormula("A$3+A$2");
-            c=r.createCell( (short) 3);
+            c=r.createCell(3);
             c.setCellFormula("$A$3+$A$2");
-            c=r.createCell( (short) 4);
+            c=r.createCell(4);
             c.setCellFormula("SUM($A$3,$A$2)");
 
             wb.write(out);
@@ -684,15 +684,15 @@
             wb = new HSSFWorkbook(in);
             s = wb.getSheetAt(0);
             r = s.getRow(0);
-            c = r.getCell((short)0);
+            c = r.getCell(0);
             assertTrue("A3+A2", ("A3+A2").equals(c.getCellFormula()));
-             c = r.getCell((short)1);
+             c = r.getCell(1);
             assertTrue("$A3+$A2", ("$A3+$A2").equals(c.getCellFormula()));
-             c = r.getCell((short)2);
+             c = r.getCell(2);
             assertTrue("A$3+A$2", ("A$3+A$2").equals(c.getCellFormula()));
-             c = r.getCell((short)3);
+             c = r.getCell(3);
             assertTrue("$A$3+$A$2", ("$A$3+$A$2").equals(c.getCellFormula()));
-             c = r.getCell((short)4);
+             c = r.getCell(4);
             assertTrue("SUM($A$3,$A$2)", ("SUM($A$3,$A$2)").equals(c.getCellFormula()));
             in.close();
     }
@@ -706,15 +706,15 @@
             HSSFSheet        s      = wb.createSheet("A");
             HSSFRow          r      = null;
             HSSFCell         c      = null;
-            r = s.createRow((short)0);
-            c = r.createCell((short)0);c.setCellValue(1);
-            c = r.createCell((short)1);c.setCellValue(2);
+            r = s.createRow(0);
+            c = r.createCell(0);c.setCellValue(1);
+            c = r.createCell(1);c.setCellValue(2);
 
             s      = wb.createSheet("B");
-            r = s.createRow((short)0);
-            c=r.createCell((short)0); c.setCellFormula("AVERAGE(A!A1:B1)");
-            c=r.createCell((short)1); c.setCellFormula("A!A1+A!B1");
-            c=r.createCell((short)2); c.setCellFormula("A!$A$1+A!$B1");
+            r = s.createRow(0);
+            c=r.createCell(0); c.setCellFormula("AVERAGE(A!A1:B1)");
+            c=r.createCell(1); c.setCellFormula("A!A1+A!B1");
+            c=r.createCell(2); c.setCellFormula("A!$A$1+A!$B1");
             wb.write(out);
             out.close();
 
@@ -724,9 +724,9 @@
             wb = new HSSFWorkbook(in);
             s = wb.getSheet("B");
             r = s.getRow(0);
-            c = r.getCell((short)0);
+            c = r.getCell(0);
             assertTrue("expected: AVERAGE(A!A1:B1) got: "+c.getCellFormula(), ("AVERAGE(A!A1:B1)").equals(c.getCellFormula()));
-            c = r.getCell((short)1);
+            c = r.getCell(1);
             assertTrue("expected: A!A1+A!B1 got: "+c.getCellFormula(), ("A!A1+A!B1").equals(c.getCellFormula()));
             in.close();
     }
@@ -740,29 +740,29 @@
             HSSFCell         c      = null;
 
 
-            r = s.createRow((short) 0);
+            r = s.createRow(0);
 
-            c = r.createCell((short) 0);
+            c = r.createCell(0);
             c.setCellFormula("A3+A2");
-            c=r.createCell( (short) 1);
+            c=r.createCell(1);
             c.setCellFormula("AVERAGE(A3,A2)");
-            c=r.createCell( (short) 2);
+            c=r.createCell(2);
             c.setCellFormula("ROW(A3)");
-            c=r.createCell( (short) 3);
+            c=r.createCell(3);
             c.setCellFormula("AVERAGE(A2:A3)");
-            c=r.createCell( (short) 4);
+            c=r.createCell(4);
             c.setCellFormula("POWER(A2,A3)");
-            c=r.createCell( (short) 5);
+            c=r.createCell(5);
             c.setCellFormula("SIN(A2)");
 
-            c=r.createCell( (short) 6);
+            c=r.createCell(6);
             c.setCellFormula("SUM(A2:A3)");
 
-            c=r.createCell( (short) 7);
+            c=r.createCell(7);
             c.setCellFormula("SUM(A2,A3)");
 
-            r = s.createRow((short) 1);c=r.createCell( (short) 0); c.setCellValue(2.0);
-             r = s.createRow((short) 2);c=r.createCell( (short) 0); c.setCellValue(3.0);
+            r = s.createRow(1);c=r.createCell(0); c.setCellValue(2.0);
+             r = s.createRow(2);c=r.createCell(0); c.setCellValue(3.0);
 
             wb.write(out);
             out.close();
@@ -778,10 +778,10 @@
             HSSFSheet        s      = wb.createSheet("A");
             HSSFRow          r      = null;
             HSSFCell         c      = null;
-            r = s.createRow((short)0);
-            c=r.createCell((short)1); c.setCellFormula("UPPER(\"abc\")");
-            c=r.createCell((short)2); c.setCellFormula("LOWER(\"ABC\")");
-            c=r.createCell((short)3); c.setCellFormula("CONCATENATE(\" my \",\" name \")");
+            r = s.createRow(0);
+            c=r.createCell(1); c.setCellFormula("UPPER(\"abc\")");
+            c=r.createCell(2); c.setCellFormula("LOWER(\"ABC\")");
+            c=r.createCell(3); c.setCellFormula("CONCATENATE(\" my \",\" name \")");
 
             wb.write(out);
             out.close();
@@ -789,7 +789,7 @@
             wb = openSample("StringFormulas.xls");
             s = wb.getSheetAt(0);
             r = s.getRow(0);
-            c = r.getCell((short)0);
+            c = r.getCell(0);
             assertTrue("expected: UPPER(\"xyz\") got "+c.getCellFormula(), ("UPPER(\"xyz\")").equals(c.getCellFormula()));
             //c = r.getCell((short)1);
             //assertTrue("expected: A!A1+A!B1 got: "+c.getCellFormula(), ("A!A1+A!B1").equals(c.getCellFormula()));
@@ -807,8 +807,8 @@
             HSSFSheet        s      = wb.createSheet("A");
             HSSFRow          r      = null;
             HSSFCell         c      = null;
-            r = s.createRow((short)0);
-            c=r.createCell((short)1); c.setCellFormula("IF(A1<A2,B1,B2)");
+            r = s.createRow(0);
+            c=r.createCell(1); c.setCellFormula("IF(A1<A2,B1,B2)");
 
 
             wb.write(out);
@@ -820,7 +820,7 @@
             wb = new HSSFWorkbook(in);
             s = wb.getSheetAt(0);
             r = s.getRow(0);
-            c = r.getCell((short)1);
+            c = r.getCell(1);
             assertEquals("Formula in cell 1 ","IF(A1<A2,B1,B2)",c.getCellFormula());
             in.close();
     }
@@ -835,8 +835,8 @@
             HSSFRow          r      = null;
             HSSFCell         c      = null;
 
-            r = s.createRow(  (short)0 );
-            c = r.createCell( (short)0 );
+            r = s.createRow(0 );
+            c = r.createCell(0 );
 
             HSSFCellStyle cellStyle = wb.createCellStyle();
             cellStyle.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy h:mm"));
@@ -847,8 +847,8 @@
            //              HSSFDateUtil.getJavaDate(excelDate).getTime());
 
             for (int k=1; k < 100; k++) {
-              r=s.createRow((short)k);
-              c=r.createCell((short)0);
+              r=s.createRow(k);
+              c=r.createCell(0);
               c.setCellFormula("A"+(k)+"+1");
               c.setCellStyle(cellStyle);
             }
@@ -870,11 +870,11 @@
             HSSFSheet        s      = wb.createSheet("testSheet1");
             HSSFRow          r      = null;
             HSSFCell         c      = null;
-            r = s.createRow((short)0);
-            c=r.createCell((short)1); c.setCellValue(1);
-            c=r.createCell((short)2); c.setCellValue(2);
-            c=r.createCell((short)3); c.setCellFormula("MAX(A1:B1)");
-            c=r.createCell((short)4); c.setCellFormula("IF(A1=D1,\"A1\",\"B1\")");
+            r = s.createRow(0);
+            c=r.createCell(1); c.setCellValue(1);
+            c=r.createCell(2); c.setCellValue(2);
+            c=r.createCell(3); c.setCellFormula("MAX(A1:B1)");
+            c=r.createCell(4); c.setCellFormula("IF(A1=D1,\"A1\",\"B1\")");
 
             wb.write(out);
             out.close();
@@ -885,7 +885,7 @@
             wb = new HSSFWorkbook(in);
             s = wb.getSheetAt(0);
             r = s.getRow(0);
-            c = r.getCell((short)4);
+            c = r.getCell(4);
 
             assertTrue("expected: IF(A1=D1,\"A1\",\"B1\") got "+c.getCellFormula(), ("IF(A1=D1,\"A1\",\"B1\")").equals(c.getCellFormula()));
             in.close();
@@ -893,7 +893,7 @@
             wb = openSample("IfFormulaTest.xls");
             s = wb.getSheetAt(0);
             r = s.getRow(3);
-            c = r.getCell((short)0);
+            c = r.getCell(0);
             assertTrue("expected: IF(A3=A1,\"A1\",\"A2\") got "+c.getCellFormula(), ("IF(A3=A1,\"A1\",\"A2\")").equals(c.getCellFormula()));
             //c = r.getCell((short)1);
             //assertTrue("expected: A!A1+A!B1 got: "+c.getCellFormula(), ("A!A1+A!B1").equals(c.getCellFormula()));
@@ -905,8 +905,8 @@
         s      = wb.createSheet("testSheet1");
         r      = null;
         c      = null;
-        r = s.createRow((short)0);
-        c=r.createCell((short)0); c.setCellFormula("IF(1=1,0,1)");
+        r = s.createRow(0);
+        c=r.createCell(0); c.setCellFormula("IF(1=1,0,1)");
 
         wb.write(out);
         out.close();
@@ -920,21 +920,21 @@
         s      = wb.createSheet("testSheet1");
         r      = null;
         c      = null;
-        r = s.createRow((short)0);
-        c=r.createCell((short)0);
+        r = s.createRow(0);
+        c=r.createCell(0);
         c.setCellValue(1);
 
-        c=r.createCell((short)1);
+        c=r.createCell(1);
         c.setCellValue(3);
 
 
-        HSSFCell formulaCell=r.createCell((short)3);
+        HSSFCell formulaCell=r.createCell(3);
 
-        r = s.createRow((short)1);
-        c=r.createCell((short)0);
+        r = s.createRow(1);
+        c=r.createCell(0);
         c.setCellValue(3);
 
-        c=r.createCell((short)1);
+        c=r.createCell(1);
         c.setCellValue(7);
 
         formulaCell.setCellFormula("IF(A1=B1,AVERAGE(A1:B1),AVERAGE(A2:B2))");
@@ -956,7 +956,7 @@
 
         HSSFSheet        s      = wb.getSheetAt(0);
         HSSFRow          r      = s.getRow(0);
-        HSSFCell         c      = r.getCell((short)2);
+        HSSFCell         c      = r.getCell(2);
         assertEquals(function, c.getCellFormula());
 
 
@@ -965,29 +965,29 @@
         wb     = new HSSFWorkbook();
         s      = wb.createSheet();
 
-        r = s.createRow((short)0);
-        c=r.createCell((short)0); c.setCellValue((double)1000);
-        c=r.createCell((short)1); c.setCellValue((double)1);
-
-
-        r = s.createRow((short)1);
-        c=r.createCell((short)0); c.setCellValue((double)2000);
-        c=r.createCell((short)1); c.setCellValue((double)2);
-
-        r = s.createRow((short)2);
-        c=r.createCell((short)0); c.setCellValue((double)3000);
-        c=r.createCell((short)1); c.setCellValue((double)3);
-
-        r = s.createRow((short)3);
-        c=r.createCell((short)0); c.setCellValue((double)4000);
-        c=r.createCell((short)1); c.setCellValue((double)4);
-
-        r = s.createRow((short)4);
-        c=r.createCell((short)0); c.setCellValue((double)5000);
-        c=r.createCell((short)1); c.setCellValue((double)5);
+        r = s.createRow(0);
+        c=r.createCell(0); c.setCellValue((double)1000);
+        c=r.createCell(1); c.setCellValue((double)1);
+
+
+        r = s.createRow(1);
+        c=r.createCell(0); c.setCellValue((double)2000);
+        c=r.createCell(1); c.setCellValue((double)2);
+
+        r = s.createRow(2);
+        c=r.createCell(0); c.setCellValue((double)3000);
+        c=r.createCell(1); c.setCellValue((double)3);
+
+        r = s.createRow(3);
+        c=r.createCell(0); c.setCellValue((double)4000);
+        c=r.createCell(1); c.setCellValue((double)4);
+
+        r = s.createRow(4);
+        c=r.createCell(0); c.setCellValue((double)5000);
+        c=r.createCell(1); c.setCellValue((double)5);
 
         r = s.getRow(0);
-        c=r.createCell((short)2); c.setCellFormula(function);
+        c=r.createCell(2); c.setCellFormula(function);
 
         wb.write(out);
         out.close();
@@ -1002,42 +1002,42 @@
         HSSFSheet s0 = w.getSheetAt(0);
         HSSFRow[] r = {s0.getRow(0), s0.getRow(1)};
 
-        HSSFCell a1 = r[0].getCell((short) 0);
+        HSSFCell a1 = r[0].getCell(0);
         assertEquals("square(1)", a1.getCellFormula());
         assertEquals(1d, a1.getNumericCellValue(), 1e-9);
 
-        HSSFCell a2 = r[1].getCell((short) 0);
+        HSSFCell a2 = r[1].getCell(0);
         assertEquals("square(2)", a2.getCellFormula());
         assertEquals(4d, a2.getNumericCellValue(), 1e-9);
 
-        HSSFCell b1 = r[0].getCell((short) 1);
+        HSSFCell b1 = r[0].getCell(1);
         assertEquals("IF(TRUE,square(1))", b1.getCellFormula());
         assertEquals(1d, b1.getNumericCellValue(), 1e-9);
 
-        HSSFCell b2 = r[1].getCell((short) 1);
+        HSSFCell b2 = r[1].getCell(1);
         assertEquals("IF(TRUE,square(2))", b2.getCellFormula());
         assertEquals(4d, b2.getNumericCellValue(), 1e-9);
 
-        HSSFCell c1 = r[0].getCell((short) 2);
+        HSSFCell c1 = r[0].getCell(2);
         assertEquals("square(square(1))", c1.getCellFormula());
         assertEquals(1d, c1.getNumericCellValue(), 1e-9);
 
-        HSSFCell c2 = r[1].getCell((short) 2);
+        HSSFCell c2 = r[1].getCell(2);
         assertEquals("square(square(2))", c2.getCellFormula());
         assertEquals(16d, c2.getNumericCellValue(), 1e-9);
 
-        HSSFCell d1 = r[0].getCell((short) 3);
+        HSSFCell d1 = r[0].getCell(3);
         assertEquals("square(one())", d1.getCellFormula());
         assertEquals(1d, d1.getNumericCellValue(), 1e-9);
 
-        HSSFCell d2 = r[1].getCell((short) 3);
+        HSSFCell d2 = r[1].getCell(3);
         assertEquals("square(two())", d2.getCellFormula());
         assertEquals(4d, d2.getNumericCellValue(), 1e-9);
     }
 
     public void testStringFormulaRead() {
         HSSFWorkbook w = openSample("StringFormulas.xls");
-        HSSFCell c = w.getSheetAt(0).getRow(0).getCell((short)0);
+        HSSFCell c = w.getSheetAt(0).getRow(0).getCell(0);
         assertEquals("String Cell value","XYZ",c.getRichStringCellValue().getString());
     }
 
@@ -1046,8 +1046,8 @@
          HSSFWorkbook sb = new HSSFWorkbook();
          HSSFSheet s1 = sb.createSheet("Sheet a.1");
          HSSFSheet s2 = sb.createSheet("Sheet.A");
-         s2.createRow(1).createCell((short) 2).setCellFormula("'Sheet a.1'!A1");
-         s1.createRow(1).createCell((short) 2).setCellFormula("'Sheet.A'!A1");
+         s2.createRow(1).createCell(2).setCellFormula("'Sheet a.1'!A1");
+         s1.createRow(1).createCell(2).setCellFormula("'Sheet.A'!A1");
          File file = TempFile.createTempFile("testComplexSheetRefs",".xls");
          sb.write(new FileOutputStream(file));
     }
@@ -1073,17 +1073,17 @@
     /* MissingArgPtg */
     public void testMissingArgPtg() throws Exception {
         HSSFWorkbook wb = new HSSFWorkbook();
-        HSSFCell cell = wb.createSheet("Sheet1").createRow(4).createCell((short) 0);
+        HSSFCell cell = wb.createSheet("Sheet1").createRow(4).createCell(0);
         cell.setCellFormula("IF(A1=\"A\",1,)");
     }
 
     public void testSharedFormula() {
         HSSFWorkbook wb = openSample("SharedFormulaTest.xls");
 
-        assertEquals("A$1*2", wb.getSheetAt(0).getRow(1).getCell((short)1).toString());
-        assertEquals("$A11*2", wb.getSheetAt(0).getRow(11).getCell((short)1).toString());
-        assertEquals("DZ2*2", wb.getSheetAt(0).getRow(1).getCell((short)128).toString());
-        assertEquals("B32770*2", wb.getSheetAt(0).getRow(32768).getCell((short)1).toString());
+        assertEquals("A$1*2", wb.getSheetAt(0).getRow(1).getCell(1).toString());
+        assertEquals("$A11*2", wb.getSheetAt(0).getRow(11).getCell(1).toString());
+        assertEquals("DZ2*2", wb.getSheetAt(0).getRow(1).getCell(128).toString());
+        assertEquals("B32770*2", wb.getSheetAt(0).getRow(32768).getCell(1).toString());
     }
 
     public static void main(String [] args) {

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java Mon Aug 25 15:41:08 2008
@@ -76,7 +76,7 @@
         HSSFSheet        s      = wb.createSheet("testSheet1");
         HSSFRow          r      = null;
         HSSFCell         c      = null;
-        r = s.createRow((short)0);
+        r = s.createRow(0);
         c=r.createCell(1);
         //c.setCellType(HSSFCell.CELL_TYPE_BOOLEAN);
         c.setCellValue(true);
@@ -85,7 +85,7 @@
         //c.setCellType(HSSFCell.CELL_TYPE_BOOLEAN);
         c.setCellValue(false);
 
-        r = s.createRow((short)1);
+        r = s.createRow(1);
         c=r.createCell(1);
         //c.setCellType(HSSFCell.CELL_TYPE_ERROR);
         c.setCellErrorValue((byte)0);
@@ -241,7 +241,7 @@
             cs.setBorderLeft((short)1);
             cs.setBorderBottom((short)1);
             
-            r = s.createRow((short)0);
+            r = s.createRow(0);
             c=r.createCell(0);
             c.setCellStyle(cs);
             c.setCellFormula("2*3");

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java Mon Aug 25 15:41:08 2008
@@ -96,7 +96,7 @@
 
          for (int rownum = 0; rownum < 3; rownum++) {
              row = sheet.getRow(rownum);
-             cell = row.getCell((short)0);
+             cell = row.getCell(0);
              comment = cell.getCellComment();
              assertNull("Cells in the first column are not commented", comment);
              assertNull(sheet.getCellComment(rownum, 0));
@@ -104,7 +104,7 @@
 
          for (int rownum = 0; rownum < 3; rownum++) {
              row = sheet.getRow(rownum);
-             cell = row.getCell((short)1);
+             cell = row.getCell(1);
              comment = cell.getCellComment();
              assertNotNull("Cells in the second column have comments", comment);
              assertNotNull("Cells in the second column have comments", sheet.getCellComment(rownum, 1));
@@ -133,7 +133,7 @@
 
          for (int rownum = 0; rownum < 3; rownum++) {
              row = sheet.getRow(rownum);
-             cell = row.getCell((short)1);
+             cell = row.getCell(1);
              comment = cell.getCellComment();
              comment.setAuthor("Mofified["+rownum+"] by Yegor");
              comment.setString(new HSSFRichTextString("Modified comment at row " + rownum));
@@ -148,7 +148,7 @@
 
         for (int rownum = 0; rownum < 3; rownum++) {
             row = sheet.getRow(rownum);
-            cell = row.getCell((short)1);
+            cell = row.getCell(1);
             comment = cell.getCellComment();
 
             assertEquals("Mofified["+rownum+"] by Yegor", comment.getAuthor());

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFHyperlink.java Mon Aug 25 15:41:08 2008
@@ -42,14 +42,14 @@
         HSSFHyperlink link;
 
         sheet = wb.getSheet("WebLinks");
-        cell = sheet.getRow(4).getCell((short)0);
+        cell = sheet.getRow(4).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("POI", link.getLabel());
         assertEquals("POI", cell.getRichStringCellValue().getString());
         assertEquals("http://poi.apache.org/", link.getAddress());
 
-        cell = sheet.getRow(8).getCell((short)0);
+        cell = sheet.getRow(8).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("HSSF", link.getLabel());
@@ -57,7 +57,7 @@
         assertEquals("http://poi.apache.org/hssf/", link.getAddress());
 
         sheet = wb.getSheet("Emails");
-        cell = sheet.getRow(4).getCell((short)0);
+        cell = sheet.getRow(4).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("dev", link.getLabel());
@@ -65,7 +65,7 @@
         assertEquals("mailto:dev@poi.apache.org", link.getAddress());
 
         sheet = wb.getSheet("Internal");
-        cell = sheet.getRow(4).getCell((short)0);
+        cell = sheet.getRow(4).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("Link To First Sheet", link.getLabel());
@@ -81,7 +81,7 @@
         HSSFHyperlink link;
 
         sheet = wb.getSheet("WebLinks");
-        cell = sheet.getRow(4).getCell((short)0);
+        cell = sheet.getRow(4).getCell(0);
         link = cell.getHyperlink();
         //modify the link
         link.setAddress("www.apache.org");
@@ -92,7 +92,7 @@
 
         wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
         sheet = wb.getSheet("WebLinks");
-        cell = sheet.getRow(4).getCell((short)0);
+        cell = sheet.getRow(4).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("www.apache.org", link.getAddress());
@@ -106,21 +106,21 @@
         HSSFSheet sheet = wb.createSheet("Hyperlinks");
 
         //URL
-        cell = sheet.createRow(0).createCell((short)0);
+        cell = sheet.createRow(0).createCell(0);
         cell.setCellValue("URL Link");
         HSSFHyperlink link = new HSSFHyperlink(HSSFHyperlink.LINK_URL);
         link.setAddress("http://poi.apache.org/");
         cell.setHyperlink(link);
 
         //link to a file in the current directory
-        cell = sheet.createRow(1).createCell((short)0);
+        cell = sheet.createRow(1).createCell(0);
         cell.setCellValue("File Link");
         link = new HSSFHyperlink(HSSFHyperlink.LINK_FILE);
         link.setAddress("link1.xls");
         cell.setHyperlink(link);
 
         //e-mail link
-        cell = sheet.createRow(2).createCell((short)0);
+        cell = sheet.createRow(2).createCell(0);
         cell.setCellValue("Email Link");
         link = new HSSFHyperlink(HSSFHyperlink.LINK_EMAIL);
         //note, if subject contains white spaces, make sure they are url-encoded
@@ -131,9 +131,9 @@
 
         //create a target sheet and cell
         HSSFSheet sheet2 = wb.createSheet("Target Sheet");
-        sheet2.createRow(0).createCell((short)0).setCellValue("Target Cell");
+        sheet2.createRow(0).createCell(0).setCellValue("Target Cell");
 
-        cell = sheet.createRow(3).createCell((short)0);
+        cell = sheet.createRow(3).createCell(0);
         cell.setCellValue("Worksheet Link");
         link = new HSSFHyperlink(HSSFHyperlink.LINK_DOCUMENT);
         link.setAddress("'Target Sheet'!A1");
@@ -145,22 +145,22 @@
 
         wb = new HSSFWorkbook(new ByteArrayInputStream(out.toByteArray()));
         sheet = wb.getSheet("Hyperlinks");
-        cell = sheet.getRow(0).getCell((short)0);
+        cell = sheet.getRow(0).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("http://poi.apache.org/", link.getAddress());
 
-        cell = sheet.getRow(1).getCell((short)0);
+        cell = sheet.getRow(1).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("link1.xls", link.getAddress());
 
-        cell = sheet.getRow(2).getCell((short)0);
+        cell = sheet.getRow(2).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("mailto:poi@apache.org?subject=Hyperlinks", link.getAddress());
 
-        cell = sheet.getRow(3).getCell((short)0);
+        cell = sheet.getRow(3).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("'Target Sheet'!A1", link.getAddress());
@@ -174,12 +174,12 @@
 
         HSSFSheet sheet = wb.cloneSheet(0);
 
-        cell = sheet.getRow(4).getCell((short)0);
+        cell = sheet.getRow(4).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("http://poi.apache.org/", link.getAddress());
 
-        cell = sheet.getRow(8).getCell((short)0);
+        cell = sheet.getRow(8).getCell(0);
         link = cell.getHyperlink();
         assertNotNull(link);
         assertEquals("http://poi.apache.org/hssf/", link.getAddress());

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFOptimiser.java Mon Aug 25 15:41:08 2008
@@ -107,13 +107,13 @@
 		HSSFRichTextString rtr1 = new HSSFRichTextString("Test");
 		rtr1.applyFont(0, 2, f1);
 		rtr1.applyFont(3, 4, f2);
-		r.createCell((short)0).setCellValue(rtr1);
+		r.createCell(0).setCellValue(rtr1);
 		
 		HSSFRichTextString rtr2 = new HSSFRichTextString("AlsoTest");
 		rtr2.applyFont(0, 2, f3);
 		rtr2.applyFont(3, 5, f5);
 		rtr2.applyFont(6, 8, f6);
-		r.createCell((short)1).setCellValue(rtr2);
+		r.createCell(1).setCellValue(rtr2);
 		
 		
 		// Check what we have now
@@ -198,14 +198,14 @@
 		HSSFSheet s = wb.createSheet();
 		HSSFRow r = s.createRow(0);
 		
-		r.createCell((short)0).setCellStyle(cs1);
-		r.createCell((short)1).setCellStyle(cs2);
-		r.createCell((short)2).setCellStyle(cs3);
-		r.createCell((short)3).setCellStyle(cs4);
-		r.createCell((short)4).setCellStyle(cs5);
-		r.createCell((short)5).setCellStyle(cs6);
-		r.createCell((short)6).setCellStyle(cs1);
-		r.createCell((short)7).setCellStyle(cs2);
+		r.createCell(0).setCellStyle(cs1);
+		r.createCell(1).setCellStyle(cs2);
+		r.createCell(2).setCellStyle(cs3);
+		r.createCell(3).setCellStyle(cs4);
+		r.createCell(4).setCellStyle(cs5);
+		r.createCell(5).setCellStyle(cs6);
+		r.createCell(6).setCellStyle(cs1);
+		r.createCell(7).setCellStyle(cs2);
 		
 		assertEquals(21, r.getCell(0).getCellValueRecord().getXFIndex());
 		assertEquals(26, r.getCell(5).getCellValueRecord().getXFIndex());

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFPalette.java Mon Aug 25 15:41:08 2008
@@ -94,11 +94,11 @@
         
         HSSFPalette p = book.getCustomPalette();
         
-        HSSFCell cellA = book.getSheetAt(0).getRow(0).getCell((short)0);
-        HSSFCell cellB = book.getSheetAt(0).getRow(1).getCell((short)0);
-        HSSFCell cellC = book.getSheetAt(0).getRow(2).getCell((short)0);
-        HSSFCell cellD = book.getSheetAt(0).getRow(3).getCell((short)0);
-        HSSFCell cellE = book.getSheetAt(0).getRow(4).getCell((short)0);
+        HSSFCell cellA = book.getSheetAt(0).getRow(0).getCell(0);
+        HSSFCell cellB = book.getSheetAt(0).getRow(1).getCell(0);
+        HSSFCell cellC = book.getSheetAt(0).getRow(2).getCell(0);
+        HSSFCell cellD = book.getSheetAt(0).getRow(3).getCell(0);
+        HSSFCell cellE = book.getSheetAt(0).getRow(4).getCell(0);
         
         // Plain
         assertEquals("I'm plain", cellA.getStringCellValue());

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java Mon Aug 25 15:41:08 2008
@@ -36,16 +36,16 @@
         assertEquals(-1, row.getFirstCellNum());
         assertEquals(-1, row.getLastCellNum());
 
-        row.createCell((short) 2);
+        row.createCell(2);
         assertEquals(2, row.getFirstCellNum());
         assertEquals(3, row.getLastCellNum());
 
-        row.createCell((short) 1);
+        row.createCell(1);
         assertEquals(1, row.getFirstCellNum());
         assertEquals(3, row.getLastCellNum());
 
         // check the exact case reported in 'bug' 43901 - notice that the cellNum is '0' based
-        row.createCell((short) 3);
+        row.createCell(3);
         assertEquals(1, row.getFirstCellNum());
         assertEquals(4, row.getLastCellNum());
     }
@@ -59,20 +59,20 @@
         HSSFSheet sheet = workbook.createSheet();
         HSSFRow rowA = sheet.createRow(0);
 
-        rowA.createCell((short) 10);
-        rowA.createCell((short) 5);
+        rowA.createCell(10);
+        rowA.createCell(5);
         assertEquals(5, rowA.getFirstCellNum());
         assertEquals(11, rowA.getLastCellNum());
 
         HSSFRow rowB = sheet.createRow(1);
-        rowB.createCell((short) 15);
-        rowB.createCell((short) 30);
+        rowB.createCell(15);
+        rowB.createCell(30);
         assertEquals(15, rowB.getFirstCellNum());
         assertEquals(31, rowB.getLastCellNum());
 
         assertEquals(5, rowA.getFirstCellNum());
         assertEquals(11, rowA.getLastCellNum());
-        rowA.createCell((short) 50);
+        rowA.createCell(50);
         assertEquals(51, rowA.getLastCellNum());
 
         assertEquals(31, rowB.getLastCellNum());
@@ -81,19 +81,19 @@
     public void testRemoveCell() {
         HSSFWorkbook workbook = new HSSFWorkbook();
         HSSFSheet sheet = workbook.createSheet();
-        HSSFRow row = sheet.createRow((short) 0);
+        HSSFRow row = sheet.createRow(0);
         assertEquals(-1, row.getLastCellNum());
         assertEquals(-1, row.getFirstCellNum());
-        row.createCell((short) 1);
+        row.createCell(1);
         assertEquals(2, row.getLastCellNum());
         assertEquals(1, row.getFirstCellNum());
-        row.createCell((short) 3);
+        row.createCell(3);
         assertEquals(4, row.getLastCellNum());
         assertEquals(1, row.getFirstCellNum());
-        row.removeCell(row.getCell((short) 3));
+        row.removeCell(row.getCell(3));
         assertEquals(2, row.getLastCellNum());
         assertEquals(1, row.getFirstCellNum());
-        row.removeCell(row.getCell((short) 1));
+        row.removeCell(row.getCell(1));
         assertEquals(-1, row.getLastCellNum());
         assertEquals(-1, row.getFirstCellNum());
 
@@ -114,18 +114,18 @@
     public void testMoveCell() {
         HSSFWorkbook workbook = new HSSFWorkbook();
         HSSFSheet sheet = workbook.createSheet();
-        HSSFRow row = sheet.createRow((short) 0);
-        HSSFRow rowB = sheet.createRow((short) 1);
+        HSSFRow row = sheet.createRow(0);
+        HSSFRow rowB = sheet.createRow(1);
 
-        HSSFCell cellA2 = rowB.createCell((short)0);
+        HSSFCell cellA2 = rowB.createCell(0);
         assertEquals(0, rowB.getFirstCellNum());
         assertEquals(0, rowB.getFirstCellNum());
 
         assertEquals(-1, row.getLastCellNum());
         assertEquals(-1, row.getFirstCellNum());
-        HSSFCell cellB2 = row.createCell((short) 1);
-        HSSFCell cellB3 = row.createCell((short) 2);
-        HSSFCell cellB4 = row.createCell((short) 3);
+        HSSFCell cellB2 = row.createCell(1);
+        HSSFCell cellB3 = row.createCell(2);
+        HSSFCell cellB4 = row.createCell(3);
 
         assertEquals(1, row.getFirstCellNum());
         assertEquals(4, row.getLastCellNum());
@@ -147,10 +147,10 @@
         }
 
         // Move somewhere spare
-        assertNotNull(row.getCell((short)1));
+        assertNotNull(row.getCell(1));
         row.moveCell(cellB2, (short)5);
-        assertNull(row.getCell((short)1));
-        assertNotNull(row.getCell((short)5));
+        assertNull(row.getCell(1));
+        assertNotNull(row.getCell(5));
 
         assertEquals(5, cellB2.getCellNum());
         assertEquals(2, row.getFirstCellNum());
@@ -161,7 +161,7 @@
       HSSFWorkbook workbook = new HSSFWorkbook();
       HSSFSheet sheet = workbook.createSheet();
       //Test low row bound
-      sheet.createRow( (short) 0);
+      sheet.createRow(0);
       //Test low row bound exception
       try {
         sheet.createRow(-1);
@@ -200,9 +200,9 @@
 
         // Create two cells, will return one higher
         //  than that for the last number
-        row.createCell((short) 0);
+        row.createCell(0);
         assertEquals(1, row.getLastCellNum());
-        row.createCell((short) 255);
+        row.createCell(255);
         assertEquals(256, row.getLastCellNum());
     }
     
@@ -220,10 +220,10 @@
         // 3 missing
         // 4 -> blank
         // 5 -> num
-        row.createCell((short)0).setCellValue(new HSSFRichTextString("test"));
-        row.createCell((short)1).setCellValue(3.2);
-        row.createCell((short)4, HSSFCell.CELL_TYPE_BLANK);
-        row.createCell((short)5).setCellValue(4);
+        row.createCell(0).setCellValue(new HSSFRichTextString("test"));
+        row.createCell(1).setCellValue(3.2);
+        row.createCell(4, HSSFCell.CELL_TYPE_BLANK);
+        row.createCell(5).setCellValue(4);
         
         // First up, no policy given, uses default
         assertEquals(HSSFCell.CELL_TYPE_STRING,  row.getCell(0).getCellType());
@@ -281,12 +281,12 @@
     public void testRowHeight() {
         HSSFWorkbook workbook = new HSSFWorkbook();
         HSSFSheet sheet = workbook.createSheet();
-        HSSFRow row1 = sheet.createRow( (short) 0);
+        HSSFRow row1 = sheet.createRow(0);
 
         assertEquals(0xFF, row1.getHeight());
         assertEquals(sheet.getDefaultRowHeight(), row1.getHeight());
 
-        HSSFRow row2 = sheet.createRow( (short) 1);
+        HSSFRow row2 = sheet.createRow(1);
         row2.setHeight((short)400);
 
         assertEquals(400, row2.getHeight());

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFSheet.java Mon Aug 25 15:41:08 2008
@@ -146,10 +146,10 @@
 	public void testReadBooleans() {
 		HSSFWorkbook workbook = new HSSFWorkbook();
 		HSSFSheet sheet = workbook.createSheet("Test boolean");
-		HSSFRow row = sheet.createRow((short) 2);
-		HSSFCell cell = row.createCell((short) 9);
+		HSSFRow row = sheet.createRow(2);
+		HSSFCell cell = row.createCell(9);
 		cell.setCellValue(true);
-		cell = row.createCell((short) 11);
+		cell = row.createCell(11);
 		cell.setCellValue(true);
 		
 		workbook = HSSFTestDataSamples.writeOutAndReadBack(workbook);
@@ -163,7 +163,7 @@
 	public void testRemoveRow() {
 		HSSFWorkbook workbook = new HSSFWorkbook();
 		HSSFSheet sheet = workbook.createSheet("Test boolean");
-		HSSFRow row = sheet.createRow((short) 2);
+		HSSFRow row = sheet.createRow(2);
 		sheet.removeRow(row);
 	}
 
@@ -185,8 +185,8 @@
 		HSSFWorkbook workbook = new HSSFWorkbook();
 		HSSFSheet sheet = workbook.createSheet("Test Clone");
 		HSSFRow row = sheet.createRow(0);
-		HSSFCell cell = row.createCell((short) 0);
-		HSSFCell cell2 = row.createCell((short) 1);
+		HSSFCell cell = row.createCell(0);
+		HSSFCell cell2 = row.createCell(1);
 		cell.setCellValue(new HSSFRichTextString("clone_test"));
 		cell2.setCellFormula("sin(1)");
 
@@ -215,8 +215,8 @@
 	public void testCloneSheetMultipleTimes() {
 		HSSFWorkbook workbook = new HSSFWorkbook();
 		HSSFSheet sheet = workbook.createSheet("Test Clone");
-		HSSFRow row = sheet.createRow((short) 0);
-		HSSFCell cell = row.createCell((short) 0);
+		HSSFRow row = sheet.createRow(0);
+		HSSFCell cell = row.createCell(0);
 		cell.setCellValue(new HSSFRichTextString("clone_test"));
 		//Clone the sheet multiple times
 		workbook.cloneSheet(0);
@@ -509,11 +509,11 @@
 		HSSFWorkbook wb = new HSSFWorkbook();
 		HSSFSheet sheet = wb.createSheet();
 		HSSFRow row = sheet.createRow(0);
-		HSSFCell cell = row.createCell((short)0);
+		HSSFCell cell = row.createCell(0);
 		cell.setCellValue(new HSSFRichTextString("first row, first cell"));
 
 		row = sheet.createRow(1);
-		cell = row.createCell((short)1);
+		cell = row.createCell(1);
 		cell.setCellValue(new HSSFRichTextString("second row, second cell"));
 
 		CellRangeAddress region = new CellRangeAddress(1, 1, 0, 1);
@@ -616,13 +616,13 @@
 		HSSFWorkbook wb = new HSSFWorkbook();
 		HSSFSheet s = wb.createSheet("Sheet1");
 		HSSFRow r = s.createRow(0);
-		r.createCell((short) 0).setCellValue(1);
-		r.createCell((short) 1).setCellFormula("A1*2");
+		r.createCell(0).setCellValue(1);
+		r.createCell(1).setCellFormula("A1*2");
 		HSSFSheet s1 = wb.cloneSheet(0);
 		r = s1.getRow(0);
-		assertEquals("double", r.getCell((short) 0).getNumericCellValue(), 1, 0); // sanity check
-		assertNotNull(r.getCell((short) 1));
-		assertEquals("formula", r.getCell((short) 1).getCellFormula(), "A1*2");
+		assertEquals("double", r.getCell(0).getNumericCellValue(), 1, 0); // sanity check
+		assertNotNull(r.getCell(1));
+		assertEquals("formula", r.getCell(1).getCellFormula(), "A1*2");
 	}
 
 	/** test that new default column styles get applied */
@@ -632,7 +632,7 @@
 		HSSFSheet s = wb.createSheet();
 		s.setDefaultColumnStyle((short) 0, style);
 		HSSFRow r = s.createRow(0);
-		HSSFCell c = r.createCell((short) 0);
+		HSSFCell c = r.createCell(0);
 		assertEquals("style should match", style.getIndex(), c.getCellStyle().getIndex());
 	}
 
@@ -709,8 +709,8 @@
 		HSSFSheet sheet = workbook.getSheetAt(0);
 		HSSFSheet sheet2 = workbook.getSheetAt(0);
 		HSSFRow row = sheet.getRow(0);
-		row.createCell((short) 0).setCellValue(5);
-		row.createCell((short) 1).setCellValue(8);
+		row.createCell(0).setCellValue(5);
+		row.createCell(1).setCellValue(8);
 		assertFalse(sheet.getForceFormulaRecalculation());
 		assertFalse(sheet2.getForceFormulaRecalculation());
 

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFWorkbook.java Mon Aug 25 15:41:08 2008
@@ -290,10 +290,10 @@
         assertEquals(true, sheet3.isActive());
 
         if (false) { // helpful if viewing this workbook in excel:
-            sheet1.createRow(0).createCell((short)0).setCellValue(new HSSFRichTextString("Sheet1"));
-            sheet2.createRow(0).createCell((short)0).setCellValue(new HSSFRichTextString("Sheet2"));
-            sheet3.createRow(0).createCell((short)0).setCellValue(new HSSFRichTextString("Sheet3"));
-            sheet4.createRow(0).createCell((short)0).setCellValue(new HSSFRichTextString("Sheet4"));
+            sheet1.createRow(0).createCell(0).setCellValue(new HSSFRichTextString("Sheet1"));
+            sheet2.createRow(0).createCell(0).setCellValue(new HSSFRichTextString("Sheet2"));
+            sheet3.createRow(0).createCell(0).setCellValue(new HSSFRichTextString("Sheet3"));
+            sheet4.createRow(0).createCell(0).setCellValue(new HSSFRichTextString("Sheet4"));
 
             try {
                 File fOut = TempFile.createTempFile("sheetMultiSelect", ".xls");

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java Mon Aug 25 15:41:08 2008
@@ -39,14 +39,14 @@
         HSSFWorkbook workbook  = HSSFTestDataSamples.openSampleWorkbook("SimpleChart.xls");
         HSSFSheet       sheet     = workbook.getSheetAt(0);
         HSSFRow         firstRow  = sheet.getRow(0);
-        HSSFCell        firstCell = firstRow.getCell(( short ) 0);
+        HSSFCell        firstCell = firstRow.getCell(0);
 
         //System.out.println("first assertion for date");
         assertEquals(new GregorianCalendar(2000, 0, 1, 10, 51, 2).getTime(),
                      HSSFDateUtil
                          .getJavaDate(firstCell.getNumericCellValue(), false));
-        HSSFRow  row  = sheet.createRow(( short ) 15);
-        HSSFCell cell = row.createCell(( short ) 1);
+        HSSFRow  row  = sheet.createRow(15);
+        HSSFCell cell = row.createCell(1);
 
         cell.setCellValue(22);
         Sheet newSheet = workbook.getSheetAt(0).getSheet();

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetHiding.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetHiding.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetHiding.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetHiding.java Mon Aug 25 15:41:08 2008
@@ -61,10 +61,10 @@
 		assertEquals(1, wbU.getSheetAt(1).getRow(0).getLastCellNum());
 
 		// Text should be sheet based
-		assertEquals("Sheet1A1", wbH.getSheetAt(0).getRow(0).getCell((short)0).getRichStringCellValue().getString());
-		assertEquals("Sheet2A1", wbH.getSheetAt(1).getRow(0).getCell((short)0).getRichStringCellValue().getString());
-		assertEquals("Sheet1A1", wbU.getSheetAt(0).getRow(0).getCell((short)0).getRichStringCellValue().getString());
-		assertEquals("Sheet2A1", wbU.getSheetAt(1).getRow(0).getCell((short)0).getRichStringCellValue().getString());
+		assertEquals("Sheet1A1", wbH.getSheetAt(0).getRow(0).getCell(0).getRichStringCellValue().getString());
+		assertEquals("Sheet2A1", wbH.getSheetAt(1).getRow(0).getCell(0).getRichStringCellValue().getString());
+		assertEquals("Sheet1A1", wbU.getSheetAt(0).getRow(0).getCell(0).getRichStringCellValue().getString());
+		assertEquals("Sheet2A1", wbU.getSheetAt(1).getRow(0).getCell(0).getRichStringCellValue().getString());
 	}
 
 	/**

Modified: poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetShiftRows.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetShiftRows.java?rev=688910&r1=688909&r2=688910&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetShiftRows.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hssf/usermodel/TestSheetShiftRows.java Mon Aug 25 15:41:08 2008
@@ -99,8 +99,8 @@
     public void testShiftRow(){
        HSSFWorkbook b = new HSSFWorkbook();
        HSSFSheet s    = b.createSheet();
-       s.createRow(0).createCell((short)0).setCellValue("TEST1");
-       s.createRow(3).createCell((short)0).setCellValue("TEST2");
+       s.createRow(0).createCell(0).setCellValue("TEST1");
+       s.createRow(3).createCell(0).setCellValue("TEST2");
        s.shiftRows(0,4,1);
     }
 
@@ -112,8 +112,8 @@
     public void testShiftRow0(){
        HSSFWorkbook b = new HSSFWorkbook();
        HSSFSheet s    = b.createSheet();
-       s.createRow(0).createCell((short)0).setCellValue("TEST1");
-       s.createRow(3).createCell((short)0).setCellValue("TEST2");
+       s.createRow(0).createCell(0).setCellValue("TEST1");
+       s.createRow(3).createCell(0).setCellValue("TEST2");
        s.shiftRows(0,4,1);
     }
 
@@ -125,7 +125,7 @@
       HSSFWorkbook b = new HSSFWorkbook();
       HSSFSheet s    = b.createSheet();
       HSSFRow row = s.createRow(4);
-      row.createCell((short)0).setCellValue("test");
+      row.createCell(0).setCellValue("test");
       s.setRowBreak(4);
 
       s.shiftRows(4, 4, 2);
@@ -203,34 +203,34 @@
         HSSFSheet sheet = wb.getSheet("Sheet1");
         assertEquals(19, sheet.getLastRowNum());
 
-        assertEquals("cell B1 (ref)", sheet.getRow(0).getCell((short)3).getRichStringCellValue().toString());
-        assertEquals("CONCATENATE(B1,\" (ref)\")", sheet.getRow(0).getCell((short)3).getCellFormula());
-        assertEquals("cell B2 (ref)", sheet.getRow(1).getCell((short)3).getRichStringCellValue().toString());
-        assertEquals("CONCATENATE(B2,\" (ref)\")", sheet.getRow(1).getCell((short)3).getCellFormula());
-        assertEquals("cell B3 (ref)", sheet.getRow(2).getCell((short)3).getRichStringCellValue().toString());
-        assertEquals("CONCATENATE(B3,\" (ref)\")", sheet.getRow(2).getCell((short)3).getCellFormula());
-        assertEquals("cell B2 (ref)", sheet.getRow(6).getCell((short)1).getRichStringCellValue().toString());
-        assertEquals("CONCATENATE(B2,\" (ref)\")", sheet.getRow(6).getCell((short)1).getCellFormula());
+        assertEquals("cell B1 (ref)", sheet.getRow(0).getCell(3).getRichStringCellValue().toString());
+        assertEquals("CONCATENATE(B1,\" (ref)\")", sheet.getRow(0).getCell(3).getCellFormula());
+        assertEquals("cell B2 (ref)", sheet.getRow(1).getCell(3).getRichStringCellValue().toString());
+        assertEquals("CONCATENATE(B2,\" (ref)\")", sheet.getRow(1).getCell(3).getCellFormula());
+        assertEquals("cell B3 (ref)", sheet.getRow(2).getCell(3).getRichStringCellValue().toString());
+        assertEquals("CONCATENATE(B3,\" (ref)\")", sheet.getRow(2).getCell(3).getCellFormula());
+        assertEquals("cell B2 (ref)", sheet.getRow(6).getCell(1).getRichStringCellValue().toString());
+        assertEquals("CONCATENATE(B2,\" (ref)\")", sheet.getRow(6).getCell(1).getCellFormula());
 
         sheet.shiftRows(1, 1, 10);
 
         // Row 1 => Row 11
         // So strings on row 11 unchanged, but reference in formula is
-        assertEquals("cell B1 (ref)", sheet.getRow(0).getCell((short)3).getRichStringCellValue().toString());
-        assertEquals("CONCATENATE(B1,\" (ref)\")", sheet.getRow(0).getCell((short)3).getCellFormula());
+        assertEquals("cell B1 (ref)", sheet.getRow(0).getCell(3).getRichStringCellValue().toString());
+        assertEquals("CONCATENATE(B1,\" (ref)\")", sheet.getRow(0).getCell(3).getCellFormula());
         assertEquals(0, sheet.getRow(1).getPhysicalNumberOfCells());
 
         // still save b2
-        assertEquals("cell B2 (ref)", sheet.getRow(11).getCell((short)3).getRichStringCellValue().toString());
+        assertEquals("cell B2 (ref)", sheet.getRow(11).getCell(3).getRichStringCellValue().toString());
         // but points to b12
-        assertEquals("CONCATENATE(B12,\" (ref)\")", sheet.getRow(11).getCell((short)3).getCellFormula());
+        assertEquals("CONCATENATE(B12,\" (ref)\")", sheet.getRow(11).getCell(3).getCellFormula());
 
-        assertEquals("cell B3 (ref)", sheet.getRow(2).getCell((short)3).getRichStringCellValue().toString());
-        assertEquals("CONCATENATE(B3,\" (ref)\")", sheet.getRow(2).getCell((short)3).getCellFormula());
+        assertEquals("cell B3 (ref)", sheet.getRow(2).getCell(3).getRichStringCellValue().toString());
+        assertEquals("CONCATENATE(B3,\" (ref)\")", sheet.getRow(2).getCell(3).getCellFormula());
 
         // one on a non-shifted row also updated
-        assertEquals("cell B2 (ref)", sheet.getRow(6).getCell((short)1).getRichStringCellValue().toString());
-        assertEquals("CONCATENATE(B12,\" (ref)\")", sheet.getRow(6).getCell((short)1).getCellFormula());
+        assertEquals("cell B2 (ref)", sheet.getRow(6).getCell(1).getRichStringCellValue().toString());
+        assertEquals("CONCATENATE(B12,\" (ref)\")", sheet.getRow(6).getCell(1).getCellFormula());
     }
 }
 



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


Mime
View raw message