From 8ea3d2274df4fc08602da046a8a4a85f40f7a9dc Mon Sep 17 00:00:00 2001 From: Marius Volkhart Date: Mon, 1 Mar 2021 18:46:35 +0000 Subject: [PATCH] Remove deprecated HWPF FSPA methods These methods have been @Deprecated for years, and are part of @Internal structures. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1887039 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hwpf/model/FSPA.java | 9 +-------- .../org/apache/poi/hwpf/model/FSPATable.java | 17 ----------------- .../poi/hwpf/model/FileInformationBlock.java | 12 ------------ 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java index d914f82e28..3688914061 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FSPA.java @@ -28,13 +28,6 @@ import org.apache.poi.util.Internal; @Internal public final class FSPA extends FSPAAbstractType { - @Deprecated - public static final int FSPA_SIZE = getSize(); // 26 - - public FSPA() - { - } - public FSPA( byte[] bytes, int offset ) { fillFields( bytes, offset ); @@ -42,7 +35,7 @@ public final class FSPA extends FSPAAbstractType public byte[] toByteArray() { - byte[] buf = new byte[FSPA_SIZE]; + byte[] buf = new byte[getSize()]; serialize( buf, 0 ); return buf; } diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java index 3122841a7e..e1819a66d9 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FSPATable.java @@ -48,23 +48,6 @@ public final class FSPATable } } - @Deprecated - public FSPATable( byte[] tableStream, int fcPlcspa, int lcbPlcspa, - List tpt ) - { - // Will be 0 if no drawing objects in document - if ( fcPlcspa == 0 ) - return; - - PlexOfCps plex = new PlexOfCps( tableStream, fcPlcspa, lcbPlcspa, - FSPA.FSPA_SIZE ); - for ( int i = 0; i < plex.length(); i++ ) - { - GenericPropertyNode property = plex.getProperty( i ); - _byStart.put(property.getStart(), property ); - } - } - public FSPA getFspaFromCp( int cp ) { GenericPropertyNode propertyNode = _byStart.get(cp); diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java index e03c2962fa..0fb355cc4a 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java @@ -992,18 +992,6 @@ public final class FileInformationBlock { _fieldHandler.setFieldSize( part.getFibFieldsField(), length ); } - @Deprecated - public int getFcPlcspaMom() - { - return _fieldHandler.getFieldOffset(FIBFieldHandler.PLCSPAMOM); - } - - @Deprecated - public int getLcbPlcspaMom() - { - return _fieldHandler.getFieldSize(FIBFieldHandler.PLCSPAMOM); - } - /** * @return Offset in the Table Stream at which the {@link OfficeArtContent} exists. */ -- 2.39.5