aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.xml23
-rw-r--r--src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java3
-rw-r--r--src/multimodule/ooxml-full/java9/module-info.java3
-rw-r--r--src/multimodule/ooxml-lite/java9/module-info.classbin1599 -> 1663 bytes
-rw-r--r--src/multimodule/ooxml-lite/java9/module-info.java3
-rw-r--r--src/ooxml/testcases/org/apache/poi/extractor/ooxml/TestExtractorFactory.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java1
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java9
-rw-r--r--test-data/integration/stress001.docxbin0 -> 16997 bytes
-rw-r--r--test-data/integration/stress002.xlsxbin0 -> 374843 bytes
-rw-r--r--test-data/integration/stress003.docxbin0 -> 103978 bytes
-rw-r--r--test-data/integration/stress004.docxbin0 -> 529658 bytes
-rw-r--r--test-data/integration/stress005.docxbin0 -> 46459 bytes
-rw-r--r--test-data/integration/stress006.docxbin0 -> 19274 bytes
-rw-r--r--test-data/integration/stress007.docxbin0 -> 16017 bytes
-rw-r--r--test-data/integration/stress008.docxbin0 -> 291278 bytes
-rw-r--r--test-data/integration/stress009.docxbin0 -> 61054 bytes
-rw-r--r--test-data/integration/stress010.docxbin0 -> 263616 bytes
-rw-r--r--test-data/integration/stress011.docxbin0 -> 127751 bytes
-rw-r--r--test-data/integration/stress012.docxbin0 -> 6283 bytes
-rw-r--r--test-data/integration/stress013.pptxbin0 -> 170655 bytes
-rw-r--r--test-data/integration/stress014.docxbin0 -> 240784 bytes
-rw-r--r--test-data/integration/stress015.docxbin0 -> 343372 bytes
-rw-r--r--test-data/integration/stress016.docxbin0 -> 56365 bytes
-rw-r--r--test-data/integration/stress017.docxbin0 -> 110028 bytes
-rw-r--r--test-data/integration/stress018.docxbin0 -> 321860 bytes
-rw-r--r--test-data/integration/stress019.docxbin0 -> 49296 bytes
-rw-r--r--test-data/integration/stress020.xlsxbin0 -> 17289 bytes
29 files changed, 32 insertions, 14 deletions
diff --git a/build.xml b/build.xml
index b2ed09d96d..f2d71a1cef 100644
--- a/build.xml
+++ b/build.xml
@@ -1753,16 +1753,23 @@ under the License.
</modulepath>
</javac>
+ <copy file="${ooxml.lite.report}.clazz" tofile="${ooxml.lite.report}.clazz1" overwrite="true">
+ <filterchain>
+ <sortfilter/>
+ <suffixlines suffix="$*.class"/>
+ </filterchain>
+ </copy>
+
<copy file="${ooxml.lite.report}.clazz" tofile="${ooxml.lite.report}.clazz2" overwrite="true">
<filterchain>
- <tokenfilter>
- <replaceregex pattern="(.*)" replace="\1.class${line.separator}\1$*.class "/>
- </tokenfilter>
+ <sortfilter/>
+ <suffixlines suffix=".class"/>
</filterchain>
</copy>
<copy file="${ooxml.lite.report}.xsb" tofile="${ooxml.lite.report}.xsb2" overwrite="true">
<filterchain>
+ <sortfilter/>
<prefixlines prefix="org/apache/poi/schemas/ooxml/system/ooxml/"/>
<suffixlines suffix=".xsb"/>
</filterchain>
@@ -1770,15 +1777,17 @@ under the License.
<mkdir dir="build/dist/maven/poi-ooxml-lite"/>
- <jar destfile="${ooxml.lite.jar}" duplicate="preserve">
+ <jar destfile="${ooxml.lite.jar}" duplicate="fail">
<zipfileset dir="${basedir}/src/multimodule/ooxml-lite/java9" prefix="META-INF/versions/9" excludes="*.java"/>
<zipfileset src="${ooxml.xsds.jar}">
- <patternset includesfile="${ooxml.lite.report}.clazz2">
+ <patternset>
+ <includesfile name="${ooxml.lite.report}.clazz1"/>
+ <includesfile name="${ooxml.lite.report}.clazz2"/>
+ <includesfile name="${ooxml.lite.report}.xsb2"/>
+<!-- <include name="org/apache/poi/schemas/ooxml/system/ooxml/*.xsb"/>-->
<include name="org/apache/poi/schemas/ooxml/element/**/*.xsb"/>
</patternset>
- <patternset includesfile="${ooxml.lite.report}.xsb2"/>
</zipfileset>
- <zipfileset dir="src/multimodule/ooxml-full/java9" prefix="META-INF/versions/9" excludes="*.java"/>
<manifest>
<attribute name="Multi-Release" value="true"/>
<attribute name="Automatic-Module-Name" value="org.apache.poi.ooxml.schemas"/>
diff --git a/src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java b/src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java
index eb80d9286f..069aef0ebe 100644
--- a/src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java
+++ b/src/examples/src/org/apache/poi/examples/ss/ExcelComparator.java
@@ -24,6 +24,7 @@ import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
+import java.util.Objects;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.Cell;
@@ -477,7 +478,7 @@ public class ExcelComparator {
String col1 = getCellFillBackground(loc1);
String col2 = getCellFillBackground(loc2);
- if (!col1.equals(col2)) {
+ if (!Objects.equals(col1, col2)) {
addMessage(loc1, loc2, "Cell Fill Color does not Match ::", col1, col2);
}
}
diff --git a/src/multimodule/ooxml-full/java9/module-info.java b/src/multimodule/ooxml-full/java9/module-info.java
index 4587ea5e5d..4600c9082a 100644
--- a/src/multimodule/ooxml-full/java9/module-info.java
+++ b/src/multimodule/ooxml-full/java9/module-info.java
@@ -21,6 +21,9 @@ open module org.apache.poi.ooxml.schemas {
// see https://bugs.openjdk.java.net/browse/JDK-8240847
requires transitive org.apache.xmlbeans;
requires java.xml;
+
+ exports org.apache.poi.schemas.ooxml.system.ooxml;
+
exports com.microsoft.schemas.compatibility;
exports com.microsoft.schemas.office.excel;
exports com.microsoft.schemas.office.office;
diff --git a/src/multimodule/ooxml-lite/java9/module-info.class b/src/multimodule/ooxml-lite/java9/module-info.class
index f6cd8ef67d..5a1a8d9258 100644
--- a/src/multimodule/ooxml-lite/java9/module-info.class
+++ b/src/multimodule/ooxml-lite/java9/module-info.class
Binary files differ
diff --git a/src/multimodule/ooxml-lite/java9/module-info.java b/src/multimodule/ooxml-lite/java9/module-info.java
index 1b22147d88..2559d369d8 100644
--- a/src/multimodule/ooxml-lite/java9/module-info.java
+++ b/src/multimodule/ooxml-lite/java9/module-info.java
@@ -23,6 +23,8 @@ open module org.apache.poi.ooxml.schemas {
requires java.xml;
+
+
exports com.microsoft.schemas.compatibility;
exports com.microsoft.schemas.office.excel;
exports com.microsoft.schemas.office.office;
@@ -40,6 +42,7 @@ open module org.apache.poi.ooxml.schemas {
exports org.openxmlformats.schemas.officeDocument.x2006.customProperties;
exports org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes;
exports org.openxmlformats.schemas.officeDocument.x2006.extendedProperties;
+ exports org.openxmlformats.schemas.officeDocument.x2006.math;
exports org.openxmlformats.schemas.officeDocument.x2006.relationships;
exports org.openxmlformats.schemas.officeDocument.x2006.sharedTypes;
exports org.openxmlformats.schemas.presentationml.x2006.main;
diff --git a/src/ooxml/testcases/org/apache/poi/extractor/ooxml/TestExtractorFactory.java b/src/ooxml/testcases/org/apache/poi/extractor/ooxml/TestExtractorFactory.java
index 9715e49e80..6ea3b2132e 100644
--- a/src/ooxml/testcases/org/apache/poi/extractor/ooxml/TestExtractorFactory.java
+++ b/src/ooxml/testcases/org/apache/poi/extractor/ooxml/TestExtractorFactory.java
@@ -81,6 +81,7 @@ public class TestExtractorFactory {
private static final POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
private static final File ppt = getFileAndCheck(slTests, "SampleShow.ppt");
private static final File pptx = getFileAndCheck(slTests, "SampleShow.pptx");
+ private static final File ppt97 = getFileAndCheck(slTests, "bug56240.ppt");
private static final File txt = getFileAndCheck(slTests, "SampleShow.txt");
private static final POIDataSamples olTests = POIDataSamples.getHSMFInstance();
@@ -126,6 +127,7 @@ public class TestExtractorFactory {
Arguments.of("Word 6", doc6, "Word6Extractor", 20),
Arguments.of("Word 95", doc95, "Word6Extractor", 120),
Arguments.of("PowerPoint", ppt, "SlideShowExtractor", 120),
+ Arguments.of("PowerPoint 97 Dual", ppt97, "SlideShowExtractor", 120),
Arguments.of("Visio", vsd, "VisioTextExtractor", 50),
Arguments.of("Publisher", pub, "PublisherTextExtractor", 50),
Arguments.of("Outlook msg", msg, "OutlookTextExtractor", 50)
diff --git a/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java b/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
index dfc09b2f7e..40904fe718 100644
--- a/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
+++ b/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
@@ -100,7 +100,7 @@ public class OLE2ScratchpadExtractorFactory implements ExtractorProvider {
}
}
- if (poifsDir.hasEntry(HSLFSlideShow.POWERPOINT_DOCUMENT)) {
+ if (poifsDir.hasEntry(HSLFSlideShow.POWERPOINT_DOCUMENT) || poifsDir.hasEntry(HSLFSlideShow.PP97_DOCUMENT)) {
return new SlideShowExtractor<>((HSLFSlideShow)SlideShowFactory.create(poifsDir));
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
index 63e9b69101..9e8d255798 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
@@ -78,6 +78,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
/** Powerpoint document entry/stream name */
public static final String POWERPOINT_DOCUMENT = "PowerPoint Document";
+ public static final String PP97_DOCUMENT = "PP97_DUALSTORAGE";
public static final String PP95_DOCUMENT = "PP40";
enum LoadSavePhase {
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 264dcb0b4d..c5a43fff87 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
@@ -19,6 +19,7 @@ package org.apache.poi.hslf.usermodel;
import static org.apache.poi.hslf.usermodel.HSLFSlideShow.POWERPOINT_DOCUMENT;
import static org.apache.poi.hslf.usermodel.HSLFSlideShow.PP95_DOCUMENT;
+import static org.apache.poi.hslf.usermodel.HSLFSlideShow.PP97_DOCUMENT;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -74,8 +75,6 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 200_000_000;
- private static final String DUAL_STORAGE_NAME = "PP97_DUALSTORAGE";
-
// Holds metadata on where things are in our document
private CurrentUserAtom currentUser;
@@ -163,10 +162,10 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
private static DirectoryNode handleDualStorage(DirectoryNode dir) throws IOException {
// when there's a dual storage entry, use it, as the outer document can't be read quite probably ...
- if (!dir.hasEntry(DUAL_STORAGE_NAME)) {
+ if (!dir.hasEntry(PP97_DOCUMENT)) {
return dir;
}
- return (DirectoryNode) dir.getEntry(DUAL_STORAGE_NAME);
+ return (DirectoryNode) dir.getEntry(PP97_DOCUMENT);
}
/**
@@ -831,7 +830,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
// only close the filesystem, if we are based on the root node.
// embedded documents/slideshows shouldn't close the parent container
if (getDirectory().getParent() == null ||
- getDirectory().getName().equals(DUAL_STORAGE_NAME)) {
+ PP97_DOCUMENT.equals(getDirectory().getName())) {
POIFSFileSystem fs = getDirectory().getFileSystem();
if (fs != null) {
fs.close();
diff --git a/test-data/integration/stress001.docx b/test-data/integration/stress001.docx
new file mode 100644
index 0000000000..4be44a6002
--- /dev/null
+++ b/test-data/integration/stress001.docx
Binary files differ
diff --git a/test-data/integration/stress002.xlsx b/test-data/integration/stress002.xlsx
new file mode 100644
index 0000000000..9428f84c9d
--- /dev/null
+++ b/test-data/integration/stress002.xlsx
Binary files differ
diff --git a/test-data/integration/stress003.docx b/test-data/integration/stress003.docx
new file mode 100644
index 0000000000..100917bff3
--- /dev/null
+++ b/test-data/integration/stress003.docx
Binary files differ
diff --git a/test-data/integration/stress004.docx b/test-data/integration/stress004.docx
new file mode 100644
index 0000000000..8997b02ad5
--- /dev/null
+++ b/test-data/integration/stress004.docx
Binary files differ
diff --git a/test-data/integration/stress005.docx b/test-data/integration/stress005.docx
new file mode 100644
index 0000000000..56f9f1afe5
--- /dev/null
+++ b/test-data/integration/stress005.docx
Binary files differ
diff --git a/test-data/integration/stress006.docx b/test-data/integration/stress006.docx
new file mode 100644
index 0000000000..765846ec3f
--- /dev/null
+++ b/test-data/integration/stress006.docx
Binary files differ
diff --git a/test-data/integration/stress007.docx b/test-data/integration/stress007.docx
new file mode 100644
index 0000000000..5eb9df6546
--- /dev/null
+++ b/test-data/integration/stress007.docx
Binary files differ
diff --git a/test-data/integration/stress008.docx b/test-data/integration/stress008.docx
new file mode 100644
index 0000000000..6a9c5d3c7d
--- /dev/null
+++ b/test-data/integration/stress008.docx
Binary files differ
diff --git a/test-data/integration/stress009.docx b/test-data/integration/stress009.docx
new file mode 100644
index 0000000000..f811dd7819
--- /dev/null
+++ b/test-data/integration/stress009.docx
Binary files differ
diff --git a/test-data/integration/stress010.docx b/test-data/integration/stress010.docx
new file mode 100644
index 0000000000..5ffdbda231
--- /dev/null
+++ b/test-data/integration/stress010.docx
Binary files differ
diff --git a/test-data/integration/stress011.docx b/test-data/integration/stress011.docx
new file mode 100644
index 0000000000..46b098d55a
--- /dev/null
+++ b/test-data/integration/stress011.docx
Binary files differ
diff --git a/test-data/integration/stress012.docx b/test-data/integration/stress012.docx
new file mode 100644
index 0000000000..7146047f2c
--- /dev/null
+++ b/test-data/integration/stress012.docx
Binary files differ
diff --git a/test-data/integration/stress013.pptx b/test-data/integration/stress013.pptx
new file mode 100644
index 0000000000..574ba55ed7
--- /dev/null
+++ b/test-data/integration/stress013.pptx
Binary files differ
diff --git a/test-data/integration/stress014.docx b/test-data/integration/stress014.docx
new file mode 100644
index 0000000000..32503135d2
--- /dev/null
+++ b/test-data/integration/stress014.docx
Binary files differ
diff --git a/test-data/integration/stress015.docx b/test-data/integration/stress015.docx
new file mode 100644
index 0000000000..8853d4851f
--- /dev/null
+++ b/test-data/integration/stress015.docx
Binary files differ
diff --git a/test-data/integration/stress016.docx b/test-data/integration/stress016.docx
new file mode 100644
index 0000000000..f65f2d074a
--- /dev/null
+++ b/test-data/integration/stress016.docx
Binary files differ
diff --git a/test-data/integration/stress017.docx b/test-data/integration/stress017.docx
new file mode 100644
index 0000000000..1f39b2cc56
--- /dev/null
+++ b/test-data/integration/stress017.docx
Binary files differ
diff --git a/test-data/integration/stress018.docx b/test-data/integration/stress018.docx
new file mode 100644
index 0000000000..10f30e4df9
--- /dev/null
+++ b/test-data/integration/stress018.docx
Binary files differ
diff --git a/test-data/integration/stress019.docx b/test-data/integration/stress019.docx
new file mode 100644
index 0000000000..420ad1d11f
--- /dev/null
+++ b/test-data/integration/stress019.docx
Binary files differ
diff --git a/test-data/integration/stress020.xlsx b/test-data/integration/stress020.xlsx
new file mode 100644
index 0000000000..8ed54cf770
--- /dev/null
+++ b/test-data/integration/stress020.xlsx
Binary files differ