From ae12cfcd574ebf59cba53f555b755f723aa2e6d1 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Fri, 17 Jun 2016 00:55:22 +0000 Subject: [PATCH] bug 59170: remove deprecated HSLF and HWPF methods git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748783 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/hslf/extractor/PowerPointExtractor.java | 8 -------- .../apache/poi/hslf/record/PersistPtrHolder.java | 11 ----------- .../poi/hslf/usermodel/HSLFPictureData.java | 10 ---------- .../poi/hslf/usermodel/HSLFSlideShowImpl.java | 15 --------------- .../src/org/apache/poi/hwpf/HWPFDocument.java | 16 ---------------- .../src/org/apache/poi/hwpf/HWPFOldDocument.java | 5 ----- .../poi/hwpf/extractor/TestWordExtractor.java | 4 ++-- 7 files changed, 2 insertions(+), 67 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java b/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java index 1ce8029f47..f248ab633d 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java +++ b/src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java @@ -118,14 +118,6 @@ public final class PowerPointExtractor extends POIOLE2TextExtractor { this(new HSLFSlideShowImpl(dir)); } - /** - * @deprecated Use {@link #PowerPointExtractor(DirectoryNode)} instead - */ - @Deprecated - public PowerPointExtractor(DirectoryNode dir, POIFSFileSystem fs) throws IOException { - this(new HSLFSlideShowImpl(dir, fs)); - } - /** * Creates a PowerPointExtractor, from a HSLFSlideShow * diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java b/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java index 3095b5e422..32b36a21b9 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java +++ b/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java @@ -84,17 +84,6 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom return _slideLocations; } - /** - * Get the lookup from slide numbers to their offsets inside - * _ptrData, used when adding or moving slides. - * - * @deprecated since POI 3.11, not supported anymore - */ - @Deprecated - public Hashtable getSlideOffsetDataLocationsLookup() { - throw new UnsupportedOperationException("PersistPtrHolder.getSlideOffsetDataLocationsLookup() is not supported since 3.12-Beta1"); - } - /** * Create a new holder for a PersistPtr record */ diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java index 199ada8fcf..f3da760972 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFPictureData.java @@ -192,16 +192,6 @@ public abstract class HSLFPictureData implements PictureData { return header; } - /** - * Return image size in bytes - * - * @return the size of the picture in bytes - * @deprecated Use getData().length instead. - */ - public int getSize(){ - return getData().length; - } - /** * @return the 1-based index of this pictures within the pictures stream */ diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java index a1e76d560a..d878182b37 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java @@ -141,21 +141,6 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable { this(filesystem.getRoot()); } - /** - * Constructs a Powerpoint document from a specific point in a - * POIFS Filesystem. Parses the document and places all the - * important stuff into data structures. - * - * @deprecated Use {@link #HSLFSlideShowImpl(DirectoryNode)} instead - * @param dir the POIFS directory to read from - * @param filesystem the POIFS FileSystem to read from - * @throws IOException if there is a problem while parsing the document. - */ - @Deprecated - public HSLFSlideShowImpl(DirectoryNode dir, POIFSFileSystem filesystem) throws IOException { - this(dir); - } - /** * Constructs a Powerpoint document from a specific point in a * POIFS Filesystem. Parses the document and places all the diff --git a/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java b/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java index 8bc5ba6f78..872ed1d2fd 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java @@ -186,22 +186,6 @@ public final class HWPFDocument extends HWPFDocumentCore this(pfilesystem.getRoot()); } - /** - * This constructor loads a Word document from a specific point - * in a POIFSFileSystem, probably not the default. - * Used typically to open embedded documents. - * - * @param pfilesystem The POIFSFileSystem that contains the Word document. - * @throws IOException If there is an unexpected IOException from the passed - * in POIFSFileSystem. - * @deprecated Use {@link #HWPFDocument(DirectoryNode)} instead - */ - @Deprecated - public HWPFDocument(DirectoryNode directory, POIFSFileSystem pfilesystem) throws IOException - { - this(directory); - } - /** * This constructor loads a Word document from a specific point * in a POIFSFileSystem, probably not the default. diff --git a/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java b/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java index 1ea906a282..7930d4ac55 100644 --- a/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java +++ b/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java @@ -44,11 +44,6 @@ public class HWPFOldDocument extends HWPFDocumentCore { this(fs.getRoot()); } - @Deprecated - public HWPFOldDocument(DirectoryNode directory, POIFSFileSystem fs) - throws IOException { - this(directory); - } public HWPFOldDocument(DirectoryNode directory) throws IOException { super(directory); diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java index 1a69630a2c..efc5c0a207 100644 --- a/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java +++ b/src/scratchpad/testcases/org/apache/poi/hwpf/extractor/TestWordExtractor.java @@ -161,7 +161,7 @@ public final class TestWordExtractor extends TestCase { assertNotNull(dirB.getEntry("WordDocument")); // Check each in turn - doc = new HWPFDocument(dirA, fs); + doc = new HWPFDocument(dirA); extractor3 = new WordExtractor(doc); assertNotNull(extractor3.getText()); @@ -171,7 +171,7 @@ public final class TestWordExtractor extends TestCase { assertEquals("Sample Doc 1", extractor3.getSummaryInformation().getTitle()); assertEquals("Sample Test", extractor3.getSummaryInformation().getSubject()); - doc = new HWPFDocument(dirB, fs); + doc = new HWPFDocument(dirB); extractor3 = new WordExtractor(doc); assertNotNull(extractor3.getText()); -- 2.39.5