[Erp5-report] r37588 gabriel - /erp5/trunk/utils/cloudooo/cloudooo/manager.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Aug 5 22:47:25 CEST 2010
Author: gabriel
Date: Thu Aug 5 22:47:22 2010
New Revision: 37588
URL: http://svn.erp5.org?rev=37588&view=rev
Log:
fix compatibility with erp5 : these changes remove two filters that can not be used to export odp's to html
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=37588&r1=37587&r2=37588&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] Thu Aug 5 22:47:22 2010
@@ -190,13 +190,18 @@ class Manager(object):
This is a Backwards compatibility provided for ERP5 Project, in order to keep
compatibility with OpenOffice.org Daemon.
"""
+ # XXX - ugly way to remove "/" and "."
orig_format = orig_format.split('.')[-1]
+ orig_format = orig_format.split('/')[-1]
if "htm" in format:
zip = True
else:
zip = False
try:
response_dict = {}
+ # XXX - use html format instead of xhtml
+ if orig_format == "presentation" and format == "xhtml":
+ format = 'html'
response_dict['data'] = self.convertFile(file, orig_format, format, zip)
# FIXME: Fast solution to obtain the html or pdf mimetypes
if zip:
@@ -222,6 +227,10 @@ class Manager(object):
try:
extension_list = self.getAllowedExtensionList({"mimetype": content_type})
response_dict['response_data'] = extension_list
+ # XXX - procedure to remove duplicate filters
+ for data in response_dict['response_data']:
+ if data[0] == "html":
+ response_dict['response_data'].remove(data)
return (200, response_dict, '')
except Exception, e:
logger.error(e)
More information about the Erp5-report
mailing list