Commit 7384b37d authored by Bartek Górny's avatar Bartek Górny

getting text content generically

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9037 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0be251b8
...@@ -251,10 +251,8 @@ class OOoDocument(XMLObject,File): ...@@ -251,10 +251,8 @@ class OOoDocument(XMLObject,File):
self.log('_convert',enc(self._unpackData(self.data))[:500]) self.log('_convert',enc(self._unpackData(self.data))[:500])
meta,oo_data=sp.run_convert(self.getOriginalFilename(),enc(self._unpackData(self.data))) meta,oo_data=sp.run_convert(self.getOriginalFilename(),enc(self._unpackData(self.data)))
self.oo_data=Pdata(dec(oo_data)) self.oo_data=Pdata(dec(oo_data))
# now we get text content (for now, only for Text type) # now we get text content
# converting spreadsheet and presentations into plain text is less trivial nic,text_data=sp.run_getplaintext(self.getOriginalFilename(),enc(self._unpackData(self.oo_data)))
if self.getPortalType()=='Text':
nic,text_data=sp.run_generate(self.getOriginalFilename(),enc(self._unpackData(self.oo_data)),'txt')
self.setTextContent(dec(text_data)) self.setTextContent(dec(text_data))
self._setMetaData(meta) self._setMetaData(meta)
......
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