diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-12-09 16:59:51 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-12-09 16:59:51 +0000 |
commit | a42127e15b941e250920d3c6b81e22fb89390ba1 (patch) | |
tree | 2cb350090ecba62a7fbd9165b8a00f551792a3cf /src/testcases/org/apache/poi/ss | |
parent | bc1569e7866fe075424ce5f92a6e28783c595edc (diff) | |
download | poi-a42127e15b941e250920d3c6b81e22fb89390ba1.tar.gz poi-a42127e15b941e250920d3c6b81e22fb89390ba1.zip |
remove more deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884259 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/ss')
4 files changed, 8 insertions, 8 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java index 4579cefadd..1fa9580f55 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java @@ -395,7 +395,7 @@ public abstract class BaseTestBugzillaIssues { cell0.setCellValue(longValue); // autoSize will fail if required fonts are not installed, skip this test then - Font font = wb.getFontAt(cell0.getCellStyle().getFontIndexAsInt()); + Font font = wb.getFontAt(cell0.getCellStyle().getFontIndex()); Assume.assumeTrue("Cannot verify autoSizeColumn() because the necessary Fonts are not installed on this machine: " + font, SheetUtil.canComputeColumnWidth(font)); diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java index e2032de2df..43d33d3d3f 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java @@ -312,7 +312,7 @@ public abstract class BaseTestCell { cs = c.getCellStyle(); assertNotNull("Formula Cell Style", cs); - assertEquals("Font Index Matches", f.getIndexAsInt(), cs.getFontIndexAsInt()); + assertEquals("Font Index Matches", f.getIndexAsInt(), cs.getFontIndex()); assertEquals("Top Border", BorderStyle.THIN, cs.getBorderTop()); assertEquals("Left Border", BorderStyle.THIN, cs.getBorderLeft()); assertEquals("Right Border", BorderStyle.THIN, cs.getBorderRight()); @@ -731,7 +731,7 @@ public abstract class BaseTestCell { assertTrue(style.getLocked()); assertFalse(style.getHidden()); assertEquals(0, style.getIndention()); - assertEquals(0, style.getFontIndexAsInt()); + assertEquals(0, style.getFontIndex()); assertEquals(HorizontalAlignment.GENERAL, style.getAlignment()); assertEquals(0, style.getDataFormat()); assertFalse(style.getWrapText()); diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java index 30d80a73c7..92a566888f 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java @@ -121,7 +121,7 @@ public abstract class BaseTestFont { s1 = wb2.getSheetAt(0); assertEquals(num0 + 1, wb2.getNumberOfFonts()); - int idx = s1.getRow(0).getCell(0).getCellStyle().getFontIndexAsInt(); + int idx = s1.getRow(0).getCell(0).getCellStyle().getFontIndex(); Font fnt = wb2.getFontAt(idx); assertNotNull(fnt); assertEquals(IndexedColors.YELLOW.getIndex(), fnt.getColor()); diff --git a/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java b/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java index 416dd4d55b..5523827cc5 100644 --- a/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java +++ b/src/testcases/org/apache/poi/ss/util/BaseTestCellUtil.java @@ -313,17 +313,17 @@ public abstract class BaseTestCellUtil { // should be assertSame, but a new HSSFCellStyle is returned for each getCellStyle() call. // HSSFCellStyle wraps an underlying style record, and the underlying // style record is the same between multiple getCellStyle() calls. - assertEquals(defaultFontIndex, A1.getCellStyle().getFontIndexAsInt()); - assertEquals(defaultFontIndex, B1.getCellStyle().getFontIndexAsInt()); + assertEquals(defaultFontIndex, A1.getCellStyle().getFontIndex()); + assertEquals(defaultFontIndex, B1.getCellStyle().getFontIndex()); // get/set alignment modifies the cell's style CellUtil.setFont(A1, font); - assertEquals(customFontIndex, A1.getCellStyle().getFontIndexAsInt()); + assertEquals(customFontIndex, A1.getCellStyle().getFontIndex()); // get/set alignment doesn't affect the style of cells with // the same style prior to modifying the style assertNotEquals(A1.getCellStyle(), B1.getCellStyle()); - assertEquals(defaultFontIndex, B1.getCellStyle().getFontIndexAsInt()); + assertEquals(defaultFontIndex, B1.getCellStyle().getFontIndex()); wb.close(); } |