aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-06-27 10:50:10 +0000
committerPJ Fanning <fanningpj@apache.org>2020-06-27 10:50:10 +0000
commitb12e13a041244de1511bb9c9878cae6eee285895 (patch)
tree7d814040da6cb7370f06ab2385a8d21784240050 /src/java/org
parent33261cd4d2bd88b279dd32f9ada75bfa4dd41d2b (diff)
downloadpoi-b12e13a041244de1511bb9c9878cae6eee285895.tar.gz
poi-b12e13a041244de1511bb9c9878cae6eee285895.zip
remove some deprecated Font methods from Workbook
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879259 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java12
-rw-r--r--src/java/org/apache/poi/ss/usermodel/Workbook.java18
2 files changed, 7 insertions, 23 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
index 31fc8d045e..db4fa77a0e 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
@@ -1196,20 +1196,14 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss
}
@Override
- @Deprecated
- public short getNumberOfFonts() {
- return (short) getNumberOfFontsAsInt();
- }
-
- @Override
- public int getNumberOfFontsAsInt() {
+ public int getNumberOfFonts() {
return workbook.getNumberOfFontRecords();
}
@Override
@Deprecated
- public HSSFFont getFontAt(short idx) {
- return getFontAt((int) idx);
+ public int getNumberOfFontsAsInt() {
+ return getNumberOfFonts();
}
@Override
diff --git a/src/java/org/apache/poi/ss/usermodel/Workbook.java b/src/java/org/apache/poi/ss/usermodel/Workbook.java
index 31c6896471..77cce0b226 100644
--- a/src/java/org/apache/poi/ss/usermodel/Workbook.java
+++ b/src/java/org/apache/poi/ss/usermodel/Workbook.java
@@ -264,11 +264,9 @@ public interface Workbook extends Closeable, Iterable<Sheet> {
/**
* Get the number of fonts in the font table
*
- * @return number of fonts
- * @deprecated use <code>getNumberOfFontsAsInt()</code> instead
+ * @return number of fonts (as int since POI 5.0.0)
*/
- @Removal(version = "4.2")
- short getNumberOfFonts();
+ int getNumberOfFonts();
/**
* Get the number of fonts in the font table
@@ -276,6 +274,8 @@ public interface Workbook extends Closeable, Iterable<Sheet> {
* @return number of fonts
* @since 4.0.0
*/
+ @Deprecated
+ @Removal(version = "6.0.0")
int getNumberOfFontsAsInt();
/**
@@ -283,16 +283,6 @@ public interface Workbook extends Closeable, Iterable<Sheet> {
*
* @param idx index number (0-based)
* @return font at the index
- * @deprecated use <code>getFontAt(int)</code>
- */
- @Removal(version = "4.2")
- Font getFontAt(short idx);
-
- /**
- * Get the font at the given index number
- *
- * @param idx index number (0-based)
- * @return font at the index
* @since 4.0.0
*/
Font getFontAt(int idx);