From 241c7e2bb2ba90b3e47d154e61e915f06945f7bc Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 28 Jun 2020 08:42:23 +0000 Subject: remove some more deprecated code git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879298 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hpsf/ClassID.java | 54 ---------------------- src/java/org/apache/poi/hpsf/PropertySet.java | 20 -------- .../org/apache/poi/hssf/model/DrawingManager2.java | 37 --------------- 3 files changed, 111 deletions(-) (limited to 'src/java/org') diff --git a/src/java/org/apache/poi/hpsf/ClassID.java b/src/java/org/apache/poi/hpsf/ClassID.java index 15eefc476b..42a960a4c7 100644 --- a/src/java/org/apache/poi/hpsf/ClassID.java +++ b/src/java/org/apache/poi/hpsf/ClassID.java @@ -39,60 +39,6 @@ import org.apache.poi.util.LittleEndianOutput; * The ClassID (or CLSID) is a UUID - see RFC 4122 */ public class ClassID implements Duplicatable, GenericRecord { - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID OLE10_PACKAGE = ClassIDPredefined.OLE_V1_PACKAGE.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID PPT_SHOW = ClassIDPredefined.POWERPOINT_V8.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID XLS_WORKBOOK = ClassIDPredefined.EXCEL_V7_WORKBOOK.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID TXT_ONLY = ClassIDPredefined.TXT_ONLY.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL_V3 = ClassIDPredefined.EXCEL_V3.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL_V3_CHART = ClassIDPredefined.EXCEL_V3_CHART.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL_V3_MACRO = ClassIDPredefined.EXCEL_V3_MACRO.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL95 = ClassIDPredefined.EXCEL_V7.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL95_CHART = ClassIDPredefined.EXCEL_V7_CHART.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL97 = ClassIDPredefined.EXCEL_V8.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL97_CHART = ClassIDPredefined.EXCEL_V8_CHART.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL2003 = ClassIDPredefined.EXCEL_V11.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL2007 = ClassIDPredefined.EXCEL_V12.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL2007_MACRO= ClassIDPredefined.EXCEL_V12_MACRO.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL2007_XLSB = ClassIDPredefined.EXCEL_V12_XLSB.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL2010 = ClassIDPredefined.EXCEL_V14.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL2010_CHART= ClassIDPredefined.EXCEL_V14_CHART.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EXCEL2010_ODS = ClassIDPredefined.EXCEL_V14_ODS.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID WORD95 = ClassIDPredefined.WORD_V7.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID WORD97 = ClassIDPredefined.WORD_V8.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID WORD2007 = ClassIDPredefined.WORD_V12.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID WORD2007_MACRO = ClassIDPredefined.WORD_V12_MACRO.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID POWERPOINT97 = ClassIDPredefined.POWERPOINT_V8.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID POWERPOINT95 = ClassIDPredefined.POWERPOINT_V7.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID POWERPOINT2007 = ClassIDPredefined.POWERPOINT_V12.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID POWERPOINT2007_MACRO = ClassIDPredefined.POWERPOINT_V12_MACRO.getClassID(); - /** @deprecated use enum {@link ClassIDPredefined} */ @Deprecated - public static final ClassID EQUATION30 = ClassIDPredefined.EQUATION_V3.getClassID(); /** The number of bytes occupied by this object in the byte stream. */ public static final int LENGTH = 16; diff --git a/src/java/org/apache/poi/hpsf/PropertySet.java b/src/java/org/apache/poi/hpsf/PropertySet.java index 11c6a911d0..d110747d11 100644 --- a/src/java/org/apache/poi/hpsf/PropertySet.java +++ b/src/java/org/apache/poi/hpsf/PropertySet.java @@ -788,26 +788,6 @@ public class PropertySet { } - - /** - * If the {@link PropertySet} has only a single section this method returns it. - * - * @return The singleSection value - * - * @deprecated superfluous convenience method - */ - @Deprecated - @Removal(version="5.0.0") - public Section getSingleSection() { - final int sectionCount = getSectionCount(); - if (sectionCount != 1) { - throw new NoSingleSectionException("Property set contains " + sectionCount + " sections."); - } - return sections.get(0); - } - - - /** * Returns {@code true} if the {@code PropertySet} is equal * to the specified parameter, else {@code false}. diff --git a/src/java/org/apache/poi/hssf/model/DrawingManager2.java b/src/java/org/apache/poi/hssf/model/DrawingManager2.java index 48356442bb..7502b4aee9 100644 --- a/src/java/org/apache/poi/hssf/model/DrawingManager2.java +++ b/src/java/org/apache/poi/hssf/model/DrawingManager2.java @@ -22,7 +22,6 @@ import java.util.List; import org.apache.poi.ddf.EscherDgRecord; import org.apache.poi.ddf.EscherDggRecord; -import org.apache.poi.util.Removal; /** @@ -62,42 +61,6 @@ public class DrawingManager2 { return dg; } - /** - * Allocates new shape id for the drawing group id. - * - * @param drawingGroupId the drawing group id - * - * @return a new shape id - * - * @deprecated in POI 3.17-beta2, use allocateShapeId(EscherDgRecord) - */ - @Deprecated - @Removal(version="4.0") - public int allocateShapeId(short drawingGroupId) { - for (EscherDgRecord dg : drawingGroups) { - if (dg.getDrawingGroupId() == drawingGroupId) { - return allocateShapeId(dg); - } - } - throw new IllegalStateException("Drawing group id "+drawingGroupId+" doesn't exist."); - } - - /** - * Allocates new shape id for the drawing group - * - * @param drawingGroupId the drawing group id - * @param dg the EscherDgRecord which receives the new shape - * - * @return a new shape id. - * - * @deprecated in POI 3.17-beta2, use allocateShapeId(EscherDgRecord) - */ - @Deprecated - @Removal(version="4.0") - public int allocateShapeId(short drawingGroupId, EscherDgRecord dg) { - return allocateShapeId(dg); - } - /** * Allocates new shape id for the drawing group * -- cgit v1.2.3