From 7a85c393715eb27cb97e179d280ac7c2a8d99098 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Fri, 22 Sep 2017 21:19:39 +0000 Subject: [PATCH] Bug 59747: Adjust order of first two entries in the resulting Zip to try to enable some external tools to auto-detect the file-type git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1809357 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/openxml4j/opc/ZipPackage.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java index 17046da357..16285615df 100644 --- a/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java +++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java @@ -554,16 +554,16 @@ public final class ZipPackage extends OPCPackage { } } + // Save content type part. + LOG.log(POILogger.DEBUG,"Save content types part"); + this.contentTypeManager.save(zos); + // Save package relationships part. LOG.log(POILogger.DEBUG,"Save package relationships"); ZipPartMarshaller.marshallRelationshipPart(this.getRelationships(), PackagingURIHelper.PACKAGE_RELATIONSHIPS_ROOT_PART_NAME, zos); - // Save content type part. - LOG.log(POILogger.DEBUG,"Save content types part"); - this.contentTypeManager.save(zos); - // Save parts. for (PackagePart part : getParts()) { // If the part is a relationship part, we don't save it, it's