[pod] Force raiseOnError=True when working from an ODS template (solves bug https://bugs.launchpad.net/appy/+bug/1173295).
This commit is contained in:
parent
c676d0b29c
commit
f2571d2671
|
@ -195,7 +195,6 @@ class Renderer:
|
||||||
if fileName:
|
if fileName:
|
||||||
fullFileName = os.path.join(fullFolderName, fileName)
|
fullFileName = os.path.join(fullFolderName, fileName)
|
||||||
f = open(fullFileName, 'wb')
|
f = open(fullFileName, 'wb')
|
||||||
print fullFileName
|
|
||||||
fileContent = self.templateZip.read(zippedFile)
|
fileContent = self.templateZip.read(zippedFile)
|
||||||
if (fileName == 'content.xml') and not folderName:
|
if (fileName == 'content.xml') and not folderName:
|
||||||
# content.xml files may reside in subfolders.
|
# content.xml files may reside in subfolders.
|
||||||
|
@ -205,6 +204,15 @@ class Renderer:
|
||||||
# Same remark as above.
|
# Same remark as above.
|
||||||
self.stylesManager = StylesManager(fileContent)
|
self.stylesManager = StylesManager(fileContent)
|
||||||
self.stylesXml = fileContent
|
self.stylesXml = fileContent
|
||||||
|
elif (fileName == 'mimetype') and \
|
||||||
|
(fileContent == mimeTypes['ods']):
|
||||||
|
# From LibreOffice 3.5, it is not possible anymore to dump
|
||||||
|
# errors into the resulting ods as annotations. Indeed,
|
||||||
|
# annotations can't reside anymore within paragraphs. ODS
|
||||||
|
# files generated with pod and containing error messages in
|
||||||
|
# annotations cause LibreOffice 3.5 and 4.0 to crash.
|
||||||
|
# LibreOffice >= 4.1 simply does not show the annotation.
|
||||||
|
self.raiseOnError = True
|
||||||
f.write(fileContent)
|
f.write(fileContent)
|
||||||
f.close()
|
f.close()
|
||||||
self.templateZip.close()
|
self.templateZip.close()
|
||||||
|
|
Loading…
Reference in a new issue