Commit 71185457 authored by Ivan Tyagov's avatar Ivan Tyagov

enable pre conversion for DMS portal types by default.

parent a70ed34e
...@@ -62,9 +62,11 @@ if address not in MARKER and port not in MARKER:\n ...@@ -62,9 +62,11 @@ if address not in MARKER and port not in MARKER:\n
for index_uid in range(len(uid)):\n for index_uid in range(len(uid)):\n
document_relative_url = getRelativeUrl[index_uid]\n document_relative_url = getRelativeUrl[index_uid]\n
document = portal.restrictedTraverse(document_relative_url)\n document = portal.restrictedTraverse(document_relative_url)\n
allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortalEmbeddedDocumentTypeList()\n
# XXX: we do check if "data" methods exists on pretending to be Document portal types\n # XXX: we do check if "data" methods exists on pretending to be Document portal types\n
# we need a way to do this by introspection\n # we need a way to do this by introspection\n
if ((getattr(document, "getData", None) is not None and document.getData() not in MARKER) or \\\n if document.getPortalType() in allowed_portal_type_list and \\\n
((getattr(document, "getData", None) is not None and document.getData() not in MARKER) or \\\n
(getattr(document, "getBaseData", None) is not None and document.getBaseData() not in MARKER)):\n (getattr(document, "getBaseData", None) is not None and document.getBaseData() not in MARKER)):\n
document.activate(serialize_tag="conversion").Base_callPreConvert()\n document.activate(serialize_tag="conversion").Base_callPreConvert()\n
</string> </value> </string> </value>
......
...@@ -51,10 +51,12 @@ ...@@ -51,10 +51,12 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""\n <value> <string>"""\n
Do actual conversion of Spreadsheet type.\n Do actual conversion of OOo types.\n
"""\n """\n
context.activate(serialization_tag=\'pre_convert\').convert(**{\'format\': \'html\'})\n if context.hasBaseData():\n
context.activate(serialization_tag=\'pre_convert\').Base_preConvert(format, quality, display_list)\n # empty documents do not need pre conversion\n
context.activate(serialization_tag=\'pre_convert\').convert(**{\'format\': \'html\'})\n
context.activate(serialization_tag=\'pre_convert\').Base_preConvert(format, quality, display_list)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
12 13
\ No newline at end of file \ No newline at end of file
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