mirror of https://github.com/apache/poi.git
remove more deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e7ef490dc9
commit
bc1569e786
|
@ -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}
|
||||
*
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.poi.util.XMLHelper;
|
|||
/**
|
||||
* @deprecated use {@link XMLHelper}
|
||||
*/
|
||||
@Removal(version = "5.0.0")
|
||||
@Removal(version = "6.0.0")
|
||||
@Deprecated
|
||||
public final class TransformerHelper {
|
||||
private TransformerHelper() {}
|
||||
|
|
|
@ -57,23 +57,6 @@ public class XSSFBorderFormatting implements BorderFormatting {
|
|||
return getBorderStyle(_border.getRight());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderTopEnum() { return getBorderTop(); }
|
||||
|
||||
@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 getBorderTop() {
|
||||
return getBorderStyle(_border.getTop());
|
||||
|
@ -274,12 +257,6 @@ public class XSSFBorderFormatting implements BorderFormatting {
|
|||
return getBorderStyle(_border.getHorizontal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderVerticalEnum() { return getBorderVertical(); }
|
||||
|
||||
@Override
|
||||
public BorderStyle getBorderHorizontalEnum() { return getBorderHorizontal(); }
|
||||
|
||||
public short getVerticalBorderColor() {
|
||||
return getIndexedColor(getVerticalBorderColorColor());
|
||||
}
|
||||
|
|
|
@ -439,22 +439,25 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
/**
|
||||
* Gets the index of the font for this style
|
||||
*
|
||||
* @return short - font index
|
||||
* @see org.apache.poi.xssf.usermodel.XSSFWorkbook#getFontAt(short)
|
||||
* @return font index
|
||||
* @see org.apache.poi.xssf.usermodel.XSSFWorkbook#getFontAt(int)
|
||||
* @since 5.0.0 (used to return a short value)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public short getFontIndex() {
|
||||
return (short) getFontId();
|
||||
public int getFontIndex() {
|
||||
return getFontId();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the index of the font for this style
|
||||
*
|
||||
* @return short - font index
|
||||
* @return font index
|
||||
* @see org.apache.poi.xssf.usermodel.XSSFWorkbook#getFontAt(int)
|
||||
* @deprecated use {@link #getFontIndex()} instead
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
@Removal(version = "6.0.0")
|
||||
@Override
|
||||
public int getFontIndexAsInt() {
|
||||
return getFontId();
|
||||
|
@ -1272,14 +1275,6 @@ public class XSSFCellStyle implements CellStyle, Duplicatable {
|
|||
return _cellXf.toString().equals(cf.getCoreXf().toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("squid:S2975")
|
||||
@Deprecated
|
||||
@Removal(version = "5.0.0")
|
||||
public XSSFCellStyle clone() {
|
||||
return copy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Make a copy of this style. The underlying CTXf bean is cloned,
|
||||
* the references to fills and borders remain.
|
||||
|
|
|
@ -84,7 +84,6 @@ import org.apache.poi.util.NotImplemented;
|
|||
import org.apache.poi.util.POILogFactory;
|
||||
import org.apache.poi.util.POILogger;
|
||||
import org.apache.poi.util.Removal;
|
||||
import org.apache.poi.util.Units;
|
||||
import org.apache.poi.xssf.XLSBUnsupportedException;
|
||||
import org.apache.poi.xssf.model.CalculationChain;
|
||||
import org.apache.poi.xssf.model.ExternalLinksTable;
|
||||
|
@ -123,15 +122,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.WorkbookDocument;
|
|||
public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Support {
|
||||
private static final Pattern COMMA_PATTERN = Pattern.compile(",");
|
||||
|
||||
/**
|
||||
* Width of one character of the default font in pixels. Same for Calibri and Arial.
|
||||
* @deprecated POI 3.17 beta 1
|
||||
* @see Units#DEFAULT_CHARACTER_WIDTH
|
||||
*/
|
||||
@Deprecated
|
||||
@Removal(version="4.1")
|
||||
public static final float DEFAULT_CHARACTER_WIDTH = Units.DEFAULT_CHARACTER_WIDTH;
|
||||
|
||||
/**
|
||||
* Excel silently truncates long sheet names to 31 chars.
|
||||
* This constant is used to ensure uniqueness in the first 31 chars
|
||||
|
|
|
@ -868,7 +868,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
|
|||
|
||||
// Column 1 has a font with regular colours
|
||||
XSSFCell cr = r.getCell(1);
|
||||
XSSFFont fr = wb.getFontAt(cr.getCellStyle().getFontIndexAsInt());
|
||||
XSSFFont fr = wb.getFontAt(cr.getCellStyle().getFontIndex());
|
||||
XSSFColor colr = fr.getXSSFColor();
|
||||
// No theme, has colours
|
||||
assertEquals(0, colr.getTheme());
|
||||
|
@ -876,7 +876,7 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
|
|||
|
||||
// Column 0 has a font with colours from a theme
|
||||
XSSFCell ct = r.getCell(0);
|
||||
XSSFFont ft = wb.getFontAt(ct.getCellStyle().getFontIndexAsInt());
|
||||
XSSFFont ft = wb.getFontAt(ct.getCellStyle().getFontIndex());
|
||||
XSSFColor colt = ft.getXSSFColor();
|
||||
// Has a theme, which has the colours on it
|
||||
assertEquals(9, colt.getTheme());
|
||||
|
|
|
@ -21,8 +21,6 @@ import org.apache.poi.hslf.model.textproperties.TextPropCollection;
|
|||
import org.apache.poi.hslf.record.SheetContainer;
|
||||
import org.apache.poi.hslf.record.TextHeaderAtom;
|
||||
import org.apache.poi.sl.usermodel.MasterSheet;
|
||||
import org.apache.poi.sl.usermodel.SimpleShape;
|
||||
import org.apache.poi.util.Removal;
|
||||
|
||||
/**
|
||||
* The superclass of all master sheets - Slide masters, Notes masters, etc.
|
||||
|
@ -47,20 +45,4 @@ public abstract class HSLFMasterSheet extends HSLFSheet implements MasterSheet<H
|
|||
*/
|
||||
public abstract TextPropCollection getPropCollection(int txtype, int level, String name, boolean isCharacter);
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the shape is a placeholder.
|
||||
* (placeholders aren't normal shapes, they are visible only in the Edit Master mode)
|
||||
*
|
||||
*
|
||||
* @return true if the shape is a placeholder
|
||||
*
|
||||
* @deprecated use {@link SimpleShape#isPlaceholder()}
|
||||
*/
|
||||
@Deprecated
|
||||
@Removal(version="4.1.0")
|
||||
public static boolean isPlaceholder(HSLFShape shape){
|
||||
return shape instanceof SimpleShape
|
||||
&& ((SimpleShape<?,?>)shape).isPlaceholder();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue