Commit 2f51cd9f authored by Nicolas Delaby's avatar Nicolas Delaby

Avoid Conversion When calling OOoStylesheet

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20747 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab30bfaa
...@@ -461,11 +461,16 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0"> ...@@ -461,11 +461,16 @@ xmlns:config="http://openoffice.org/2001/config" office:version="1.0">
raise ValueError, 'Can not render a template without a parent acquisition context' raise ValueError, 'Can not render a template without a parent acquisition context'
# Retrieve master document # Retrieve master document
ooo_document = getattr(here, self.ooo_stylesheet) ooo_document = getattr(here, self.ooo_stylesheet)
format = request.get('format')
try:
# If style is dynamic, call it # If style is dynamic, call it
try: try:
request.set('format', None)
ooo_document = ooo_document() ooo_document = ooo_document()
except AttributeError: except AttributeError:
pass pass
finally:
request.set('format', format)
# Create a new builder instance # Create a new builder instance
ooo_builder = OOoBuilder(ooo_document) ooo_builder = OOoBuilder(ooo_document)
# Pass builder instance as extra_context # Pass builder instance as extra_context
......
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