diff options
Diffstat (limited to 'src/testcases/org/apache')
6 files changed, 14 insertions, 15 deletions
diff --git a/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndexFunctionFromSpreadsheet.java b/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndexFunctionFromSpreadsheet.java index 2b0f776f73..e40578033d 100644 --- a/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndexFunctionFromSpreadsheet.java +++ b/src/testcases/org/apache/poi/hssf/record/formula/functions/TestIndexFunctionFromSpreadsheet.java @@ -205,10 +205,10 @@ public final class TestIndexFunctionFromSpreadsheet extends TestCase { } - private static String formatTestCaseDetails(String sheetName, int rowNum, HSSFCell c) { + private static String formatTestCaseDetails(String sheetName, int rowIndex, HSSFCell c) { StringBuffer sb = new StringBuffer(); - CellReference cr = new CellReference(sheetName, rowNum, c.getCellNum(), false, false); + CellReference cr = new CellReference(sheetName, rowIndex, c.getColumnIndex(), false, false); sb.append(cr.formatAsString()); sb.append(" {=").append(c.getCellFormula()).append("}"); return sb.toString(); diff --git a/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLookupFunctionsFromSpreadsheet.java b/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLookupFunctionsFromSpreadsheet.java index 5bacdbfca9..b0b6ece7f1 100644 --- a/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLookupFunctionsFromSpreadsheet.java +++ b/src/testcases/org/apache/poi/hssf/record/formula/functions/TestLookupFunctionsFromSpreadsheet.java @@ -256,11 +256,11 @@ public final class TestLookupFunctionsFromSpreadsheet extends TestCase { } - private static String formatTestCaseDetails(String sheetName, int rowNum, HSSFCell c, String currentGroupComment, + private static String formatTestCaseDetails(String sheetName, int rowIndex, HSSFCell c, String currentGroupComment, String rowComment) { StringBuffer sb = new StringBuffer(); - CellReference cr = new CellReference(sheetName, rowNum, c.getCellNum(), false, false); + CellReference cr = new CellReference(sheetName, rowIndex, c.getColumnIndex(), false, false); sb.append(cr.formatAsString()); sb.append(" {=").append(c.getCellFormula()).append("}"); diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java index 73ee3f8486..2c2c2ea0c3 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBug42464.java @@ -66,7 +66,7 @@ public final class TestBug42464 extends TestCase { FormulaRecord r = record.getFormulaRecord(); Ptg[] ptgs = r.getParsedExpression(); - String cellRef = new CellReference(row.getRowNum(), cell.getCellNum(), false, false).formatAsString(); + String cellRef = new CellReference(row.getRowNum(), cell.getColumnIndex(), false, false).formatAsString(); if(false && cellRef.equals("BP24")) { // TODO - replace System.out.println()s with asserts System.out.print(cellRef); System.out.println(" - has " + ptgs.length + " ptgs:"); diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java index 0178d336fe..4c8604b698 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java @@ -619,7 +619,7 @@ public final class TestBugs extends TestCase { int cellNum = 0; for (Iterator it2 = row.cellIterator(); it2.hasNext(); cellNum++) { HSSFCell cell = (HSSFCell)it2.next(); - assertEquals(cellNum, cell.getCellNum()); + assertEquals(cellNum, cell.getColumnIndex()); } } } diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java index 4ea0762dda..9525a181a1 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFComment.java @@ -134,7 +134,7 @@ public final class TestHSSFComment extends TestCase { assertFalse("cells in the second column have not empyy notes", "".equals(comment.getString().getString())); assertEquals(rownum, comment.getRow()); - assertEquals(cell.getCellNum(), comment.getColumn()); + assertEquals(cell.getColumnIndex(), comment.getColumn()); } } diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java index c9b3bc74d1..8e7864fad2 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFRow.java @@ -20,7 +20,6 @@ package org.apache.poi.hssf.usermodel; import junit.framework.TestCase; import org.apache.poi.hssf.HSSFTestDataSamples; -import org.apache.poi.ss.usermodel.Row.MissingCellPolicy; /** * Test HSSFRow is okay. @@ -152,7 +151,7 @@ public final class TestHSSFRow extends TestCase { assertNull(row.getCell(1)); assertNotNull(row.getCell(5)); - assertEquals(5, cellB2.getCellNum()); + assertEquals(5, cellB2.getColumnIndex()); assertEquals(2, row.getFirstCellNum()); assertEquals(6, row.getLastCellNum()); } @@ -258,12 +257,12 @@ public final class TestHSSFRow extends TestCase { assertEquals(HSSFCell.CELL_TYPE_NUMERIC, row.getCell(5, HSSFRow.CREATE_NULL_AS_BLANK).getCellType()); // Check created ones get the right column - assertEquals((short)0, row.getCell(0, HSSFRow.CREATE_NULL_AS_BLANK).getCellNum()); - assertEquals((short)1, row.getCell(1, HSSFRow.CREATE_NULL_AS_BLANK).getCellNum()); - assertEquals((short)2, row.getCell(2, HSSFRow.CREATE_NULL_AS_BLANK).getCellNum()); - assertEquals((short)3, row.getCell(3, HSSFRow.CREATE_NULL_AS_BLANK).getCellNum()); - assertEquals((short)4, row.getCell(4, HSSFRow.CREATE_NULL_AS_BLANK).getCellNum()); - assertEquals((short)5, row.getCell(5, HSSFRow.CREATE_NULL_AS_BLANK).getCellNum()); + assertEquals(0, row.getCell(0, HSSFRow.CREATE_NULL_AS_BLANK).getColumnIndex()); + assertEquals(1, row.getCell(1, HSSFRow.CREATE_NULL_AS_BLANK).getColumnIndex()); + assertEquals(2, row.getCell(2, HSSFRow.CREATE_NULL_AS_BLANK).getColumnIndex()); + assertEquals(3, row.getCell(3, HSSFRow.CREATE_NULL_AS_BLANK).getColumnIndex()); + assertEquals(4, row.getCell(4, HSSFRow.CREATE_NULL_AS_BLANK).getColumnIndex()); + assertEquals(5, row.getCell(5, HSSFRow.CREATE_NULL_AS_BLANK).getColumnIndex()); // Now change the cell policy on the workbook, check |