aboutsummaryrefslogtreecommitdiffstats
path: root/src/integrationtest
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-08-13 21:08:24 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-08-13 21:08:24 +0000
commitdfdf9e6d6f470b82ad2a6b77e3059dd0df23905b (patch)
treecf5cdd45adcf98e078beb6e3841cfc7a502a7dd6 /src/integrationtest
parent4bf968d6bd96d51347380f3127e64dbb525c664d (diff)
downloadpoi-dfdf9e6d6f470b82ad2a6b77e3059dd0df23905b.tar.gz
poi-dfdf9e6d6f470b82ad2a6b77e3059dd0df23905b.zip
#64411 - Provide JigSaw modules
- rework extractors - see bugzilla entry for more information git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880839 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/integrationtest')
-rw-r--r--src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java2
-rw-r--r--src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java13
2 files changed, 8 insertions, 7 deletions
diff --git a/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java b/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
index 94bc98b9ec..d5a019c448 100644
--- a/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/AbstractFileHandler.java
@@ -29,11 +29,11 @@ import java.util.HashSet;
import java.util.Set;
import org.apache.poi.EncryptedDocumentException;
+import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.extractor.POIOLE2TextExtractor;
import org.apache.poi.extractor.POITextExtractor;
import org.apache.poi.hpsf.extractor.HPSFPropertiesExtractor;
import org.apache.poi.hssf.extractor.EventBasedExcelExtractor;
-import org.apache.poi.ooxml.extractor.ExtractorFactory;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.ss.extractor.ExcelExtractor;
import org.apache.poi.util.IOUtils;
diff --git a/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java b/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
index ba6e4c1b0a..fa4d038682 100644
--- a/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
+++ b/src/integrationtest/org/apache/poi/stress/XSLFFileHandler.java
@@ -23,7 +23,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
-import org.apache.poi.ooxml.extractor.ExtractorFactory;
+import org.apache.poi.extractor.ExtractorFactory;
import org.apache.poi.sl.extractor.SlideShowExtractor;
import org.apache.poi.xslf.usermodel.XMLSlideShow;
import org.apache.poi.xslf.usermodel.XSLFSlideShow;
@@ -37,11 +37,11 @@ public class XSLFFileHandler extends SlideShowHandler {
assertNotNull(slideInner.getPresentation());
assertNotNull(slideInner.getSlideMasterReferences());
assertNotNull(slideInner.getSlideReferences());
-
+
new POIXMLDocumentHandler().handlePOIXMLDocument(slide);
handleSlideShow(slide);
-
+
slideInner.close();
slide.close();
}
@@ -49,11 +49,12 @@ public class XSLFFileHandler extends SlideShowHandler {
@Override
public void handleExtracting(File file) throws Exception {
super.handleExtracting(file);
-
-
+
+
// additionally try the other getText() methods
- try (SlideShowExtractor extractor = ExtractorFactory.createExtractor(file)) {
+ //noinspection rawtypes
+ try (SlideShowExtractor extractor = (SlideShowExtractor) ExtractorFactory.createExtractor(file)) {
assertNotNull(extractor);
extractor.setSlidesByDefault(true);
extractor.setNotesByDefault(true);