aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-08-14 20:26:21 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-08-14 20:26:21 +0000
commitb9841b4007c5a4590262600b51ee863bb7678168 (patch)
tree40abdfeb59ff86126d9e2c378cfcce249890d569 /src/ooxml
parent5caf8e109b8fac9341091b7a7bc94a29db01c267 (diff)
downloadpoi-b9841b4007c5a4590262600b51ee863bb7678168.tar.gz
poi-b9841b4007c5a4590262600b51ee863bb7678168.zip
also handle wrapped OOXML "Package" nodes inside of OLE2 containers
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880861 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml')
-rw-r--r--src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java b/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java
index ed3067869f..088e09c3fe 100644
--- a/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java
+++ b/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLExtractorFactory.java
@@ -16,6 +16,8 @@
==================================================================== */
package org.apache.poi.ooxml.extractor;
+import static org.apache.poi.extractor.ExtractorFactory.OOXML_PACKAGE;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -253,8 +255,8 @@ public final class POIXMLExtractorFactory implements ExtractorProvider {
@Override
public POITextExtractor create(DirectoryNode poifsDir, String password) throws IOException {
// First, check for plain OOXML package
- if (poifsDir.hasEntry("Package")) {
- try (InputStream is = poifsDir.createDocumentInputStream("Package")) {
+ if (poifsDir.hasEntry(OOXML_PACKAGE)) {
+ try (InputStream is = poifsDir.createDocumentInputStream(OOXML_PACKAGE)) {
return create(is, password);
}
}