[Erp5-report] r45556 mario.amaral - /erp5/trunk/utils/cloudooo/cloudooo/manager.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 18 18:57:27 CEST 2011
Author: mario.amaral
Date: Mon Apr 18 18:57:27 2011
New Revision: 45556
URL: http://svn.erp5.org?rev=45556&view=rev
Log:
Put a default source_format in getTable and always call convertFile in getImageItemList.
Modified:
erp5/trunk/utils/cloudooo/cloudooo/manager.py
Modified: erp5/trunk/utils/cloudooo/cloudooo/manager.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/manager.py?rev=45556&r1=45555&r2=45556&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] Mon Apr 18 18:57:27 2011
@@ -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()
More information about the Erp5-report
mailing list