Commit 3694e0af authored by Kevin Deldycke's avatar Kevin Deldycke

Get the filename


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2997 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9a8c4476
......@@ -63,6 +63,7 @@ class OOoParser:
self.oo_files = {}
self.pictures = {}
self.ns = {}
self.filename = None
security.declareProtected('Import/Export objects', 'openFile')
......@@ -79,6 +80,9 @@ class OOoParser:
if oo_unzipped.testzip() != None:
raise CorruptedOOoFile
# Get the filename
self.filename = file_descriptor.filename
# List and load the content of the zip file
for name in oo_unzipped.namelist():
self.oo_files[name] = oo_unzipped.read(name)
......@@ -97,6 +101,14 @@ class OOoParser:
self.ns[name[6:]] = doc_ns[0].attributes.item(i).value
security.declarePublic('getFilename')
def getFilename(self):
"""
Return the name of the OpenOffice file
"""
return self.filename
security.declarePublic('getPicturesMapping')
def getPicturesMapping(self):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment