</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>
<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"/>
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;
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);
}
}
// 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;
requires java.xml;
+
+
exports com.microsoft.schemas.compatibility;
exports com.microsoft.schemas.office.excel;
exports com.microsoft.schemas.office.office;
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;
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();
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)
}
}
- if (poifsDir.hasEntry(HSLFSlideShow.POWERPOINT_DOCUMENT)) {
+ if (poifsDir.hasEntry(HSLFSlideShow.POWERPOINT_DOCUMENT) || poifsDir.hasEntry(HSLFSlideShow.PP97_DOCUMENT)) {
return new SlideShowExtractor<>((HSLFSlideShow)SlideShowFactory.create(poifsDir));
}
/** 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 {
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;
//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;
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);
}
/**
// 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();