Commit af24fbe8 authored by Mario Jorge Amaral's avatar Mario Jorge Amaral

Put a default source_format in getTable and always call convertFile in getImageItemList.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45556 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b0781ac1
......@@ -305,7 +305,8 @@ class Manager(object):
def getTable(self, data, id, source_format="odt"):
"""Returns the table into a new 'format' file."""
document = self._getOOGranulator(data, source_format)
return encodestring(document.getTable(id, source_format))
#the file will be convert; so, the source_format will be always 'odt'
return encodestring(document.getTable(id, 'odt'))
def getColumnItemList(self, data, table_id, source_format):
"""Return the list of columns in the form of (id, title)."""
......@@ -319,6 +320,7 @@ class Manager(object):
def getImageItemList(self, data, source_format):
"""Return the list of images in the form of (id, title)."""
data = self.convertFile(data, source_format, 'odt', zip=False)
document = self._getOOGranulator(data, source_format)
return document.getImageItemList()
......
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