Hi everybody, I'm trying to implement a requirement for my company, where I populate dynamically an odt file with some data. It used to be implemented with UNO bridging/api, but due to the heavy dataset we have to handle, I'm trying to manipulate the content.xml directly in memory with Java code (I have poc'ed it, it can reduce the time to produce a document by a factor of several thousands... Yeah really, I'm not kidding ).
The issue I'm having actually is that after generation, if I try to open the resulting odt file, Open Office 3 complains that the document is damaged and could maybe be repaired. I click yes, and my doc opens nicelly after a few seconds. But when I look at the difference between what is considered as a « damaged » document and a « working » one, and after some digging, the only things that seems damaged are some style names. For example : Damaged Doc/content.xml : <style:style style:display-name="listeDetaillee_restitution.5" style:family="table-row" style:name="listeDetaillee_5f_restitution.5"> <style:table-row-properties fo:keep-together="always" style:keep-together="false" style:row-height="0.199cm" /> </style:style> ... <table:table-row table:style-name="listeDetaillee_5f_restitution.5"> <table:table-cell office:value-type="string" table:style-name="listeDetaillee_5f_restitution.A3"> <text:p text:style-name="P1" /> </table:table-cell> <table:table-cell office:value-type="string" table:style-name="listeDetaillee_5f_restitution.A3"> <text:p text:style-name="P2" /> </table:table-cell> <table:table-cell office:value-type="string" table:style-name="listeDetaillee_5f_restitution.A3"> <text:p text:style-name="P5" /> </table:table-cell> <table:table-cell office:value-type="string" table:style-name="listeDetaillee_5f_restitution.A3"> <text:p text:style-name="P5" /> </table:table-cell> <table:table-cell office:value-type="string" table:style-name="listeDetaillee_5f_restitution.A3"> <text:p text:style-name="P6" /> </table:table-cell> <table:table-cell office:value-type="string" table:style-name="listeDetaillee_5f_restitution.F3"> <text:p text:style-name="P6" /> </table:table-cell> </table:table-row> After OO repair (in bold the differences) : <style:style style:name="listeDetaillee_5f_restitution.14" style:display-name="listeDetaillee_restitution.14" style:family="table-row"> <style:table-row-properties style:row-height="0.199cm" style:keep-together="false" fo:keep-together="always" /> </style:style> ... <table:table-row table:style-name="listeDetaillee_5f_restitution.14"> <table:table-cell table:style-name="listeDetaillee_5f_restitution.A3" office:value-type="string"> <text:p text:style-name="P1" /> </table:table-cell> <table:table-cell table:style-name="listeDetaillee_5f_restitution.A3" office:value-type="string"> <text:p text:style-name="P2" /> </table:table-cell> <table:table-cell table:style-name="listeDetaillee_5f_restitution.A3" office:value-type="string"> <text:p text:style-name="P5" /> </table:table-cell> <table:table-cell table:style-name="listeDetaillee_5f_restitution.A3" office:value-type="string"> <text:p text:style-name="P5" /> </table:table-cell> <table:table-cell table:style-name="listeDetaillee_5f_restitution.A3" office:value-type="string"> <text:p text:style-name="P6" /> </table:table-cell> <table:table-cell table:style-name="listeDetaillee_5f_restitution.F3" office:value-type="string"> <text:p text:style-name="P6" /> </table:table-cell> </table:table-row> Obviously, if I reproduce only this changes in my « damaged » document, rezip and reopen it, it opens without any warning. So I was wondering what is going on ? How a style name could cause problem like this? Could anybody shed some light about this?? Thank you very much in advance !! PILLER Sébastien (sebastien.pil...@globaz.ch) Software Developer [OCA_JavaSE7Programmer_clr] [cid:image002.png@01D03BDE.E5D58AA0] GLOBAZ SA Sous-la-Velle 6 | CP 241 | 2340 Le Noirmont Tél. +41 32 957 60 00 | Fax +41 32 957 60 01 www.globaz.ch<http://www.globaz.ch/> | i...@globaz.ch<mailto:frederic.barthou...@globaz.ch> *************************************************************************************************** This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to which they are addressed. As the confidentiality of email communication cannot be guaranteed, we do not accept any responsibility for the confidentiality and the intactness of this message. If you have received this email in error, please advise the sender and delete this message and any attachments. Any unauthorised use or dissemination of this information is strictly prohibited. ***************************************************************************************************