Commit c33d9e10 authored by Nicolas Delaby's avatar Nicolas Delaby

Improve conversion to base_format for OOoDocuments.

If we pass content_type parameter to the conversion tool,
it can find the appropriate Import Filter according content_type of document.
With this patch HTML => odt and XHTML => odt, are working without hackish code
in oood_commandtranforms.
Reviewed by romain


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39027 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5a341f5a
......@@ -426,7 +426,10 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
server_proxy = self._mkProxy()
response_code, response_dict, response_message = server_proxy.run_convert(
self.getSourceReference() or self.getId(),
enc(str(self.getData())))
enc(str(self.getData())),
None,
None,
self.getContentType())
if response_code == 200:
# sucessfully converted document
self._setBaseData(dec(response_dict['data']))
......
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