Commit 131bf188 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use Pdata.__str__() instead of _unpackData().

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28411 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1e4c5c9
......@@ -41,7 +41,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.tests.Sequence import SequenceList
from Products.ERP5Type.tests.utils import FileUpload
from Products.ERP5OOo.Document.OOoDocument import ConversionError
from Products.ERP5.Document.File import _unpackData
from zLOG import LOG, INFO, ERROR
# Define the conversion server host
......@@ -725,7 +724,7 @@ class TestIngestion(ERP5TypeTestCase):
context = self.getDocument('one')
newcontent = context.getBaseData()
cs = cStringIO.StringIO()
cs.write(_unpackData(newcontent))
cs.write(str(newcontent))
z = zipfile.ZipFile(cs)
s = z.read('meta.xml')
xmlob = parseString(s)
......
from Products.PortalTransforms.interfaces import itransform
from oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from Products.ERP5.Document.File import _unpackData
from zLOG import LOG
......@@ -26,7 +25,7 @@ class OdtToDoc:
raise AttributeError(attr)
def convert(self, orig, data, cache=None, filename=None, context=None, **kwargs):
data = _unpackData(orig)
data = str(orig)
doc = OOOdCommandTransform(context, filename, data, self.inputs[0])
doc.convert()
msword = doc.convertTo('doc')
......
from Products.PortalTransforms.interfaces import itransform
from oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from Products.ERP5.Document.File import _unpackData
from zLOG import LOG
......@@ -26,7 +25,7 @@ class OdtToPdf:
raise AttributeError(attr)
def convert(self, orig, data, cache=None, filename=None, context=None, **kwargs):
data = _unpackData(orig)
data = str(orig)
doc = OOOdCommandTransform(context, filename, data, self.inputs[0])
doc.convert()
pdf = doc.convertTo('pdf')
......
from Products.PortalTransforms.interfaces import itransform
from oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from Products.ERP5.Document.File import _unpackData
from zLOG import LOG
from Products.ERP5OOo.OOoUtils import OOoBuilder
import re
......@@ -27,7 +26,7 @@ class OdtToXml:
raise AttributeError(attr)
def convert(self, orig, data, cache=None, filename=None, context=None, **kwargs):
data = _unpackData(orig)
data = str(orig)
doc = OOOdCommandTransform(context, filename, data, self.inputs[0])
doc.convert()
builder = OOoBuilder(doc)
......
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