remove more deprecated code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884256 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-12-09 16:12:33 +00:00
parent 3e4d80f66a
commit e7ef490dc9
39 changed files with 8 additions and 526 deletions

View File

@ -24,8 +24,6 @@ import java.util.function.Supplier;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Record for the bottom margin.
@ -74,16 +72,6 @@ public final class BottomMarginRecord extends StandardRecord implements Margin {
this.field_1_margin = field_1_margin;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public BottomMarginRecord clone() {
return copy();
}
@Override
public BottomMarginRecord copy() {
return new BottomMarginRecord(this);

View File

@ -26,8 +26,6 @@ import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.RecordFormatException;
import org.apache.poi.util.Removal;
/**
* This structure appears as part of an Obj record that represents image display properties.
@ -153,16 +151,6 @@ public final class FtPioGrbitSubRecord extends SubRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public FtPioGrbitSubRecord clone() {
return copy();
}
@Override
public FtPioGrbitSubRecord copy() {
return new FtPioGrbitSubRecord(this);

View File

@ -22,7 +22,6 @@ import java.util.function.Supplier;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Stores the encrypted password for a sheet or workbook (HSSF doesn't support encryption)
@ -77,16 +76,6 @@ public final class PasswordRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public PasswordRecord clone() {
return copy();
}
/**
* Clone this record.
*/

View File

@ -24,7 +24,6 @@ import java.util.function.Supplier;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Describes which reference mode to use
@ -86,16 +85,6 @@ public final class RefModeRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public RefModeRecord clone() {
return copy();
}
@Override
public RefModeRecord copy() {
return new RefModeRecord();

View File

@ -27,7 +27,6 @@ import java.util.function.Supplier;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Stores the row information for the sheet.
@ -44,7 +43,7 @@ public final class RowRecord extends StandardRecord {
private static final BitField outlineLevel = BitFieldFactory.getInstance(0x07);
// bit 3 reserved
private static final BitField colapsed = BitFieldFactory.getInstance(0x10);
private static final BitField collapsed = BitFieldFactory.getInstance(0x10);
private static final BitField zeroHeight = BitFieldFactory.getInstance(0x20);
private static final BitField badFontHeight = BitFieldFactory.getInstance(0x40);
private static final BitField formatted = BitFieldFactory.getInstance(0x80);
@ -52,7 +51,7 @@ public final class RowRecord extends StandardRecord {
private static final BitField xfIndex = BitFieldFactory.getInstance(0xFFF);
private static final BitField topBorder = BitFieldFactory.getInstance(0x1000);
private static final BitField bottomBorder = BitFieldFactory.getInstance(0x2000);
private static final BitField phoeneticGuide = BitFieldFactory.getInstance(0x4000);
private static final BitField phoneticGuide = BitFieldFactory.getInstance(0x4000);
// bit 15 is unused
private int field_1_row_number;
@ -175,7 +174,7 @@ public final class RowRecord extends StandardRecord {
* @param c - collapse or not
*/
public void setColapsed(boolean c) {
field_7_option_flags = colapsed.setBoolean(field_7_option_flags, c);
field_7_option_flags = collapsed.setBoolean(field_7_option_flags, c);
}
/**
@ -238,7 +237,7 @@ public final class RowRecord extends StandardRecord {
* @param f use phoenetic guide
*/
public void setPhoeneticGuide(boolean f) {
field_8_option_flags = phoeneticGuide.setBoolean(field_8_option_flags, f);
field_8_option_flags = phoneticGuide.setBoolean(field_8_option_flags, f);
}
/**
@ -307,7 +306,7 @@ public final class RowRecord extends StandardRecord {
* @see #getOptionFlags()
*/
public boolean getColapsed() {
return (colapsed.isSet(field_7_option_flags));
return (collapsed.isSet(field_7_option_flags));
}
/**
@ -381,7 +380,7 @@ public final class RowRecord extends StandardRecord {
* @return has phoentic guide
*/
public boolean getPhoeneticGuide() {
return phoeneticGuide.isSet(field_8_option_flags);
return phoneticGuide.isSet(field_8_option_flags);
}
public void serialize(LittleEndianOutput out) {
@ -403,16 +402,6 @@ public final class RowRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public RowRecord clone() {
return copy();
}
@Override
public RowRecord copy() {
return new RowRecord(this);
@ -433,11 +422,11 @@ public final class RowRecord extends StandardRecord {
m.put("optimized", this::getOptimize);
m.put("reserved", () -> field_6_reserved);
m.put("options", getBitsAsString(this::getOptionFlags,
new BitField[]{colapsed,zeroHeight,badFontHeight,formatted},
new BitField[]{collapsed,zeroHeight,badFontHeight,formatted},
new String[]{"COLAPSED","ZERO_HEIGHT","BAD_FONT_HEIGHT","FORMATTED"}));
m.put("outlineLevel", this::getOutlineLevel);
m.put("optionFlags2", getBitsAsString(this::getOptionFlags2,
new BitField[]{topBorder, bottomBorder, phoeneticGuide},
new BitField[]{topBorder, bottomBorder, phoneticGuide},
new String[]{"TOP_BORDER","BOTTOM_BORDER","PHOENETIC_GUIDE"}));
m.put("xfIndex", this::getXFIndex);
return Collections.unmodifiableMap(m);

View File

@ -22,7 +22,6 @@ import java.util.function.Supplier;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Specifies the window's zoom magnification.<p>
@ -64,16 +63,6 @@ public final class SCLRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public SCLRecord clone() {
return copy();
}
@Override
public SCLRecord copy() {
return new SCLRecord(this);

View File

@ -22,7 +22,6 @@ import java.util.function.Supplier;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Record for the top margin.
@ -67,16 +66,6 @@ public final class TopMarginRecord extends StandardRecord implements Margin {
public void setMargin( double field_1_margin )
{ this.field_1_margin = field_1_margin; }
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public TopMarginRecord clone() {
return copy();
}
@Override
public TopMarginRecord copy() {
return new TopMarginRecord(this);

View File

@ -24,7 +24,6 @@ import java.util.function.Supplier;
import org.apache.poi.hssf.record.aggregates.PageSettingsBlock;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Unknown record just tells you the sid so you can figure out what records you are missing.
@ -265,16 +264,6 @@ public final class UnknownRecord extends StandardRecord {
return false;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public UnknownRecord clone() {
return copy();
}
@Override
public UnknownRecord copy() {
// immutable - OK to return this

View File

@ -23,7 +23,6 @@ import java.util.function.Supplier;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The UserSViewBegin record specifies settings for a custom view associated with the sheet.
@ -78,16 +77,6 @@ public final class UserSViewBegin extends StandardRecord {
return Arrays.copyOf(_rawData, 16);
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public UserSViewBegin clone() {
return copy();
}
@Override
public UserSViewBegin copy() {
return new UserSViewBegin(this);

View File

@ -24,7 +24,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Sheet window settings
@ -461,16 +460,6 @@ public final class WindowTwoRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public WindowTwoRecord clone() {
return copy();
}
@Override
public WindowTwoRecord copy() {
return new WindowTwoRecord(this);

View File

@ -23,7 +23,6 @@ import java.util.List;
import org.apache.poi.common.Duplicatable;
import org.apache.poi.hssf.model.RecordStream;
import org.apache.poi.hssf.record.ColumnInfoRecord;
import org.apache.poi.util.Removal;
public final class ColumnInfoRecordsAggregate extends RecordAggregate implements Duplicatable {
/**
@ -61,17 +60,6 @@ public final class ColumnInfoRecordsAggregate extends RecordAggregate implements
}
}
/**
* @deprecated use {@link #copy()} instead
*/
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public ColumnInfoRecordsAggregate clone() {
return copy();
}
@Override
public ColumnInfoRecordsAggregate copy() {
return new ColumnInfoRecordsAggregate(this);

View File

@ -30,7 +30,6 @@ import org.apache.poi.util.GenericRecordJsonWriter;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Border Formatting Block of the Conditional Formatting Rule Record.
@ -463,16 +462,6 @@ public final class BorderFormatting implements Duplicatable, GenericRecord {
return GenericRecordJsonWriter.marshal(this);
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public BorderFormatting clone() {
return copy();
}
public BorderFormatting copy() {
return new BorderFormatting(this);
}

View File

@ -32,7 +32,6 @@ import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import org.apache.poi.util.Removal;
/**
* Color Gradient / Color Scale Conditional Formatting Rule Record.
@ -151,16 +150,6 @@ public final class ColorGradientFormatting implements Duplicatable, GenericRecor
return GenericRecordJsonWriter.marshal(this);
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public ColorGradientFormatting clone() {
return copy();
}
public ColorGradientFormatting copy() {
return new ColorGradientFormatting(this);
}

View File

@ -25,7 +25,6 @@ import org.apache.poi.common.usermodel.GenericRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Color Gradient / Color Scale specific Threshold / value (CFVO),
@ -60,16 +59,6 @@ public final class ColorGradientThreshold extends Threshold implements Duplicata
return super.getDataLength() + 8;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public ColorGradientThreshold clone() {
return copy();
}
@Override
public ColorGradientThreshold copy() {
return new ColorGradientThreshold(this);

View File

@ -19,7 +19,6 @@ package org.apache.poi.hssf.record.cf;
import org.apache.poi.common.Duplicatable;
import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.Removal;
/**
* Data Bar specific Threshold / value (CFVO),
@ -39,16 +38,6 @@ public final class DataBarThreshold extends Threshold implements Duplicatable {
super(in);
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public DataBarThreshold clone() {
return copy();
}
@Override
public DataBarThreshold copy() {
return new DataBarThreshold(this);

View File

@ -33,7 +33,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.GenericRecordJsonWriter;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.Removal;
/**
* Font Formatting Block of the Conditional Formatting Rule Record.
@ -66,71 +65,6 @@ public final class FontFormatting implements Duplicatable, GenericRecord {
private static final BitField SHADOW = BitFieldFactory.getInstance(0x00000010);
private static final BitField CANCELLATION = BitFieldFactory.getInstance(0x00000080);
/**
* Escapement type - None
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#SS_NONE}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final short SS_NONE = 0;
/**
* Escapement type - Superscript
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#SS_SUPER}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final short SS_SUPER = 1;
/**
* Escapement type - Subscript
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#SS_SUB}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final short SS_SUB = 2;
/**
* Underline type - None
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_NONE}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final byte U_NONE = 0;
/**
* Underline type - Single
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_SINGLE}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final byte U_SINGLE = 1;
/**
* Underline type - Double
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_DOUBLE}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final byte U_DOUBLE = 2;
/**
* Underline type - Single Accounting
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_SINGLE_ACCOUNTING}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final byte U_SINGLE_ACCOUNTING = 0x21;
/**
* Underline type - Double Accounting
*
* @deprecated use {@link org.apache.poi.ss.usermodel.Font#U_DOUBLE_ACCOUNTING}
*/
@Deprecated
@Removal(version = "5.0.0")
public static final byte U_DOUBLE_ACCOUNTING = 0x22;
/** Normal boldness (not bold) */
private static final short FONT_WEIGHT_NORMAL = 0x190;

View File

@ -32,7 +32,6 @@ import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import org.apache.poi.util.Removal;
/**
* Icon / Multi-State Conditional Formatting Rule Record.
@ -121,16 +120,6 @@ public final class IconMultiStateFormatting implements Duplicatable, GenericReco
return GenericRecordJsonWriter.marshal(this);
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public IconMultiStateFormatting clone() {
return copy();
}
@Override
public IconMultiStateFormatting copy() {
return new IconMultiStateFormatting(this);

View File

@ -28,7 +28,6 @@ import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The area format record is used to define the colours and patterns for an area.
@ -86,16 +85,6 @@ public final class AreaFormatRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public AreaFormatRecord clone() {
return copy();
}
/**
* Get the foreground color field for the AreaFormat record.
*/

View File

@ -27,7 +27,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The area record is used to define a area chart.
@ -65,16 +64,6 @@ public final class AreaRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public AreaRecord clone() {
return copy();
}
/**
* Get the format flags field for the Area record.
*/

View File

@ -25,7 +25,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The axis size and location
@ -79,16 +78,6 @@ public final class AxisParentRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public AxisParentRecord clone() {
return copy();
}
/**
* Get the axis type field for the AxisParent record.
*

View File

@ -28,7 +28,6 @@ import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The bar record is used to define a bar chart.
@ -76,16 +75,6 @@ public final class BarRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public BarRecord clone() {
return copy();
}
/**
* Get the bar space field for the Bar record.
*/

View File

@ -24,7 +24,6 @@ import org.apache.poi.hssf.record.HSSFRecordTypes;
import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The begin record defines the start of a block of records for a (graphing
@ -58,16 +57,6 @@ public final class BeginRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public BeginRecord clone() {
return copy();
}
@Override
public BeginRecord copy() {
return new BeginRecord(this);

View File

@ -27,7 +27,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* This record refers to a category or series axis and is used to specify label/tickmark frequency.
@ -78,16 +77,6 @@ public final class CategorySeriesAxisRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public CategorySeriesAxisRecord clone() {
return copy();
}
/**
* Get the crossing point field for the CategorySeriesAxis record.
*/

View File

@ -25,7 +25,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* ENDBLOCK - Chart Future Record Type End Block (0x0853)
@ -81,17 +80,6 @@ public final class ChartEndBlockRecord extends StandardRecord {
out.write(unused);
}
/**
* @deprecated use {@link #copy()} instead
*/
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public ChartEndBlockRecord clone() {
return copy();
}
@Override
public ChartEndBlockRecord copy() {
return new ChartEndBlockRecord(this);

View File

@ -25,7 +25,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* CHART (0x1002)<p>
@ -84,16 +83,6 @@ public final class ChartRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public ChartRecord clone() {
return copy();
}
@Override
public ChartRecord copy() {
return new ChartRecord(this);

View File

@ -27,7 +27,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The dat record is used to store options for the chart.
@ -66,16 +65,6 @@ public final class DatRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public DatRecord clone() {
return copy();
}
@Override
public DatRecord copy() {
return new DatRecord(this);

View File

@ -25,7 +25,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The default data label text properties record identifies the text characteristics of the preceding text record.
@ -62,16 +61,6 @@ public final class DefaultDataLabelTextPropertiesRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public DefaultDataLabelTextPropertiesRecord clone() {
return copy();
}
@Override
public DefaultDataLabelTextPropertiesRecord copy() {
return new DefaultDataLabelTextPropertiesRecord(this);

View File

@ -24,7 +24,6 @@ import org.apache.poi.hssf.record.HSSFRecordTypes;
import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The end record defines the end of a block of records for a (Graphing)
@ -56,16 +55,6 @@ public final class EndRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public EndRecord clone() {
return copy();
}
@Override
public EndRecord copy() {
// No data so nothing to copy

View File

@ -25,7 +25,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/** The font basis record stores various font metrics. */
public final class FontBasisRecord extends StandardRecord {
@ -74,16 +73,6 @@ public final class FontBasisRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public FontBasisRecord clone() {
return copy();
}
@Override
public FontBasisRecord copy() {
return new FontBasisRecord(this);

View File

@ -25,7 +25,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/** The font index record indexes into the font table for the text record. */
public final class FontIndexRecord extends StandardRecord {
@ -56,24 +55,12 @@ public final class FontIndexRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public FontIndexRecord clone() {
return copy();
}
@Override
public FontIndexRecord copy() {
return new FontIndexRecord(this);
}
/**
* Get the font index field for the FontIndex record.
*/

View File

@ -27,7 +27,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The frame record indicates whether there is a border around the displayed text of a chart.
@ -71,16 +70,6 @@ public final class FrameRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public FrameRecord clone() {
return copy();
}
@Override
public FrameRecord copy() {
return new FrameRecord(this);

View File

@ -27,7 +27,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* Links text to an object on the chart or identifies it as the title.
@ -75,16 +74,6 @@ public final class ObjectLinkRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public ObjectLinkRecord clone() {
return copy();
}
@Override
public ObjectLinkRecord copy() {
return new ObjectLinkRecord(this);

View File

@ -24,7 +24,6 @@ import org.apache.poi.hssf.record.HSSFRecordTypes;
import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* preceeds and identifies a frame as belonging to the plot area.
@ -51,16 +50,6 @@ public final class PlotAreaRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public PlotAreaRecord clone() {
return copy();
}
@Override
public PlotAreaRecord copy() {
return new PlotAreaRecord();

View File

@ -25,7 +25,6 @@ import org.apache.poi.hssf.record.RecordInputStream;
import org.apache.poi.hssf.record.StandardRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* links a series to its position in the series list.
@ -58,16 +57,6 @@ public final class SeriesIndexRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public SeriesIndexRecord clone() {
return copy();
}
@Override
public SeriesIndexRecord copy() {
return new SeriesIndexRecord(this);

View File

@ -29,7 +29,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.LittleEndianOutput;
import org.apache.poi.util.Removal;
/**
* The series label record defines the type of label associated with the data format record.
@ -70,16 +69,6 @@ public final class SeriesLabelsRecord extends StandardRecord {
return sid;
}
/**
* @deprecated use {@link #copy()} instead
*/
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public SeriesLabelsRecord clone() {
return copy();
}
@Override
public SeriesLabelsRecord copy() {
return new SeriesLabelsRecord(this);

View File

@ -37,7 +37,6 @@ import org.apache.poi.ss.usermodel.DataFormatter;
import org.apache.poi.ss.usermodel.DateUtil;
import org.apache.poi.ss.util.DateFormatConverter;
import org.apache.poi.util.LocaleUtil;
import org.apache.poi.util.Removal;
/**
* Format a value according to the standard Excel behavior. This "standard" is
@ -447,24 +446,6 @@ public class CellFormat {
return type;
}
/**
* Returns the ultimate cell type, following the results of formulas. If
* the cell is a {@link CellType#FORMULA}, this returns the result of
* {@link Cell#getCachedFormulaResultType()}. Otherwise this returns the
* result of {@link Cell#getCellType()}.
*
* @param cell The cell.
*
* @return The ultimate type of this cell.
* @since POI 3.15 beta 3
* @deprecated use <code>ultimateType</code> instead
*/
@Deprecated
@Removal(version = "4.2")
public static CellType ultimateTypeEnum(Cell cell) {
return ultimateType(cell);
}
/**
* Returns <tt>true</tt> if the other object is a {@link CellFormat} object
* with the same format.

View File

@ -23,7 +23,6 @@ import java.util.regex.Pattern;
import org.apache.poi.ss.util.CellReference;
import org.apache.poi.ss.SpreadsheetVersion;
import org.apache.poi.util.Removal;
/**
* Formats sheet names for use in formula expressions.
@ -54,40 +53,6 @@ public final class SheetNameFormatter {
return sb.toString();
}
/**
* @deprecated Only kept for binary compatibility, will be replaced by the version with Appendable as parameter
*/
@Deprecated
@Removal(version="5.0.0")
public static void appendFormat(StringBuffer out, String rawSheetName) {
appendFormat((Appendable)out, rawSheetName);
}
/**
* @deprecated Only kept for binary compatibility, will be replaced by the version with Appendable as parameter
*/
@Deprecated
@Removal(version="5.0.0")
public static void appendFormat(StringBuffer out, String workbookName, String rawSheetName) {
appendFormat((Appendable)out, workbookName, rawSheetName);
}
/**
* Only kept for binary compatibility, will be replaced by the version with Appendable as parameter
*/
@Removal(version="5.0.0")
public static void appendFormat(StringBuilder out, String rawSheetName) {
appendFormat((Appendable)out, rawSheetName);
}
/**
* Only kept for binary compatibility, will be replaced by the version with Appendable as parameter
*/
@Removal(version="5.0.0")
public static void appendFormat(StringBuilder out, String workbookName, String rawSheetName) {
appendFormat((Appendable)out, workbookName, rawSheetName);
}
/**
* Convenience method for ({@link #format(String)}) when a StringBuffer is already available.
*

View File

@ -25,7 +25,6 @@ import java.util.function.Supplier;
import org.apache.poi.common.Duplicatable;
import org.apache.poi.common.usermodel.GenericRecord;
import org.apache.poi.util.GenericRecordUtil;
import org.apache.poi.util.Removal;
/**
* Definition of a property of some text, or its paragraph. Defines
@ -96,14 +95,6 @@ public class TextProp implements Duplicatable, GenericRecord {
*/
public void setValue(int val) { dataValue = val; }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public TextProp clone() {
return copy();
}
/**
* Clone, eg when you want to actually make use of one of these.
*/

View File

@ -32,7 +32,6 @@ import org.apache.poi.hwpf.sprm.TableSprmCompressor;
import org.apache.poi.util.Internal;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
import org.apache.poi.util.Removal;
public class Paragraph extends Range implements Duplicatable {
private static final POILogger log = POILogFactory.getLogger( Paragraph.class );
@ -592,14 +591,6 @@ public class Paragraph extends Range implements Duplicatable {
return _props.copy();
}
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public Paragraph clone() {
return copy();
}
@Override
public Paragraph copy() {
return new Paragraph(this);