]> source.dussan.org Git - poi.git/commitdiff
Ensure that the core properties are there before saving them, in case they have not...
authorNick Burch <nick@apache.org>
Sat, 28 Feb 2015 17:36:19 +0000 (17:36 +0000)
committerNick Burch <nick@apache.org>
Sat, 28 Feb 2015 17:36:19 +0000 (17:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1662971 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/openxml4j/opc/ZipPackage.java

index 62f26b7546ea82790d2a32f068a0fe7d59fd0b01..888f5013029fa41609d149c094c198f6b4ae14a8 100644 (file)
@@ -443,7 +443,9 @@ public final class ZipPackage extends Package {
                        if (this.getPartsByRelationshipType(PackageRelationshipTypes.CORE_PROPERTIES).size() == 0 &&
                 this.getPartsByRelationshipType(PackageRelationshipTypes.CORE_PROPERTIES_ECMA376).size() == 0    ) {
                                logger.log(POILogger.DEBUG,"Save core properties part");
-
+                               
+                               // Ensure that core properties are added if missing
+                               getPackageProperties();
                                // Add core properties to part list ...
                                addPackagePart(this.packageProperties);
                                // ... and to add its relationship ...