diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-12-09 16:55:30 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-12-09 16:55:30 +0000 |
commit | bc1569e7866fe075424ce5f92a6e28783c595edc (patch) | |
tree | 0bb1d7120af167c988d6bc30b73436c6553eb18e /src/java/org/apache/poi | |
parent | e7ef490dc939e7cda8adfce0df65f15cbb9cee62 (diff) | |
download | poi-bc1569e7866fe075424ce5f92a6e28783c595edc.tar.gz poi-bc1569e7866fe075424ce5f92a6e28783c595edc.zip |
remove more deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884257 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi')
6 files changed, 13 insertions, 201 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java b/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java index c3098820c5..f0de680a6a 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFBorderFormatting.java @@ -326,53 +326,6 @@ public final class HSSFBorderFormatting implements org.apache.poi.ss.usermodel.B return BorderStyle.NONE; } - @Override - public BorderStyle getBorderBottomEnum() { - return getBorderBottom(); - } - - @Override - public BorderStyle getBorderDiagonalEnum() { - return getBorderDiagonal(); - } - - @Override - public BorderStyle getBorderLeftEnum() { - return getBorderLeft(); - } - - @Override - public BorderStyle getBorderRightEnum() { - return getBorderRight(); - } - - @Override - public BorderStyle getBorderTopEnum() { - return getBorderTop(); - } - - /** - * HSSF doesn't support table borders, so always {@link BorderStyle#NONE} - * - * @see org.apache.poi.ss.usermodel.BorderFormatting#getBorderVertical() - */ - @Deprecated - @Override - public BorderStyle getBorderVerticalEnum() { - return getBorderVertical(); - } - - /** - * HSSF doesn't support table borders, so always {@link BorderStyle#NONE} - * - * @see org.apache.poi.ss.usermodel.BorderFormatting#getBorderHorizontal() - */ - @Deprecated - @Override - public BorderStyle getBorderHorizontalEnum() { - return getBorderHorizontal(); - } - /** * HSSF Doesn't support table borders, so always {@link HSSFColorPredefined#AUTOMATIC} * diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java index e97e6555f2..894c194ba0 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java @@ -35,6 +35,7 @@ import org.apache.poi.ss.usermodel.FillPatternType; import org.apache.poi.ss.usermodel.Font; import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.VerticalAlignment; +import org.apache.poi.util.Removal; /** * High level representation of the style of a cell in a sheet of a workbook. @@ -187,11 +188,11 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable { /** * gets the index of the font for this style - * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#getFontAt(short) + * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#getFontAt(int) + * @since 5.0.0 (used to return a short value) */ @Override - @Deprecated - public short getFontIndex() + public int getFontIndex() { return _format.getFontIndex(); } @@ -199,8 +200,11 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable { /** * gets the index of the font for this style * @see org.apache.poi.hssf.usermodel.HSSFWorkbook#getFontAt(int) + * @deprecated use {@link #getFontIndex()} instead * @since 4.0.0 */ + @Deprecated + @Removal(version = "6.0.0") @Override public int getFontIndexAsInt() { diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java b/src/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java index 40cf873306..735d921cc3 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFFontFormatting.java @@ -21,7 +21,6 @@ import org.apache.poi.hssf.record.CFRuleBase; import org.apache.poi.hssf.record.cf.FontFormatting; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.Color; -import org.apache.poi.util.Removal; /** * High level representation for Font Formatting component @@ -29,41 +28,6 @@ import org.apache.poi.util.Removal; */ @SuppressWarnings("unused") public final class HSSFFontFormatting implements org.apache.poi.ss.usermodel.FontFormatting { - /** - * Underline type - None - * @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_NONE} - */ - @Deprecated - @Removal(version = "5.0.0") - public final static byte U_NONE = org.apache.poi.ss.usermodel.Font.U_NONE; - /** - * Underline type - Single - * @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_SINGLE} - */ - @Deprecated - @Removal(version = "5.0.0") - public final static byte U_SINGLE = org.apache.poi.ss.usermodel.Font.U_SINGLE; - /** - * Underline type - Double - * @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_DOUBLE} - */ - @Deprecated - @Removal(version = "5.0.0") - public final static byte U_DOUBLE = org.apache.poi.ss.usermodel.Font.U_DOUBLE; - /** - * Underline type - Single Accounting - * @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_SINGLE_ACCOUNTING} - */ - @Deprecated - @Removal(version = "5.0.0") - public final static byte U_SINGLE_ACCOUNTING = org.apache.poi.ss.usermodel.Font.U_SINGLE_ACCOUNTING; - /** - * Underline type - Double Accounting - * @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_DOUBLE_ACCOUNTING} - */ - @Deprecated - @Removal(version = "5.0.0") - public final static byte U_DOUBLE_ACCOUNTING = org.apache.poi.ss.usermodel.Font.U_DOUBLE_ACCOUNTING; private final FontFormatting fontFormatting; private final HSSFWorkbook workbook; diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java index b3a74e69f8..e66658905f 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPicture.java @@ -36,62 +36,13 @@ import org.apache.poi.hssf.record.EscherAggregate; import org.apache.poi.hssf.record.ObjRecord; import org.apache.poi.ss.usermodel.ClientAnchor.AnchorType; import org.apache.poi.ss.usermodel.Picture; -import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.util.ImageUtils; -import org.apache.poi.util.Removal; import org.apache.poi.util.StringUtil; /** * Represents a escher picture. Eg. A GIF, JPEG etc... */ public class HSSFPicture extends HSSFSimpleShape implements Picture { - /** - * Windows Enhanced Metafile - * @deprecated use {@link Workbook#PICTURE_TYPE_EMF} - */ - @Removal(version = "5.0.0") - @Deprecated - public static final int PICTURE_TYPE_EMF = Workbook.PICTURE_TYPE_EMF; - - /** - * Windows Metafile - * @deprecated use {@link Workbook#PICTURE_TYPE_WMF} - */ - @Removal(version = "5.0.0") - @Deprecated - public static final int PICTURE_TYPE_WMF = Workbook.PICTURE_TYPE_WMF; - - /** - * Macintosh PICT - * @deprecated use {@link Workbook#PICTURE_TYPE_PICT} - */ - @Removal(version = "5.0.0") - @Deprecated - public static final int PICTURE_TYPE_PICT = Workbook.PICTURE_TYPE_PICT; - - /** - * JFIF / JPEG - * @deprecated use {@link Workbook#PICTURE_TYPE_JPEG} - */ - @Removal(version = "5.0.0") - @Deprecated - public static final int PICTURE_TYPE_JPEG = Workbook.PICTURE_TYPE_JPEG; - - /** - * PNG - * @deprecated use {@link Workbook#PICTURE_TYPE_PNG} - */ - @Removal(version = "5.0.0") - @Deprecated - public static final int PICTURE_TYPE_PNG = Workbook.PICTURE_TYPE_PNG; - - /** - * Windows DIB - * @deprecated use {@link Workbook#PICTURE_TYPE_DIB} - */ - @Removal(version = "5.0.0") - @Deprecated - public static final int PICTURE_TYPE_DIB = Workbook.PICTURE_TYPE_DIB; public HSSFPicture(EscherContainerRecord spContainer, ObjRecord objRecord) { super(spContainer, objRecord); diff --git a/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java b/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java index e0aba8621f..985a215409 100644 --- a/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java +++ b/src/java/org/apache/poi/ss/usermodel/BorderFormatting.java @@ -19,8 +19,6 @@ package org.apache.poi.ss.usermodel; -import org.apache.poi.util.Removal; - /** * High level representation for Border Formatting component * of Conditional Formatting settings @@ -55,66 +53,6 @@ public interface BorderFormatting { */ BorderStyle getBorderHorizontal(); - /** - * @since POI 3.15 - * @deprecated use <code>getBorderBottom</code> instead - */ - @Removal(version = "4.2") - @Deprecated - BorderStyle getBorderBottomEnum(); - - /** - * @since POI 3.15 - * @deprecated use <code>getBorderDiagonal</code> instead - */ - @Removal(version = "4.2") - @Deprecated - BorderStyle getBorderDiagonalEnum(); - - /** - * @since POI 3.15 - * @deprecated use <code>getBorderLeft</code> instead - */ - @Removal(version = "4.2") - @Deprecated - BorderStyle getBorderLeftEnum(); - - /** - * @since POI 3.15 - * @deprecated use <code>getBorderRight</code> instead - */ - @Removal(version = "4.2") - @Deprecated - BorderStyle getBorderRightEnum(); - - /** - * @since POI 3.15 - * @deprecated use <code>getBorderTop</code> instead - */ - @Removal(version = "4.2") - @Deprecated - BorderStyle getBorderTopEnum(); - - /** - * Only valid for range borders, such as table styles - * @since 3.17 beta 1 - * @return border style - * @deprecated use <code>getBorderVertical</code> instead - */ - @Removal(version = "4.2") - @Deprecated - BorderStyle getBorderVerticalEnum(); - - /** - * Only valid for range borders, such as table styles - * @since 3.17 beta 1 - * @return border style - * @deprecated use <code>getBorderHorizontal</code> instead - */ - @Removal(version = "4.2") - @Deprecated - BorderStyle getBorderHorizontalEnum(); - short getBottomBorderColor(); Color getBottomBorderColorColor(); diff --git a/src/java/org/apache/poi/ss/usermodel/CellStyle.java b/src/java/org/apache/poi/ss/usermodel/CellStyle.java index 57395c6bc6..8417887f5f 100644 --- a/src/java/org/apache/poi/ss/usermodel/CellStyle.java +++ b/src/java/org/apache/poi/ss/usermodel/CellStyle.java @@ -55,17 +55,19 @@ public interface CellStyle { /** * gets the index of the font for this style - * @see Workbook#getFontAt(short) - * @deprecated use <code>getFontIndexAsInt()</code> instead + * @see Workbook#getFontAt(int) + * @since 5.0.0 (used to return a short value) */ - @Removal(version = "4.2") - short getFontIndex(); + int getFontIndex(); /** * gets the index of the font for this style * @see Workbook#getFontAt(int) + * @deprecated use {@link #getFontIndex()} instead * @since 4.0.0 */ + @Deprecated + @Removal(version = "6.0.0") int getFontIndexAsInt(); /** |