aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2018-02-20 00:25:43 +0000
committerPJ Fanning <fanningpj@apache.org>2018-02-20 00:25:43 +0000
commit05b0de574cce4c56fc862737242846df4abc2e6e (patch)
treed63312db51c79e1cc39a0ece41bcc59669ab164e /src/testcases
parent61b0d86a2d0c1444b77fda00d2450cf289322300 (diff)
downloadpoi-05b0de574cce4c56fc862737242846df4abc2e6e.tar.gz
poi-05b0de574cce4c56fc862737242846df4abc2e6e.zip
[bug-62018] use ints to index fonts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1824826 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases')
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java10
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java2
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
index 49309d93e6..2b40d37577 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
@@ -1013,19 +1013,19 @@ public abstract class BaseTestBugzillaIssues {
Workbook wb = _testDataProvider.createWorkbook();
int startingFonts = wb instanceof HSSFWorkbook ? 4 : 1;
- assertEquals(startingFonts, wb.getNumberOfFonts());
+ assertEquals(startingFonts, wb.getNumberOfFontsAsInt());
// Get a font, and slightly change it
Font a = wb.createFont();
- assertEquals(startingFonts+1, wb.getNumberOfFonts());
+ assertEquals(startingFonts+1, wb.getNumberOfFontsAsInt());
a.setFontHeightInPoints((short)23);
- assertEquals(startingFonts+1, wb.getNumberOfFonts());
+ assertEquals(startingFonts+1, wb.getNumberOfFontsAsInt());
// Get two more, unchanged
/*Font b =*/ wb.createFont();
- assertEquals(startingFonts+2, wb.getNumberOfFonts());
+ assertEquals(startingFonts+2, wb.getNumberOfFontsAsInt());
/*Font c =*/ wb.createFont();
- assertEquals(startingFonts+3, wb.getNumberOfFonts());
+ assertEquals(startingFonts+3, wb.getNumberOfFontsAsInt());
wb.close();
}
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
index 59536005a1..acf0999922 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
@@ -276,7 +276,7 @@ public abstract class BaseTestCell {
cs = c.getCellStyle();
assertNotNull("Formula Cell Style", cs);
- assertEquals("Font Index Matches", f.getIndex(), cs.getFontIndex());
+ 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());
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java
index 5657babed8..30756ab609 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestFont.java
@@ -58,7 +58,7 @@ public abstract class BaseTestFont {
@Test
public final void testGetNumberOfFonts() throws IOException {
Workbook wb = _testDataProvider.createWorkbook();
- int num0 = wb.getNumberOfFonts();
+ int num0 = wb.getNumberOfFontsAsInt();
Font f1=wb.createFont();
f1.setBold(true);