Commit 5199bdda authored by Jean-Paul Smets's avatar Jean-Paul Smets

Rename method. populateContent should be used for another purpose: ODT...

Rename method. populateContent should be used for another purpose: ODT document analysis (ie. automatic extraction of paragraphs, articles, etc. from a large document)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19521 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent abcb2c6e
...@@ -414,7 +414,7 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin): ...@@ -414,7 +414,7 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin):
data = z.read(fn) data = z.read(fn)
break break
mime = 'text/html' mime = 'text/html'
self.populateContent(zip_file=z) # Maybe some parts should be asynchronous for self._populateConversionCacheWithHTML(zip_file=z) # Maybe some parts should be asynchronous for
# better usability # better usability
z.close() z.close()
cs.close() cs.close()
...@@ -454,8 +454,8 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin): ...@@ -454,8 +454,8 @@ class OOoDocument(PermanentURLMixIn, File, ConversionCacheMixin):
return self._convert(format='text-content') return self._convert(format='text-content')
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'populateContent') '_populateConversionCacheWithHTML')
def populateContent(self, zip_file=None): def _populateConversionCacheWithHTML(self, zip_file=None):
""" """
Extract content from the ODF zip file and populate the document. Extract content from the ODF zip file and populate the document.
Optional parameter zip_file prevents from converting content twice. Optional parameter zip_file prevents from converting content twice.
......
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