Skip to content
Commits on Source (12)
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/java"/>
<classpathentry kind="src" path="src/testcases"/>
<classpathentry kind="src" path="src/resources/main"/>
<classpathentry kind="src" path="src/ooxml/java"/>
<classpathentry kind="src" path="src/ooxml/testcases"/>
<classpathentry kind="src" path="src/resources/ooxml"/>
<classpathentry kind="src" path="src/scratchpad/src"/>
<classpathentry kind="src" path="src/scratchpad/testcases"/>
<classpathentry kind="src" path="src/resources/scratchpad"/>
<classpathentry kind="src" path="src/contrib/poi-ruby/java"/>
<classpathentry kind="src" path="src/examples/src"/>
<classpathentry kind="src" path="src/excelant/java"/>
<classpathentry kind="src" path="src/excelant/testcases"/>
<classpathentry kind="src" path="src/excelant/resources"/>
<classpathentry kind="lib" path="lib/ant-1.8.2.jar"/>
<classpathentry kind="lib" path="lib/commons-codec-1.5.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.1.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.13.jar"/>
<classpathentry kind="lib" path="ooxml-lib/dom4j-1.6.1.jar"/>
<classpathentry kind="lib" path="ooxml-lib/stax-api-1.0.1.jar"/>
<classpathentry kind="lib" path="ooxml-lib/xmlbeans-2.6.0.jar"/>
<classpathentry kind="lib" path="lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="ooxml-lib/ooxml-schemas-1.1.jar" sourcepath="ooxml-lib/ooxml-schemas-src-1.1.jar"/>
<classpathentry kind="lib" path="ooxml-lib/ooxml-encryption-1.1.jar" sourcepath="ooxml-lib/ooxml-encryption-src-1.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ApachePOI</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
This diff is collapsed.
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Apache POI
formatter_settings_version=12
org.eclipse.jdt.ui.exception.name=e
org.eclipse.jdt.ui.gettersetter.use.is=true
org.eclipse.jdt.ui.javadoc=false
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.overrideannotation=false
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/* \=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\n Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements. See the NOTICE file distributed with\n this work for additional information regarding copyright ownership.\n The ASF licenses this file to You under the Apache License, Version 2.0\n (the "License"); you may not use this file except in compliance with\n the License. You may obtain a copy of the License at\n\n http\://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\= */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="false" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=false
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=false
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=false
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=false
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
eclipse.preferences.version=1
org.moreunit.core.anyLanguage.srcFolderPathTemplate=${srcProject}
org.moreunit.core.anyLanguage.testFileNameTemplate=${srcFile}Test
org.moreunit.core.anyLanguage.testFolderPathTemplate=${srcProject}
This diff is collapsed.
This diff is collapsed.
disconnected=true
dsig.bouncycastle-prov.jar=/usr/share/java/bcprov.jar
dsig.bouncycastle-pkix.jar=/usr/share/java/bcpkix.jar
dsig.sl4j-api.jar=/usr/share/java/slf4j-api.jar
dsig.xmlsec.jar=/usr/share/java/xmlsec.jar
jars.present=true
halt.on.test.failure=true
main.ant.jar=/usr/share/java/ant.jar
......
libapache-poi-java (3.12-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Refreshed the patches
- Added the new XSDs downloaded during the build in the upstream tarball
- New build dependencies on libbcpkix-java and libxml-security-java
- New dependency on libjaxb-api-java for Java 9+
-- Emmanuel Bourg <ebourg@apache.org> Wed, 25 Jul 2018 23:00:27 +0200
libapache-poi-java (3.10.1-4) unstable; urgency=medium
* Team upload.
......
docs/skin/css/
ooxml-lib/*.jar
ooxml-xsds/*.jar
ooxml-xsds/XAdES.xsd
ooxml-xsds/XAdESv141.xsd
ooxml-xsds/dc.xsd
ooxml-xsds/dcmitype.xsd
ooxml-xsds/dcterms.xsd
ooxml-xsds/xmldsig-core-schema.xsd
......@@ -13,11 +13,14 @@ Build-Depends:
default-jdk,
javahelper,
junit4,
libbcpkix-java,
libcommons-codec-java,
libcommons-logging-java,
libdom4j-java,
libjaxb-api-java,
liblog4j1.2-java,
libxmlbeans-java,
libxml-security-java (>= 2.0),
maven-repo-helper
Standards-Version: 4.1.5
Vcs-Git: https://salsa.debian.org/java-team/libapache-poi-java.git
......
lib/*
*.jar
.project
.settings
.classpath
......@@ -4,7 +4,7 @@ VERSION=$2
DIR=apache-poi-$VERSION
TAR=../libapache-poi-java_$VERSION.orig.tar.xz
TAG=REL_`echo $VERSION | sed "s/\./_/g"`
TAG=REL_`echo $VERSION | sed "s/\./_/g"`_FINAL
# Checkout the code from svn
svn export http://svn.apache.org/repos/asf/poi/tags/$TAG $DIR
......@@ -18,12 +18,18 @@ unzip 'Office Open XML 1st edition Part 4 (PDF).zip' OfficeOpenXML-XMLSchema.zip
unzip OfficeOpenXML-XMLSchema.zip -d $DIR/ooxml-xsds
rm *.zip
wget 'http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip'
unzip 'Office Open XML 1st edition Part 2 (PDF).zip' OpenPackagingConventions-XMLSchema.zip
unzip OpenPackagingConventions-XMLSchema.zip -d $DIR/ooxml-xsds
rm *.zip
mkdir -p $DIR/ooxml-lib
wget -P $DIR/ooxml-lib http://dublincore.org/schemas/xmls/qdc/2003/04/02/dc.xsd
wget -P $DIR/ooxml-lib http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcterms.xsd
wget -P $DIR/ooxml-lib http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcmitype.xsd
wget -P $DIR/ooxml-lib http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd
wget -P $DIR/ooxml-lib http://uri.etsi.org/01903/v1.3.2/XAdES.xsd
wget -P $DIR/ooxml-lib http://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd
XZ_OPT=--best tar cJf $TAR -X debian/orig-tar.exclude $DIR
rm -rf $DIR
# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
. .svn/deb-layout
mv $TAR $origDir
echo "moved $TAR to $origDir"
fi
......@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/build.xml
+++ b/build.xml
@@ -727,9 +727,9 @@
@@ -864,9 +864,9 @@
</taskdef>
</target>
......@@ -15,7 +15,7 @@ Forwarded: not-needed
<target name="testcoveragereport" depends="jacocotask" description="create test-report" xmlns:jacoco="antlib:org.jacoco.ant" if="coverage.enabled">
<delete dir="${coverage.dir}"/>
@@ -801,8 +801,7 @@
@@ -953,8 +953,7 @@
</target>
<target name="test-main" unless="main.test.notRequired"
......@@ -25,7 +25,7 @@ Forwarded: not-needed
<junit fork="yes" forkmode="once" printsummary="yes" haltonfailure="${halt.on.test.failure}"
failureproperty="main.test.failed" showoutput="true">
<classpath refid="test.classpath"/>
@@ -821,7 +820,6 @@
@@ -974,7 +973,6 @@
</fileset>
</batchtest>
</junit>
......@@ -33,19 +33,18 @@ Forwarded: not-needed
<delete file="${main.testokfile}"/>
<antcall target="-test-main-write-testfile"/>
</target>
@@ -842,9 +840,8 @@
@@ -995,9 +993,8 @@
</uptodate>
</target>
- <target name="test-scratchpad" depends="compile-main,compile-scratchpad,-test-scratchpad-check,jacocotask"
- unless="scratchpad.test.notRequired" xmlns:jacoco="antlib:org.jacoco.ant">
- <target name="test-scratchpad" depends="compile-main,compile-scratchpad,-test-scratchpad-check,jacocotask,test-scratchpad-download-resources"
+ <target name="test-scratchpad" depends="compile-main,compile-scratchpad,-test-scratchpad-check,test-scratchpad-download-resources"
unless="scratchpad.test.notRequired" xmlns:jacoco="antlib:org.jacoco.ant">
- <jacoco:coverage enabled="${coverage.enabled}" excludes="${coverage.excludes}" destfile="build/jacoco-scratchpad.exec">
+ <target name="test-scratchpad" depends="compile-main,compile-scratchpad,-test-scratchpad-check"
+ unless="scratchpad.test.notRequired">
<junit printsummary="yes" fork="yes" forkmode="once" haltonfailure="${halt.on.test.failure}"
failureproperty="scratchpad.test.failed">
<classpath refid="test.scratchpad.classpath"/>
@@ -866,7 +863,6 @@
@@ -1020,7 +1017,6 @@
</fileset>
</batchtest>
</junit>
......@@ -53,7 +52,7 @@ Forwarded: not-needed
<delete file="${scratchpad.testokfile}"/>
<antcall target="-test-scratchpad-write-testfile"/>
</target>
@@ -882,11 +878,10 @@
@@ -1036,11 +1032,10 @@
</uptodate>
</target>
......@@ -66,7 +65,16 @@ Forwarded: not-needed
<junit printsummary="yes" fork="yes" forkmode="once" haltonfailure="${halt.on.test.failure}"
failureproperty="ooxml.test.failed">
<classpath refid="@{classpath}"/>
@@ -903,11 +898,10 @@
@@ -1059,8 +1054,6 @@
</fileset>
</batchtest>
</junit>
- </jacoco:coverage>
- <jacoco:coverage enabled="${coverage.enabled}" excludes="${coverage.excludes}" destfile="build/jacoco-@{type}-xmlsec.exec">
<junit printsummary="yes" fork="yes" forkmode="once" haltonfailure="${halt.on.test.failure}"
failureproperty="ooxml.xmlsec.test.failed">
<classpath>
@@ -1079,11 +1072,10 @@
</fileset>
</batchtest>
</junit>
......@@ -79,16 +87,35 @@ Forwarded: not-needed
<ooxml-test-runner classpath="test.ooxml.classpath" type="ooxml"/>
<delete file="${ooxml.testokfile}"/>
<antcall target="-test-ooxml-write-testfile"/>
@@ -942,7 +936,7 @@
@@ -1099,9 +1091,8 @@
</uptodate>
</target>
- <target name="test-integration" depends="compile-integration,-test-integration-check,jacocotask"
+ <target name="test-integration" depends="compile-integration,-test-integration-check"
unless="integration.test.notRequired" xmlns:jacoco="antlib:org.jacoco.ant">
- <jacoco:coverage enabled="${coverage.enabled}" excludes="${coverage.excludes}" destfile="build/jacoco-integration.exec">
<junit printsummary="withOutAndErr" fork="yes" forkmode="once" haltonfailure="${halt.on.test.failure}"
failureproperty="integration.test.failed" showoutput="true">
<classpath refid="test.integration.classpath"/>
@@ -1123,7 +1114,6 @@
</fileset>
</batchtest>
</junit>
- </jacoco:coverage>
<delete file="${integration.testokfile}"/>
<antcall target="-test-integration-write-testfile"/>
</target>
@@ -1160,7 +1150,7 @@
</java>
</target>
- <target name="test-ooxml-lite" depends="jacocotask">
+ <target name="test-ooxml-lite">
- <target name="test-ooxml-lite" depends="jacocotask,compile-ooxml-xsds,compile-ooxml-lite">
+ <target name="test-ooxml-lite" depends="compile-ooxml-xsds,compile-ooxml-lite">
<delete file="${ooxml.testokfile}"/>
<echo message="Running ooxml tests against 'poi-ooxml-schemas'"/>
<ooxml-test-runner classpath="ooxml-lite.classpath" type="ooxml-lite"/>
@@ -959,9 +953,8 @@
@@ -1177,9 +1167,8 @@
<echo file="${excelant.testokfile}" append="false" message="testok"/>
</target>
......@@ -100,7 +127,7 @@ Forwarded: not-needed
<junit printsummary="yes" fork="yes" forkmode="once" haltonfailure="${halt.on.test.failure}"
failureproperty="excelant.test.failed">
<classpath refid="test.excelant.classpath"/>
@@ -976,7 +969,6 @@
@@ -1195,7 +1184,6 @@
</fileset>
</batchtest>
</junit>
......
......@@ -4,10 +4,10 @@ Forwarded: no
Last-Update:2013-07-10
--- a/build.xml
+++ b/build.xml
@@ -1152,32 +1152,32 @@
<attribute name="Implementation-Vendor-Id" value="org.apache.poi"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
</manifest>
@@ -1362,32 +1362,32 @@
</target>
<target name="jar" depends="compile-all, compile-version, -manifest" description="Creates jar files for distribution">
- <jar destfile="${dist.dir}/${jar.name}-${version.id}-${DSTAMP}.jar"
+ <jar destfile="${dist.dir}/${jar.name}-${version.id}.jar"
manifest="build/poi-manifest.mf">
......
......@@ -3,29 +3,29 @@ Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- a/build.xml
+++ b/build.xml
@@ -474,7 +474,7 @@
@@ -590,7 +590,7 @@
</or>
</condition>
</target>
- <target name="compile-ooxml-xsds" unless="ooxml-compiled-xsds.present"
+ <target name="compile-ooxml-xsds"
depends="check-jars,fetch-jars,check-compiled-ooxml-xsds"
description="Unpacks the OOXML xsd files, and compiles them into XmlBeans">
<property name="ooxml.xsds.tmp.dir" location="build/ooxml-xsds"/>
@@ -491,7 +491,6 @@
<equals arg1="${sun.arch.data.model}" arg2="64" />
</condition>
- <unzip src="${ooxml.xsds.izip}" dest="${ooxml.xsds.tmp.dir}"/>
<!--
schema="build/ooxml-xsds/"
schema="build/ooxml-xsds/sml-workbook.xsd"
@@ -516,7 +515,7 @@
/>
</target>
- <target name="compile-ooxml-encryption-xsds" unless="ooxml-compiled-encryption-xsds.present"
+ <target name="compile-ooxml-encryption-xsds"
depends="check-jars,fetch-jars,check-compiled-ooxml-xsds"
description="Compiles the OOXML encryption xsd files into XmlBeans">
depends="check-jars,fetch-jars,check-compiled-ooxml-xsds"
description="Unpacks the OOXML xsd files, and compiles them into XmlBeans">
<taskdef name="xmlbean"
@@ -606,7 +606,7 @@
<property name="ooxml.xsds.tmp.dir" location="build/ooxml-xsds"/>
<mkdir dir="${ooxml.xsds.tmp.dir}"/>
- <unzip src="${ooxml.lib}/${ooxml.xsds.izip.1}" dest="${ooxml.xsds.tmp.dir}"/>
+ <copy todir="${ooxml.xsds.tmp.dir}"><fileset dir="ooxml-lib"/></copy>
<xmlbean
schema="${ooxml.xsds.tmp.dir}"
srcgendir="${ooxml.xsds.src.dir}"
@@ -629,7 +629,6 @@
<!-- Now do the same for the security schemas -->
<property name="ooxml.enc.xsds.tmp.dir" location="build/ooxml-security-xsds"/>
<mkdir dir="${ooxml.enc.xsds.tmp.dir}"/>
- <unzip src="${ooxml.lib}/${ooxml.xsds.izip.2}" dest="${ooxml.enc.xsds.tmp.dir}"/>
<copy todir="${ooxml.enc.xsds.tmp.dir}">
<fileset dir="${ooxml.lib}" includes="dc*.xsd,xmldsig*.xsd,XAdES*.xsd"/>
Description: Fixes a build failure with Java 8
Origin: upstream, https://svn.apache.org/r1575563
--- a/src/java/org/apache/poi/ss/util/DateFormatConverter.java
+++ b/src/java/org/apache/poi/ss/util/DateFormatConverter.java
@@ -322,6 +322,9 @@
result.put( "ga_ie", "[$-83C]" );
result.put( "in", "[$-0421]" );
result.put( "iw", "[$-40D]" );
+
+ // JDK 8 adds an empty locale-string, see also https://issues.apache.org/jira/browse/LANG-941
+ result.put( "", "[$-0409]" );
return result;
}
Description: Fix an infinite loop on corrupted PPT file (CVE-2014-9527).
This patch can be dropped after upgrading to Apache POI 3.11 or later.
Origin: backport, http://svn.apache.org/r1643680
Bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=57272
diff --git a/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java b/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
index 420bd38..e4128c9 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/HSLFSlideShow.java
@@ -20,16 +20,16 @@ package org.apache.poi.hslf;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
+import java.util.NavigableMap;
+import java.util.TreeMap;
import org.apache.poi.POIDocument;
import org.apache.poi.hslf.exceptions.CorruptPowerPointFileException;
@@ -269,41 +269,66 @@ public final class HSLFSlideShow extends POIDocument {
_records = read(_docstream, (int)currentUser.getCurrentEditOffset());
}
- private Record[] read(byte[] docstream, int usrOffset){
- ArrayList<Integer> lst = new ArrayList<Integer>();
- HashMap<Integer,Integer> offset2id = new HashMap<Integer,Integer>();
+ private Record[] read(byte[] docstream, int usrOffset){
+ //sort found records by offset.
+ //(it is not necessary but SlideShow.findMostRecentCoreRecords() expects them sorted)
+ NavigableMap<Integer,Record> records = new TreeMap<Integer,Record>(); // offset -> record
+ Map<Integer,Integer> persistIds = new HashMap<Integer,Integer>(); // offset -> persistId
+ initRecordOffsets(docstream, usrOffset, records, persistIds);
+
+ for (Map.Entry<Integer,Record> entry : records.entrySet()) {
+ Integer offset = entry.getKey();
+ Record record = entry.getValue();
+ Integer persistId = persistIds.get(offset);
+ if (record == null) {
+ // all plain records have been already added,
+ // only new records need to be decrypted (tbd #35897)
+ record = Record.buildRecordAtOffset(docstream, offset);
+ entry.setValue(record);
+ }
+
+ if (record instanceof PersistRecord) {
+ ((PersistRecord)record).setPersistId(persistId);
+ }
+ }
+
+ return records.values().toArray(new Record[records.size()]);
+ }
+
+ private void initRecordOffsets(byte[] docstream, int usrOffset, NavigableMap<Integer,Record> recordMap, Map<Integer,Integer> offset2id) {
while (usrOffset != 0){
UserEditAtom usr = (UserEditAtom) Record.buildRecordAtOffset(docstream, usrOffset);
- lst.add(usrOffset);
+ recordMap.put(usrOffset, usr);
int psrOffset = usr.getPersistPointersOffset();
-
PersistPtrHolder ptr = (PersistPtrHolder)Record.buildRecordAtOffset(docstream, psrOffset);
- lst.add(psrOffset);
- Hashtable<Integer,Integer> entries = ptr.getSlideLocationsLookup();
- for(Integer id : entries.keySet()) {
- Integer offset = entries.get(id);
- lst.add(offset);
+ recordMap.put(psrOffset, ptr);
+
+ for(Map.Entry<Integer,Integer> entry : ptr.getSlideLocationsLookup().entrySet()) {
+ Integer offset = entry.getValue();
+ Integer id = entry.getKey();
+ recordMap.put(offset, null); // reserve a slot for the record
offset2id.put(offset, id);
}
usrOffset = usr.getLastUserEditAtomOffset();
- }
- //sort found records by offset.
- //(it is not necessary but SlideShow.findMostRecentCoreRecords() expects them sorted)
- Integer a[] = lst.toArray(new Integer[lst.size()]);
- Arrays.sort(a);
- Record[] rec = new Record[lst.size()];
- for (int i = 0; i < a.length; i++) {
- Integer offset = a[i];
- rec[i] = Record.buildRecordAtOffset(docstream, offset.intValue());
- if(rec[i] instanceof PersistRecord) {
- PersistRecord psr = (PersistRecord)rec[i];
- Integer id = offset2id.get(offset);
- psr.setPersistId(id.intValue());
+
+ // check for corrupted user edit atom and try to repair it
+ // if the next user edit atom offset is already known, we would go into an endless loop
+ if (usrOffset > 0 && recordMap.containsKey(usrOffset)) {
+ // a user edit atom is usually located 36 byte before the smallest known record offset
+ usrOffset = recordMap.firstKey()-36;
+ // check that we really are located on a user edit atom
+ int ver_inst = LittleEndian.getUShort(docstream, usrOffset);
+ int type = LittleEndian.getUShort(docstream, usrOffset+2);
+ int len = LittleEndian.getInt(docstream, usrOffset+4);
+ if (ver_inst == 0 && type == 4085 && (len == 0x1C || len == 0x20)) {
+ logger.log(POILogger.WARN, "Repairing invalid user edit atom");
+ usr.setLastUserEditAtomOffset(usrOffset);
+ } else {
+ throw new CorruptPowerPointFileException("Powerpoint document contains invalid user edit atom");
+ }
}
}
-
- return rec;
}
/**
@@ -332,18 +357,14 @@ public final class HSLFSlideShow extends POIDocument {
private void readPictures() throws IOException {
_pictures = new ArrayList<PictureData>();
- byte[] pictstream;
+ // if the presentation doesn't contain pictures - will use a null set instead
+ if (!directory.hasEntry("Pictures")) return;
- try {
- DocumentEntry entry = (DocumentEntry)directory.getEntry("Pictures");
- pictstream = new byte[entry.getSize()];
- DocumentInputStream is = directory.createDocumentInputStream("Pictures");
- is.read(pictstream);
- } catch (FileNotFoundException e){
- // Silently catch exceptions if the presentation doesn't
- // contain pictures - will use a null set instead
- return;
- }
+ DocumentEntry entry = (DocumentEntry)directory.getEntry("Pictures");
+ byte[] pictstream = new byte[entry.getSize()];
+ DocumentInputStream is = directory.createDocumentInputStream(entry);
+ is.read(pictstream);
+ is.close();
int pos = 0;
// An empty picture record (length 0) will take up 8 bytes
Description: Fixes the test failures with Java 9
Description: Fixes the build failures with Java 9
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/scratchpad/testcases/org/apache/poi/hmef/TestAttachments.java
......@@ -16,7 +16,7 @@ Forwarded: no
// They should all have the same date on them
--- a/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
+++ b/src/scratchpad/testcases/org/apache/poi/hmef/attribute/TestMAPIAttributes.java
@@ -149,9 +149,7 @@
@@ -158,9 +158,7 @@
assertEquals(MAPIDateAttribute.class, attr.getClass());
MAPIDateAttribute date = (MAPIDateAttribute)attr;
......@@ -40,3 +40,42 @@ Forwarded: no
fmt.setTimeZone(TimeZone.getTimeZone("UTC"));
assertEquals("28-Apr-2010 12:40:56", fmt.format(date.getDate()));
}
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/KeyInfoSignatureFacet.java
@@ -77,7 +77,7 @@
List<Object> x509DataObjects = new ArrayList<Object>();
X509Certificate signingCertificate = signatureConfig.getSigningCertificateChain().get(0);
- List<Object> keyInfoContent = new ArrayList<Object>();
+ List<javax.xml.crypto.XMLStructure> keyInfoContent = new ArrayList<javax.xml.crypto.XMLStructure>();
if (signatureConfig.isIncludeKeyValue()) {
KeyValue keyValue;
@@ -142,4 +142,4 @@
nextSibling.getParentNode().insertBefore(kiNl.item(0), nextSibling);
}
}
-}
\ No newline at end of file
+}
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/KeyInfoKeySelector.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/KeyInfoKeySelector.java
@@ -65,7 +65,7 @@
continue;
}
X509Data x509Data = (X509Data) keyInfoStructure;
- List<Object> x509DataList = x509Data.getContent();
+ List<?> x509DataList = x509Data.getContent();
for (Object x509DataObject : x509DataList) {
if (!(x509DataObject instanceof X509Certificate)) {
continue;
--- a/build.xml
+++ b/build.xml
@@ -1134,6 +1134,7 @@
failonerror="true">
<classpath>
<pathelement path="${ooxml.lite-merged.dir}/ooxml-lite-merged.jar"/>
+ <pathelement path="/usr/share/java/jaxb-api.jar"/>
</classpath>
<classpath refid="test.ooxml.classpath"/>
<classpath refid="ooxml.xmlsec.classpath"/>
Description: Fixes the compatibility with the version of BouncyCastle in Debian
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java
@@ -245,7 +245,7 @@
ResponderIDType responderId = ocspIdentifier.addNewResponderID();
RespID respId = basicOcspResp.getResponderId();
- ResponderID ocspResponderId = respId.toASN1Object();
+ ResponderID ocspResponderId = respId.toASN1Primitive();
DERTaggedObject derTaggedObject = (DERTaggedObject)ocspResponderId.toASN1Primitive();
if (2 == derTaggedObject.getTagNo()) {
ASN1OctetString keyHashOctetString = (ASN1OctetString)derTaggedObject.getObject();