diff options
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java index 9fe83a2a4a51..7fb3efe2b853 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java @@ -315,6 +315,10 @@ public abstract class OfficeDocument } } + if (embeddedObjects == null) { + return null; + } + return embeddedObjects.values().iterator(); } @@ -566,11 +570,13 @@ public abstract class OfficeDocument // The EmbeddedObjects come first. Iterator<EmbeddedObject> embObjs = getEmbeddedObjects(); - while (embObjs.hasNext()) { - EmbeddedObject obj = embObjs.next(); - obj.writeManifestData(manifestDoc); + if (embObjs != null) { + while (embObjs.hasNext()) { + EmbeddedObject obj = embObjs.next(); + obj.writeManifestData(manifestDoc); - obj.write(zip); + obj.write(zip); + } } // Add in the entry for the Pictures directory. Always present. |