Created attachment 100289 [details] The file contains a shape which is applied "In-line with Text". And this shape is enclosed in nested table. After doing the initial phase of analysis, we can say that the corruption might get introduced due a shape enclosed in nested table. This shape is applied "In-Line with shape" wrapping text property. Steps to reproduce: 1. Open file in LibreOffice 2. Click File -> Save As (Microsoft word 2007/2010(.docx)) 3. It saves as .docx 4. Open the same file again which got roundtripped. Expected Result: The file should open properly after roundtrip. Actual Result: It gives a message "You cannot put drawing objects in a textbox, callout, comment, footnote or endnote". Operating System: All Version: 4.4.0.0.alpha0+ Master
- Have optimised the file and was able to highlight the main area of the issue. - The optimised file is attached. - The Optimised file contains a table within a table. Inside the inner table there are two shapes which are having wrapping property as "In-Line with Text". - Thus in original file, the xml is like, within table, there is another table and inside the inner table the shapes are preserved. - During RT, LO, is first starting the alternate content and then within the textBox, the table is started. - This leads to corruption. - Tried to create the similar file with shaped enclosed within nested table, but the RT was succesfull. - Need to try again for reproducing the issue - Need to check the code for the corruption.
I can reproduce a corruption with the attached document. Version: 4.4.0.0.alpha0+ Build ID: b447687292334687a371b66d7ad56ba9662b898e TinderBox: Win-x86@39, Branch:master, Time: 2014-06-03_06:24:04
- Checked the export code. docxattributeoutput.cxx and docxsdrexport.cxx - There is a different behaviour during code and the actual document.xml - During the code debugging, within the alternate content there are two separate startTable and endTable. and the inline drawing is getting enclosed within these tables. - As against this in the document.xml, within the alternateContent there is a text frame, in this text frame there is a table and in this table there is yet another textBox[For the inline drawing.] - Had suspected on the fastserializer, that may be due to the mark() and mergeTopMarks(), the order of the elements is getting modified in the final output stream, - Have tried adding dump statements in fastserializer.cxx to check if at any point of time there is a call to PREPEND. No such behaviour observed.
Hi Jorendc, I was not able tor eproduce the issue document. Please could you give me the steps to reproduce. Thanks.
Hi Rajashri, (In reply to comment #4) > I was not able tor eproduce the issue document. > Please could you give me the steps to reproduce. Sure :-) Tested using Windows 8.1 with LibreOffice Version: 4.4.0.0.alpha0+ Build ID: b447687292334687a371b66d7ad56ba9662b898e TinderBox: Win-x86@39, Branch:master, Time: 2014-06-03_06:24:04 * Open LibreOffice * Open your attached file * A dialog pops up saying it is 'already in use' (which is quite strange, but I just click on 'open Copy') * Document opens fine * File > Save As * Save document as .docx (Microsoft Word 2007/2010/2013 XML (.docx)) * Open document using Microsoft Word (I use version 2013) Message: You cannot put drawing objects into a text box, callout, comment, footnote, or endnote. I'll attach my roundtripped document which result in that error. Kind regards, Joren
Created attachment 100449 [details] Roundtripped file using LibreOffice 4.4
I can no longer reproduce this issue with Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: es-ES (es_ES) on Windows 7 (64-bit) Thus, I close this as RESOLVED WORKSFORME Regarding the formatting problem when opening/saving the document, I've created bug 93621, bug 93624, bug 93625