Commit 5436c864 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Renamed convertToBase to convertToBaseFormat

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13479 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d80beca3
...@@ -149,7 +149,7 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -149,7 +149,7 @@ class OOoDocument(File, ConversionCacheMixin):
""" """
self.log(format, force) self.log(format, force)
if (not self.hasOOFile()) or force: if (not self.hasOOFile()) or force:
self.convertToBase() self.convertToBaseFormat()
if format is None: if format is None:
result = self.getOOFile() result = self.getOOFile()
mime = self.getMimeType() mime = self.getMimeType()
...@@ -261,7 +261,7 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -261,7 +261,7 @@ class OOoDocument(File, ConversionCacheMixin):
return True # XXX why return ? - why not? return True # XXX why return ? - why not?
security.declarePrivate('_convertToBase') security.declarePrivate('_convertToBase')
def _convertToBase(self): def _convertToBaseFormat(self):
""" """
Converts the original document into ODF Converts the original document into ODF
by invoking the conversion server. Store the result by invoking the conversion server. Store the result
...@@ -423,7 +423,7 @@ class OOoDocument(File, ConversionCacheMixin): ...@@ -423,7 +423,7 @@ class OOoDocument(File, ConversionCacheMixin):
""" """
# first check if we have base # first check if we have base
if not self.hasOOFile(): if not self.hasOOFile():
self.convertToBase() self.convertToBaseFormat()
if not self.isAllowed(format): if not self.isAllowed(format):
if REQUEST is not None: if REQUEST is not None:
return self.returnMessage('can not convert to ' + format + ' for some reason',1) return self.returnMessage('can not convert to ' + format + ' for some reason',1)
......
...@@ -299,7 +299,7 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -299,7 +299,7 @@ class TestIngestion(ERP5TypeTestCase):
filename = 'TEST-en-002.' + format filename = 'TEST-en-002.' + format
f = makeFileUpload(filename) f = makeFileUpload(filename)
context.edit(file=f) context.edit(file=f)
context.convertToBase() context.convertToBaseFormat()
context.reindexObject(); get_transaction().commit(); self.tic() context.reindexObject(); get_transaction().commit(); self.tic()
self.failUnless(context.hasFile()) self.failUnless(context.hasFile())
if context.getPortalType() in ('Image', 'File'): # these are not subject to conversion if context.getPortalType() in ('Image', 'File'): # these are not subject to conversion
...@@ -318,7 +318,7 @@ class TestIngestion(ERP5TypeTestCase): ...@@ -318,7 +318,7 @@ class TestIngestion(ERP5TypeTestCase):
filename = 'TEST-en-002.' + format filename = 'TEST-en-002.' + format
f = makeFileUpload(filename) f = makeFileUpload(filename)
context.edit(file=f) context.edit(file=f)
context.convertToBase() context.convertToBaseFormat()
context.reindexObject(); get_transaction().commit(); self.tic() context.reindexObject(); get_transaction().commit(); self.tic()
clearCache() clearCache()
target_list = [x[1] for x in context.getTargetFormatItemList()] target_list = [x[1] for x in context.getTargetFormatItemList()]
......
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