remove more deprecated code

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-12-09 20:42:19 +00:00
parent ea59cc2bc9
commit ea56d752f4
28 changed files with 46 additions and 298 deletions

View File

@ -4069,19 +4069,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return new XSSFAutoFilter(this); return new XSSFAutoFilter(this);
} }
/**
* Creates a new Table, and associates it with this Sheet. The table does
* not yet have an area defined and needs to be initialized by calling
* {@link XSSFTable#setArea(AreaReference)}.
*
* @deprecated Use {@link #createTable(AreaReference))} instead
*/
@Deprecated
@Removal(version = "4.2.0")
public XSSFTable createTable() {
return createTable(null);
}
/** /**
* Creates a new Table, and associates it with this Sheet. * Creates a new Table, and associates it with this Sheet.
* <p> * <p>

View File

@ -222,16 +222,9 @@ public class XSSFTable extends POIXMLDocumentPart implements Table {
} }
/** /**
* Note this list is static - once read, it does not notice later changes to the underlying column structures * Use {@link XSSFTableColumn#getXmlColumnPr()} instead.
* To clear the cache, call {@link #updateHeaders}
*
* @deprecated Use {@link XSSFTableColumn#getXmlColumnPr()} instead.
*
* @return List of XSSFXmlColumnPr
*/ */
@Deprecated private List<XSSFXmlColumnPr> getXmlColumnPrs() {
@Removal(version="4.2.0")
public List<XSSFXmlColumnPr> getXmlColumnPrs() {
if (xmlColumnPrs == null) { if (xmlColumnPrs == null) {
xmlColumnPrs = new ArrayList<>(); xmlColumnPrs = new ArrayList<>();
for (XSSFTableColumn column: getColumns()) { for (XSSFTableColumn column: getColumns()) {
@ -438,17 +431,6 @@ public class XSSFTable extends POIXMLDocumentPart implements Table {
ctTable.setDisplayName(name); ctTable.setDisplayName(name);
} }
/**
* @deprecated Use {@link #getColumnCount()} instead.
*
* @return the number of mapped table columns (see Open Office XML Part 4: chapter 3.5.1.4)
*/
@Deprecated
@Removal(version = "4.2.0")
public long getNumberOfMappedColumns() {
return ctTable.getTableColumns().getCount();
}
/** /**
* Get the area reference for the cells which this table covers. The area * Get the area reference for the cells which this table covers. The area
* includes header rows and totals rows. * includes header rows and totals rows.

View File

@ -89,7 +89,7 @@ public final class TestXSSFTable {
XSSFSheet sheet = outputWorkbook.createSheet(); XSSFSheet sheet = outputWorkbook.createSheet();
//Create //Create
XSSFTable outputTable = sheet.createTable(); XSSFTable outputTable = sheet.createTable(null);
outputTable.setDisplayName("Test"); outputTable.setDisplayName("Test");
CTTable outputCTTable = outputTable.getCTTable(); CTTable outputCTTable = outputTable.getCTTable();
@ -223,15 +223,6 @@ public final class TestXSSFTable {
} }
} }
@Test
public void getNumberOfMappedColumns() throws IOException {
try (XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("StructuredReferences.xlsx")) {
XSSFTable table = wb.getTable("\\_Prime.1");
//noinspection deprecation
assertEquals(3, table.getNumberOfMappedColumns());
}
}
@Test @Test
public void getColumnCount() throws IOException { public void getColumnCount() throws IOException {
try (XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("StructuredReferences.xlsx")) { try (XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("StructuredReferences.xlsx")) {
@ -258,7 +249,7 @@ public final class TestXSSFTable {
// can be synchronized with the underlying CTTable // can be synchronized with the underlying CTTable
try (XSSFWorkbook wb = new XSSFWorkbook()) { try (XSSFWorkbook wb = new XSSFWorkbook()) {
XSSFSheet sh = wb.createSheet(); XSSFSheet sh = wb.createSheet();
XSSFTable table = sh.createTable(); XSSFTable table = sh.createTable(null);
assertNotNull(table.getDisplayName()); assertNotNull(table.getDisplayName());
assertNotNull(table.getCTTable().getDisplayName()); assertNotNull(table.getCTTable().getDisplayName());
CTTable ctTable = table.getCTTable(); CTTable ctTable = table.getCTTable();
@ -289,7 +280,7 @@ public final class TestXSSFTable {
public void getRowCount() throws IOException { public void getRowCount() throws IOException {
try (XSSFWorkbook wb = new XSSFWorkbook()) { try (XSSFWorkbook wb = new XSSFWorkbook()) {
XSSFSheet sh = wb.createSheet(); XSSFSheet sh = wb.createSheet();
XSSFTable table = sh.createTable(); XSSFTable table = sh.createTable(null);
CTTable ctTable = table.getCTTable(); CTTable ctTable = table.getCTTable();
assertEquals(0, table.getRowCount()); assertEquals(0, table.getRowCount());

View File

@ -1102,7 +1102,7 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook {
// If a table is added after getTable is called it should still be reachable by XSSFWorkbook.getTable // If a table is added after getTable is called it should still be reachable by XSSFWorkbook.getTable
// This test makes sure that if any caching is done that getTable never uses a stale cache // This test makes sure that if any caching is done that getTable never uses a stale cache
XSSFTable table2 = wb.getSheet("Foglio2").createTable(); XSSFTable table2 = wb.getSheet("Foglio2").createTable(null);
table2.setName("Table2"); table2.setName("Table2");
assertSame("Did not find Table2", table2, wb.getTable("Table2")); assertSame("Did not find Table2", table2, wb.getTable("Table2"));

View File

@ -45,18 +45,6 @@ public class DirectoryChunk extends Chunk {
return dir; return dir;
} }
/**
* Treats the directory as an embedded MAPIMessage (it normally is one), and
* returns a MAPIMessage object to process it with.
*
* @deprecated use {@link #getAsEmbeddedMessage()} instead
*/
@Removal(version = "4.3")
@Deprecated
public MAPIMessage getAsEmbededMessage() throws IOException {
return getAsEmbeddedMessage();
}
/** /**
* Treats the directory as an embedded MAPIMessage (it normally is one), and * Treats the directory as an embedded MAPIMessage (it normally is one), and
* returns a MAPIMessage object to process it with. * returns a MAPIMessage object to process it with.

View File

@ -21,7 +21,6 @@ import java.util.Objects;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.BKFAbstractType; import org.apache.poi.hwpf.model.types.BKFAbstractType;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.Removal;
@Internal @Internal
public final class BookmarkFirstDescriptor extends BKFAbstractType implements Duplicatable { public final class BookmarkFirstDescriptor extends BKFAbstractType implements Duplicatable {
@ -35,14 +34,6 @@ public final class BookmarkFirstDescriptor extends BKFAbstractType implements Du
fillFields( data, offset ); fillFields( data, offset );
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
protected BookmarkFirstDescriptor clone() {
return copy();
}
@Override @Override
public BookmarkFirstDescriptor copy() { public BookmarkFirstDescriptor copy() {
return new BookmarkFirstDescriptor(this); return new BookmarkFirstDescriptor(this);

View File

@ -156,7 +156,7 @@ public class CHPBinTable
if ( hasChp ) if ( hasChp )
{ {
SprmBuffer newSprmBuffer = sprmBuffer.clone(); SprmBuffer newSprmBuffer = sprmBuffer.copy();
CHPX chpx = new CHPX( textPiece.getStart(), CHPX chpx = new CHPX( textPiece.getStart(),
textPiece.getEnd(), newSprmBuffer ); textPiece.getEnd(), newSprmBuffer );

View File

@ -19,7 +19,6 @@ package org.apache.poi.hwpf.model;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.Removal;
/** /**
* 24-bit color structure * 24-bit color structure
@ -87,14 +86,6 @@ public class Colorref implements Duplicatable {
this.value = value; this.value = value;
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public Colorref clone() {
return copy();
}
@Override @Override
public Colorref copy() { public Colorref copy() {
return new Colorref(this); return new Colorref(this);

View File

@ -21,7 +21,6 @@ import java.util.Objects;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.FRDAbstractType; import org.apache.poi.hwpf.model.types.FRDAbstractType;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.Removal;
@Internal @Internal
public final class FootnoteReferenceDescriptor extends FRDAbstractType implements Duplicatable { public final class FootnoteReferenceDescriptor extends FRDAbstractType implements Duplicatable {
@ -35,14 +34,6 @@ public final class FootnoteReferenceDescriptor extends FRDAbstractType implement
fillFields( data, offset ); fillFields( data, offset );
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
protected FootnoteReferenceDescriptor clone() {
return copy();
}
@Override @Override
public FootnoteReferenceDescriptor copy() { public FootnoteReferenceDescriptor copy() {
return new FootnoteReferenceDescriptor(this); return new FootnoteReferenceDescriptor(this);

View File

@ -24,7 +24,6 @@ import org.apache.poi.hwpf.model.types.HRESIAbstractType;
import org.apache.poi.hwpf.usermodel.CharacterProperties; import org.apache.poi.hwpf.usermodel.CharacterProperties;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.Removal;
/** /**
* Hyphenation. Substructure of the {@link CharacterProperties}. * Hyphenation. Substructure of the {@link CharacterProperties}.
@ -43,14 +42,6 @@ public final class Hyphenation extends HRESIAbstractType implements Duplicatable
fillFields( data, 0 ); fillFields( data, 0 );
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public Hyphenation clone() {
return copy();
}
@Override @Override
public Hyphenation copy() { public Hyphenation copy() {
return new Hyphenation(this); return new Hyphenation(this);

View File

@ -21,7 +21,6 @@ import java.util.Objects;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.util.BitField; import org.apache.poi.util.BitField;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.Removal;
@Internal @Internal
public final class PropertyModifier implements Duplicatable { public final class PropertyModifier implements Duplicatable {
@ -55,14 +54,6 @@ public final class PropertyModifier implements Duplicatable {
value = other.value; value = other.value;
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
protected PropertyModifier clone() {
return copy();
}
@Override @Override
public PropertyModifier copy() { public PropertyModifier copy() {
return new PropertyModifier(this); return new PropertyModifier(this);

View File

@ -25,7 +25,6 @@ import org.apache.poi.common.Duplicatable;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger; import org.apache.poi.util.POILogger;
import org.apache.poi.util.Removal;
/** /**
* Represents a lightweight node in the Trees used to store content * Represents a lightweight node in the Trees used to store content
@ -152,14 +151,6 @@ public abstract class PropertyNode<T extends PropertyNode<T>> implements Compara
return false; return false;
} }
@Override
@Deprecated
@Removal(version = "5.0.0")
@SuppressWarnings({"unchecked","squid:S2975"})
public T clone() {
return (T) copy();
}
@Override @Override
public abstract PropertyNode<?> copy(); public abstract PropertyNode<?> copy();

View File

@ -45,7 +45,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
public static CharacterProperties uncompressCHP( public static CharacterProperties uncompressCHP(
CharacterProperties parent, byte[] grpprl, int offset ) CharacterProperties parent, byte[] grpprl, int offset )
{ {
CharacterProperties newProperties = parent.clone(); CharacterProperties newProperties = parent.copy();
applySprms( parent, grpprl, offset, true, newProperties ); applySprms( parent, grpprl, offset, true, newProperties );
return newProperties; return newProperties;
} }
@ -61,7 +61,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
} }
else else
{ {
newProperties = parStyle.clone(); newProperties = parStyle.copy();
} }
/* /*
@ -84,7 +84,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
} }
CharacterProperties styleProperties = newProperties; CharacterProperties styleProperties = newProperties;
newProperties = styleProperties.clone(); newProperties = styleProperties.copy();
try try
{ {
@ -329,7 +329,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
case 0x33: case 0x33:
// preserve the fSpec setting from the original CHP // preserve the fSpec setting from the original CHP
boolean fSpec = newCHP.isFSpec(); boolean fSpec = newCHP.isFSpec();
newCHP = oldCHP.clone(); newCHP = oldCHP.copy();
newCHP.setFSpec( fSpec ); newCHP.setFSpec( fSpec );
return; return;
case 0x34: case 0x34:

View File

@ -24,7 +24,6 @@ import org.apache.poi.util.IOUtils;
import org.apache.poi.util.Internal; import org.apache.poi.util.Internal;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.LittleEndianConsts; import org.apache.poi.util.LittleEndianConsts;
import org.apache.poi.util.Removal;
@Internal @Internal
public final class SprmBuffer implements Duplicatable { public final class SprmBuffer implements Duplicatable {
@ -107,14 +106,6 @@ public final class SprmBuffer implements Duplicatable {
_offset += grpprl.length - offset; _offset += grpprl.length - offset;
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public SprmBuffer clone() {
return copy();
}
@Override @Override
public SprmBuffer copy() { public SprmBuffer copy() {
return new SprmBuffer(this); return new SprmBuffer(this);

View File

@ -22,7 +22,6 @@ import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory; import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.LittleEndianConsts; import org.apache.poi.util.LittleEndianConsts;
import org.apache.poi.util.Removal;
/** /**
* Mapping class for BRC80 structure (Border Code for Word 97) * Mapping class for BRC80 structure (Border Code for Word 97)
@ -88,14 +87,6 @@ public final class BorderCode implements Duplicatable {
return 42; // any arbitrary constant will do return 42; // any arbitrary constant will do
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public BorderCode clone() {
return copy();
}
@Override @Override
public BorderCode copy() { public BorderCode copy() {
return new BorderCode(this); return new BorderCode(this);

View File

@ -20,7 +20,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.Colorref; import org.apache.poi.hwpf.model.Colorref;
import org.apache.poi.hwpf.model.types.CHPAbstractType; import org.apache.poi.hwpf.model.types.CHPAbstractType;
import org.apache.poi.util.Removal;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public final class CharacterProperties extends CHPAbstractType implements Duplicatable { public final class CharacterProperties extends CHPAbstractType implements Duplicatable {
@ -371,14 +370,6 @@ public final class CharacterProperties extends CHPAbstractType implements Duplic
setCv( new Colorref( colour24 & 0xFFFFFF ) ); setCv( new Colorref( colour24 & 0xFFFFFF ) );
} }
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public CharacterProperties clone() {
return copy();
}
@Override @Override
public CharacterProperties copy() { public CharacterProperties copy() {
return new CharacterProperties(this); return new CharacterProperties(this);

View File

@ -26,7 +26,6 @@ import org.apache.poi.hwpf.model.Ffn;
import org.apache.poi.hwpf.model.NilPICFAndBinData; import org.apache.poi.hwpf.model.NilPICFAndBinData;
import org.apache.poi.hwpf.model.StyleSheet; import org.apache.poi.hwpf.model.StyleSheet;
import org.apache.poi.hwpf.sprm.SprmBuffer; import org.apache.poi.hwpf.sprm.SprmBuffer;
import org.apache.poi.util.Removal;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
@ -567,19 +566,6 @@ public final class CharacterRun extends Range implements Duplicatable, org.apach
_props.setIco24(colour24); _props.setIco24(colour24);
} }
/**
* Used to create a deep copy of this object.
*
* @return A deep copy.
*/
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public CharacterRun clone() {
return copy();
}
@Override @Override
public CharacterRun copy() { public CharacterRun copy() {
return new CharacterRun(this); return new CharacterRun(this);

View File

@ -17,15 +17,10 @@
package org.apache.poi.hwpf.usermodel; package org.apache.poi.hwpf.usermodel;
import java.util.Calendar;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.util.BitField; import org.apache.poi.util.*;
import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian; import java.util.Calendar;
import org.apache.poi.util.LittleEndianConsts;
import org.apache.poi.util.LocaleUtil;
import org.apache.poi.util.Removal;
/** /**
* This class is used to represent a date and time in a Word document. * This class is used to represent a date and time in a Word document.
@ -42,7 +37,8 @@ public final class DateAndTime implements Duplicatable {
private short _info; private short _info;
private short _info2; private short _info2;
public DateAndTime() {} public DateAndTime() {
}
public DateAndTime(DateAndTime other) { public DateAndTime(DateAndTime other) {
_info = other._info; _info = other._info;
@ -54,60 +50,49 @@ public final class DateAndTime implements Duplicatable {
_info2 = LittleEndian.getShort(buf, offset + LittleEndianConsts.SHORT_SIZE); _info2 = LittleEndian.getShort(buf, offset + LittleEndianConsts.SHORT_SIZE);
} }
public Calendar getDate() { public Calendar getDate() {
// TODO Discover if the timezone is stored somewhere else or not // TODO Discover if the timezone is stored somewhere else or not
return LocaleUtil.getLocaleCalendar( return LocaleUtil.getLocaleCalendar(
_years.getValue(_info2)+1900, _years.getValue(_info2) + 1900,
_months.getValue(_info2)-1, _months.getValue(_info2) - 1,
_dom.getValue(_info), _dom.getValue(_info),
_hours.getValue(_info), _hours.getValue(_info),
_minutes.getValue(_info), _minutes.getValue(_info),
0 0
); );
} }
public void serialize(byte[] buf, int offset) public void serialize(byte[] buf, int offset) {
{ LittleEndian.putShort(buf, offset, _info);
LittleEndian.putShort(buf, offset, _info); LittleEndian.putShort(buf, offset + LittleEndianConsts.SHORT_SIZE, _info2);
LittleEndian.putShort(buf, offset + LittleEndianConsts.SHORT_SIZE, _info2); }
}
@Override
public boolean equals(Object o)
{
if (!(o instanceof DateAndTime)) return false;
DateAndTime dttm = (DateAndTime)o;
return _info == dttm._info && _info2 == dttm._info2;
}
@Override
public int hashCode() {
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
@Override @Override
@SuppressWarnings("squid:S2975") public boolean equals(Object o) {
@Deprecated if (!(o instanceof DateAndTime)) return false;
@Removal(version = "5.0.0") DateAndTime dttm = (DateAndTime) o;
public DateAndTime clone() { return _info == dttm._info && _info2 == dttm._info2;
return copy();
} }
@Override
public int hashCode() {
assert false : "hashCode not designed";
return 42; // any arbitrary constant will do
}
@Override @Override
public DateAndTime copy() { public DateAndTime copy() {
return new DateAndTime(this); return new DateAndTime(this);
} }
public boolean isEmpty() public boolean isEmpty() {
{
return _info == 0 && _info2 == 0; return _info == 0 && _info2 == 0;
} }
@Override @Override
public String toString() public String toString() {
{ if (isEmpty())
if ( isEmpty() )
return "[DTTM] EMPTY"; return "[DTTM] EMPTY";
return "[DTTM] " + getDate(); return "[DTTM] " + getDate();

View File

@ -21,7 +21,6 @@ import org.apache.poi.common.Duplicatable;
import org.apache.poi.util.BitField; import org.apache.poi.util.BitField;
import org.apache.poi.util.BitFieldFactory; import org.apache.poi.util.BitFieldFactory;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.Removal;
/** /**
* This data structure is used by a paragraph to determine how it should drop * This data structure is used by a paragraph to determine how it should drop
@ -50,14 +49,6 @@ public final class DropCapSpecifier implements Duplicatable {
this._fdct = fdct; this._fdct = fdct;
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public DropCapSpecifier clone() {
return copy();
}
@Override @Override
public DropCapSpecifier copy() { public DropCapSpecifier copy() {
return new DropCapSpecifier(this); return new DropCapSpecifier(this);

View File

@ -20,7 +20,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.LittleEndianConsts; import org.apache.poi.util.LittleEndianConsts;
import org.apache.poi.util.Removal;
/** /**
* This class is used to determine line spacing for a paragraph. * This class is used to determine line spacing for a paragraph.
@ -45,14 +44,6 @@ public final class LineSpacingDescriptor implements Duplicatable {
_fMultiLinespace = LittleEndian.getShort(buf, offset + LittleEndianConsts.SHORT_SIZE); _fMultiLinespace = LittleEndian.getShort(buf, offset + LittleEndianConsts.SHORT_SIZE);
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public LineSpacingDescriptor clone() {
return copy();
}
@Override @Override
public LineSpacingDescriptor copy() { public LineSpacingDescriptor copy() {
return new LineSpacingDescriptor(this); return new LineSpacingDescriptor(this);

View File

@ -19,7 +19,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.PAPAbstractType; import org.apache.poi.hwpf.model.types.PAPAbstractType;
import org.apache.poi.util.Removal;
@SuppressWarnings("unused") @SuppressWarnings("unused")
public final class ParagraphProperties extends PAPAbstractType implements Duplicatable { public final class ParagraphProperties extends PAPAbstractType implements Duplicatable {
@ -36,14 +35,6 @@ public final class ParagraphProperties extends PAPAbstractType implements Duplic
jcLogical = other.jcLogical; jcLogical = other.jcLogical;
} }
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public ParagraphProperties clone() {
return copy();
}
@Override @Override
public ParagraphProperties copy() { public ParagraphProperties copy() {
return new ParagraphProperties(this); return new ParagraphProperties(this);

View File

@ -20,7 +20,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.HWPFOldDocument; import org.apache.poi.hwpf.HWPFOldDocument;
import org.apache.poi.hwpf.model.SEPX; import org.apache.poi.hwpf.model.SEPX;
import org.apache.poi.util.Removal;
public final class Section extends Range implements Duplicatable { public final class Section extends Range implements Duplicatable {
private final SectionProperties _props; private final SectionProperties _props;
@ -40,14 +39,6 @@ public final class Section extends Range implements Duplicatable {
_props = sepx.getSectionProperties(); _props = sepx.getSectionProperties();
} }
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public Section clone() {
return copy();
}
@Override @Override
public Section copy() { public Section copy() {
return new Section(this); return new Section(this);

View File

@ -19,7 +19,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.SEPAbstractType; import org.apache.poi.hwpf.model.types.SEPAbstractType;
import org.apache.poi.util.Removal;
public final class SectionProperties extends SEPAbstractType implements Duplicatable { public final class SectionProperties extends SEPAbstractType implements Duplicatable {
private short field_60_rncftn; private short field_60_rncftn;
@ -50,14 +49,6 @@ public final class SectionProperties extends SEPAbstractType implements Duplicat
field_65_nfcednref = other.field_65_nfcednref; field_65_nfcednref = other.field_65_nfcednref;
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public SectionProperties clone() {
return copy();
}
@Override @Override
public SectionProperties copy() { public SectionProperties copy() {
return new SectionProperties(this); return new SectionProperties(this);

View File

@ -19,7 +19,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.SHDAbstractType; import org.apache.poi.hwpf.model.types.SHDAbstractType;
import org.apache.poi.util.Removal;
/** /**
* The SHD is a substructure of the CHP, PAP, and TC for Word 2000. * The SHD is a substructure of the CHP, PAP, and TC for Word 2000.
@ -36,14 +35,6 @@ public final class ShadingDescriptor extends SHDAbstractType implements Duplicat
fillFields( buf, offset ); fillFields( buf, offset );
} }
@Override
@SuppressWarnings("squid:S2975")
@Deprecated
@Removal(version = "5.0.0")
public ShadingDescriptor clone() {
return copy();
}
@Override @Override
public ShadingDescriptor copy() { public ShadingDescriptor copy() {
return new ShadingDescriptor(this); return new ShadingDescriptor(this);

View File

@ -20,7 +20,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.Colorref; import org.apache.poi.hwpf.model.Colorref;
import org.apache.poi.hwpf.model.types.SHD80AbstractType; import org.apache.poi.hwpf.model.types.SHD80AbstractType;
import org.apache.poi.util.Removal;
/** /**
* The SHD80 is a substructure of the CHP and PAP, and TC for Word 97. * The SHD80 is a substructure of the CHP and PAP, and TC for Word 97.
@ -42,14 +41,6 @@ public final class ShadingDescriptor80 extends SHD80AbstractType implements Dupl
field_1_value = value; field_1_value = value;
} }
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public ShadingDescriptor80 clone() {
return copy();
}
@Override @Override
public ShadingDescriptor80 copy() { public ShadingDescriptor80 copy() {
return new ShadingDescriptor80(this); return new ShadingDescriptor80(this);

View File

@ -20,7 +20,6 @@ import java.util.Objects;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.TLPAbstractType; import org.apache.poi.hwpf.model.types.TLPAbstractType;
import org.apache.poi.util.Removal;
public class TableAutoformatLookSpecifier extends TLPAbstractType implements Duplicatable { public class TableAutoformatLookSpecifier extends TLPAbstractType implements Duplicatable {
public static final int SIZE = 4; public static final int SIZE = 4;
@ -35,14 +34,6 @@ public class TableAutoformatLookSpecifier extends TLPAbstractType implements Dup
fillFields( data, offset ); fillFields( data, offset );
} }
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public TableAutoformatLookSpecifier clone() {
return copy();
}
@Override @Override
public TableAutoformatLookSpecifier copy() { public TableAutoformatLookSpecifier copy() {
return new TableAutoformatLookSpecifier(this); return new TableAutoformatLookSpecifier(this);

View File

@ -20,7 +20,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.TCAbstractType; import org.apache.poi.hwpf.model.types.TCAbstractType;
import org.apache.poi.util.LittleEndian; import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.Removal;
public final class TableCellDescriptor extends TCAbstractType implements Duplicatable { public final class TableCellDescriptor extends TCAbstractType implements Duplicatable {
public static final int SIZE = 20; public static final int SIZE = 20;
@ -51,14 +50,6 @@ public final class TableCellDescriptor extends TCAbstractType implements Duplica
getBrcRight().serialize(data, 0x10 + offset); getBrcRight().serialize(data, 0x10 + offset);
} }
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public TableCellDescriptor clone() {
return copy();
}
@Override @Override
public TableCellDescriptor copy() { public TableCellDescriptor copy() {
return new TableCellDescriptor(this); return new TableCellDescriptor(this);

View File

@ -19,7 +19,6 @@ package org.apache.poi.hwpf.usermodel;
import org.apache.poi.common.Duplicatable; import org.apache.poi.common.Duplicatable;
import org.apache.poi.hwpf.model.types.TAPAbstractType; import org.apache.poi.hwpf.model.types.TAPAbstractType;
import org.apache.poi.util.Removal;
public final class TableProperties extends TAPAbstractType implements Duplicatable { public final class TableProperties extends TAPAbstractType implements Duplicatable {
@ -64,14 +63,6 @@ public final class TableProperties extends TAPAbstractType implements Duplicatab
setRgdxaCenterPrint( new short[columns] ); setRgdxaCenterPrint( new short[columns] );
} }
@Override
@SuppressWarnings({"squid:S2975", "MethodDoesntCallSuperMethod"})
@Deprecated
@Removal(version = "5.0.0")
public TableProperties clone() {
return copy();
}
@Override @Override
public TableProperties copy() { public TableProperties copy() {
return new TableProperties(this); return new TableProperties(this);