aboutsummaryrefslogtreecommitdiffstats
path: root/src/integrationtest
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2018-04-20 12:52:59 +0000
committerAndreas Beeker <kiwiwings@apache.org>2018-04-20 12:52:59 +0000
commite81613175907a4f6f7d135c57cb412c78ea1db72 (patch)
tree6ac39087004deb05a5aed2fced79de41b19dad4f /src/integrationtest
parent154493dda310967946c2ccc8939192a2b9b19328 (diff)
downloadpoi-e81613175907a4f6f7d135c57cb412c78ea1db72.tar.gz
poi-e81613175907a4f6f7d135c57cb412c78ea1db72.zip
#62319 - Decommission XSLF-/PowerPointExtractor
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1829653 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/integrationtest')
-rw-r--r--src/integrationtest/org/apache/poi/TestAllFiles.java2
-rw-r--r--src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java16
2 files changed, 12 insertions, 6 deletions
diff --git a/src/integrationtest/org/apache/poi/TestAllFiles.java b/src/integrationtest/org/apache/poi/TestAllFiles.java
index 333a8ebcdc..8721c50948 100644
--- a/src/integrationtest/org/apache/poi/TestAllFiles.java
+++ b/src/integrationtest/org/apache/poi/TestAllFiles.java
@@ -330,8 +330,6 @@ public class TestAllFiles {
);
private static final Set<String> IGNORED = unmodifiableHashSet(
- // need JDK8+ - https://bugs.openjdk.java.net/browse/JDK-8038081
- "slideshow/42474-2.ppt",
// OPC handler works / XSSF handler fails
"spreadsheet/57181.xlsm",
"spreadsheet/61300.xls"//intentionally fuzzed -- used to cause infinite loop
diff --git a/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java b/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
index 7aab657650..80fe858249 100644
--- a/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
@@ -24,6 +24,7 @@ import java.io.FileInputStream;
import java.io.InputStream;
import org.apache.poi.extractor.ExtractorFactory;
+import org.apache.poi.sl.extractor.SlideShowExtractor;
import org.apache.poi.xslf.extractor.XSLFPowerPointExtractor;
import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.xslf.usermodel.XSLFSlideShow;
@@ -53,12 +54,19 @@ public class XSLFFileHandler extends SlideShowHandler {
// additionally try the other getText() methods
- try (XSLFPowerPointExtractor extractor = (XSLFPowerPointExtractor) ExtractorFactory.createExtractor(file)) {
+ try (SlideShowExtractor extractor = ExtractorFactory.createExtractor(file)) {
assertNotNull(extractor);
+ extractor.setSlidesByDefault(true);
+ extractor.setNotesByDefault(true);
+ extractor.setMasterByDefault(true);
- assertNotNull(extractor.getText(true, true, true));
- assertEquals("With all options disabled we should not get text",
- "", extractor.getText(false, false, false));
+ assertNotNull(extractor.getText());
+
+ extractor.setSlidesByDefault(false);
+ extractor.setNotesByDefault(false);
+ extractor.setMasterByDefault(false);
+
+ assertEquals("With all options disabled we should not get text", "", extractor.getText());
}
}