OASIS Open Document Format for Office Applications (OpenDocument) TC

  • 1.  OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-03-2017 22:48
      |   view attached
    Dear TC, This is about the following JIRA issue: https://issues.oasis-open.org/browse/OFFICE-2122 You may find a summary at the end. ODF applications involved I have created a test document with Microsoft Office Professional Plus 2016 installation, Version 1705 (Build 8201.2102) to be able to have as well DOCX functionality at hands. Aside I have been using a LibreOffice 5.3.3.2 Writer both on a Windows 10 Home edition. Test document description The test document contains four images and fill text to place two images before and two behind it. The images had been created with Microsoft PAINT. I simply have manually written "very behind", "behind", "before" and "very before" on them. [I was slightly reminded of some Sesame Street lessons from childhood] Creating the test document (in Word 2016) I have added those images in Word via Insert->Pictures into the text and used the context menu on the image choosing "Wrap Text" for two images with following "Behind Text" and for the two others "in Front of Text".  The images were manually positioned to be overlapping, to see which one is above the other and sometimes I have corrected the wrong Z positioning again via the context menu on the image choosing "Bring to Front" or "Sent to Back". After this, I have saved the document as DOCX and ODT. NOTE: I am never able to edit XML files and save them within the office document with JEdit as I do with documents from other ODF applications when they are created by any Microsoft office. Therefore I had to neglect XML face-lifting. For instance, incidentally I had duplicated the "very behind" picture during a text copy, so there are 5 pictures in total. XML of original Microsoft Document As we expected the higher the draw:z-index the higher the altitude, raising finally over the image: @draw:z-index="251658240" <=> very behind @draw:z-index="251674624" <=> very behind @draw:z-index="251677696" <=> behind @draw:z-index="251678720" <=> before @draw:z-index="251679744" <=> very before As expected, the images behind the text a graphic style use @style:run-through="background" and those before the text a graphic style have @style:run-through="foreground" XML of imported MSO document within LibreOffice (and saved as ODT) Both documents in ODT and DOCX being loaded into LibreOffice 5.3.3.2 Writer look fine regarding the Z positioning, showing the same relations. When the document is being saved as ODT again by the LO Writer it  keeps its relation still changes the Z positioning to @draw:z-index="0" <=> very behind @draw:z-index="1" <=> very behind @draw:z-index="2" <=> behind @draw:z-index="3" <=> before @draw:z-index="4" <=> very before and ONLY the images behind have an attribute  @style:run-through, which contains at least as expected "background" Please note that the spec is not mentioning a default value "foreground" , but thinking it over it would make sense to name this as default. Roundtrip Interoperability Issues When this document is again being loaded with Word, strangely the order remains mostly the same, BUT the two very bottom pictures are becoming the two top pictures AND all images are behind the text. Strange bug! Missing Test Coverage NOTE: I have only more or less quickly tested the z-index for images within frames and not have tested any other frame content, nor did I tested on of the other 21 elements: <dr3d:cube> 10.5.4 <dr3d:extrude> 10.5.6 <dr3d:rotate> 10.5.7 <dr3d:scene> 10.5.2 <dr3d:sphere> 10.5.5 <draw:caption> 10.3.11 <draw:circle> 10.3.8 <draw:connector> 10.3.10 <draw:control> 10.3.13 <draw:custom-shape> 10.6.1 <draw:ellipse> 10.3.9 <draw:g> 10.3.15 <draw:line> 10.3.3 <draw:measure> 10.3.12 <draw:page-thumbnail> 10.3.14 <draw:path> 10.3.7 <draw:polygon> 10.3.5 <draw:polyline> 10.3.4 <draw:rect> 10.3.2 <draw:regular-polygon> 10.3.6 and  <office:annotation> 14.1. Summary: A handful of things to point out We need more test documents to have a better coverage: Does some office vendors have a test base on this feature property they might be able to share? Only the ordering of the z-index values are of interest, not the values itself  As expected style:run-through="background" is being used to emulate a negative z-index.  If we do not want to improve the z-index as Dough suggested, we might still want to make the value "foreground" the default value of @style:run-through There is an interoperability issue when loading the Word document with Writer than saving it as ODT and loading it back with Word: The two pictures at the very bottom are now at the very top. Kind regards, Svante ? Attachment: 4ImagesAndTextOverlapping_MSO-docx_LO-odt_MSO.odt Description: application/vnd.oasis.opendocument.text Attachment: 4ImagesAndTextOverlapping-MSO.docx Description: application/vnd.openxmlformats-officedocument.wordprocessingml.document Attachment: 4ImagesAndTextOverlapping-MSO.odt Description: application/vnd.oasis.opendocument.text Attachment: 4ImagesAndTextOverlapping_MSO-docx_LO.odt Description: application/vnd.oasis.opendocument.text

    Attachment(s)



  • 2.  Re: [office] OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-04-2017 23:45
    Hi all, I think, that there is an additional problem, if you use groups. The objects in the attached document are named according their z-Index: OneLine (horizontal) TwoGroup (having green shapes) ThreeRectangle (orange) FourGroup (having orange shapes) FiveCircle (green) SixRectangle (green) SevenLine (Vertical) EightCircle (orange) NineRectangleBackground (red) The rendering order in LibreOffice is from back to top: NineRectangleBackground (red) OneLine (horizontal) FiveCircle (green) SixRectangle (green) ThreeRectangle (orange) EightCircle (orange) SevenLine (Vertical) The rendering order in LibreOffice is similar to numbering of nested lists. On a first level you have NineRectanbleBackground [background] OneLine TwoGroup FourGroup SevenLine and on the second level for TwoGroup FiveCircle SixRectangle and on the second level for FourGroup ThreeRectangle EightCircle The specification needs to say, that for a group, first all members of the group are rendered, and then next object in z-order outside the group. Hopefully all application handle it the same. So please test it. Kind regards Regina Attachment: TestZIndexBackground.odp Description: OpenOffice Impress presentation


  • 3.  Re: [office] OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-10-2017 13:32
      |   view attached
    Here is there rendering in Calligra. Attachment: TestZIndexBackground_calligra.png Description: TestZIndexBackground_calligra.png


  • 4.  Re: Re: [office] OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-10-2017 13:51
      |   view attached
    and the rendering in ms office 2016 Attachment: TestZIndexBackground_msoffice_2016.png Description: TestZIndexBackground_msoffice_2016.png


  • 5.  Re: [office] OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-10-2017 14:02
      |   view attached
    And libreoffice rendering: Attachment: TestZIndexBackground_libreoffice.png Description: TestZIndexBackground_libreoffice.png


  • 6.  Re: [office] OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-10-2017 13:15
    On 04.07.2017 00:48, Svante Schubert wrote: > *XML of imported MSO document within LibreOffice (and saved as ODT)* > Both documents in ODT and DOCX being loaded into LibreOffice 5.3.3.2 > Writer look fine regarding the Z positioning, showing the same relations. > When the document is being saved as ODT again by the LO Writer it keeps > its relation still changes the Z positioning to > @draw:z-index="0" <=> very behind > @draw:z-index="1" <=> very behind > @draw:z-index="2" <=> behind > @draw:z-index="3" <=> before > @draw:z-index="4" <=> very before > > and ONLY the images behind have an attribute > @style:run-through, which contains at least as expected "background" > Please note that the spec is not mentioning a default value "foreground" > < http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#property-style_run-through >, > but thinking it over it would make sense to name this as default. i agree, it would make sense to do this since there are lots of existing documents created with that assumption. > *Roundtrip Interoperability Issues* > When this document is again being loaded with Word, strangely the order > remains mostly the same, BUT the two very bottom pictures are becoming > the two top pictures AND all images are behind the text. Strange bug! ... and it would also make sense to change to change LibreOffice to write the run-through attribute always, which should hopefully avoid this problem. -- Michael Stahl Software Engineer Platform Engineering - Desktop Team Red Hat Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com Red Hat GmbH, http://www.de.redhat.com/ , Sitz: Grasbrunn, Handelsregister: Amtsgericht München, HRB 153243, Geschäftsführer: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander


  • 7.  Re: [office] OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-14-2017 16:01
    On 10.07.2017 15:14, Michael Stahl wrote: > On 04.07.2017 00:48, Svante Schubert wrote: >> *XML of imported MSO document within LibreOffice (and saved as ODT)* >> Both documents in ODT and DOCX being loaded into LibreOffice 5.3.3.2 >> Writer look fine regarding the Z positioning, showing the same relations. >> When the document is being saved as ODT again by the LO Writer it keeps >> its relation still changes the Z positioning to >> @draw:z-index="0" <=> very behind >> @draw:z-index="1" <=> very behind >> @draw:z-index="2" <=> behind >> @draw:z-index="3" <=> before >> @draw:z-index="4" <=> very before >> >> and ONLY the images behind have an attribute >> @style:run-through, which contains at least as expected "background" i wanted to reproduce this problem, but i can't - round-tripping the "4ImagesAndTextOverlapping-MSO.odt" i get a style "fr1" with style:run-through="foreground" style:wrap="run-through", applied 2 times, and a style "fr2" with style:run-through="background" style:wrap="run-through", applied 3 times. this is with current master, a 5.3.3.2 build and 5.2.7 from Fedora. Svante, are you sure about this, or what am i missing? -- Michael Stahl Software Engineer Platform Engineering - Desktop Team Red Hat Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com Red Hat GmbH, http://www.de.redhat.com/ , Sitz: Grasbrunn, Handelsregister: Amtsgericht München, HRB 153243, Geschäftsführer: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander


  • 8.  Re: [office] OFFICE-2122: @draw:z-index and @style:run-through on images within a

    Posted 07-14-2017 16:31
    Hello Michael, the problem I have been talking about started when re-importing the document back to Microsoft office. LibreOffice did everything fine, the change of the draw:z-index attribute by keeping its relation seems fine to me. If we are still cross talking, just ping me offline or even call me by phone me if you dare ;) Cheers, Svante ? 2017-07-14 18:01 GMT+02:00 Michael Stahl < mstahl@redhat.com > : On 10.07.2017 15:14, Michael Stahl wrote: > On 04.07.2017 00 :48, Svante Schubert wrote: >> *XML of imported MSO document within LibreOffice (and saved as ODT)* >> Both documents in ODT and DOCX being loaded into LibreOffice 5.3.3.2 >> Writer look fine regarding the Z positioning, showing the same relations. >> When the document is being saved as ODT again by the LO Writer it  keeps >> its relation still changes the Z positioning to >> @draw:z-index="0" <=> very behind >> @draw:z-index="1" <=> very behind >> @draw:z-index="2" <=> behind >> @draw:z-index="3" <=> before >> @draw:z-index="4" <=> very before >> >> and ONLY the images behind have an attribute >> @style:run-through, which contains at least as expected "background" i wanted to reproduce this problem, but i can't - round-tripping the "4ImagesAndTextOverlapping- MSO.odt" i get a style "fr1" with style:run-through="foreground" style:wrap="run-through", applied 2 times, and a style "fr2" with style:run-through="background" style:wrap="run-through", applied 3 times. this is with current master, a 5.3.3.2 build and 5.2.7 from Fedora. Svante, are you sure about this, or what am i missing? -- Michael Stahl Software Engineer Platform Engineering - Desktop Team Red Hat Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com Red Hat GmbH, http://www.de.redhat.com/ , Sitz: Grasbrunn, Handelsregister: Amtsgericht München, HRB 153243, Geschäftsführer: Charles Cachera, Michael Cunningham, Michael O'Neill, Eric Shander ------------------------------ ------------------------------ --------- To unsubscribe from this mail list, you must leave the OASIS TC that generates this mail.  Follow this link to all your TCs in OASIS at: https://www.oasis-open.org/ apps/org/workgroup/portal/my_ workgroups.php