[Python-modules-commits] [python-odf] 97/118: Fixed two issues

Wolfgang Borgert debacle at moszumanska.debian.org
Fri Oct 3 21:27:28 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to reference refs/remotes/upstream/master
in repository python-odf.

commit 44f4de08fc85f02f6f12be3fab11a666e8b2ca0b
Author: Søren Roug <soren.roug at eea.europa.eu>
Date:   Wed Dec 22 08:37:08 2010 +0000

    Fixed two issues
    
    mimetype became clobbered with subobjects
    Pictures/ should not have an entry in META-INF/manifest.xml
---
 odf/opendocument.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/odf/opendocument.py b/odf/opendocument.py
index e219d8c..6319638 100644
--- a/odf/opendocument.py
+++ b/odf/opendocument.py
@@ -369,8 +369,9 @@ class OpenDocument:
                 zi.compress_type = zipfile.ZIP_STORED
                 zi.external_attr = UNIXPERMS
                 self._z.writestr(zi, fileobj)
-        if hasPictures:
-            self.manifest.addElement(manifest.FileEntry(fullpath="%sPictures/" % folder, mediatype=""))
+        # According to section 17.7.3 in ODF 1.1, the pictures folder should not have a manifest entry
+#       if hasPictures:
+#           self.manifest.addElement(manifest.FileEntry(fullpath="%sPictures/" % folder, mediatype=""))
         # Look in subobjects
         subobjectnum = 1
         for subobject in object.childobjects:
@@ -620,8 +621,7 @@ def load(odffile):
             pass
         # Load subobjects into structure
         elif mentry[:7] == "Object " and len(mentry) < 11 and mentry[-1] == "/":
-            mimetype = mvalue['media-type']
-            subdoc = OpenDocument(mimetype, add_generator=False)
+            subdoc = OpenDocument(mvalue['media-type'], add_generator=False)
             doc.addObject(subdoc, "/" + mentry[:-1])
             __loadxmlparts(z, manifest, subdoc, mentry)
         elif mentry[:7] == "Object ":

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-odf.git



More information about the Python-modules-commits mailing list