[Libreoffice-bugs] [Bug 120761] FILEOPEN Z-order of objects in attached DOC is wrong

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Apr 8 15:21:09 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=120761

--- Comment #7 from Justin L <jluth at mail.com> ---
Unfortunately there is no documentation in the code that indicates what
determines z-order in DOC files, nor what determines zorder in LO. So we are
left guessing as to whether the implementation is generally correct.

Inserting these three items in reverse order seems to fix the problem (and no
unit tests fail either), but based on a code read, I would expect that the code
is correct too. Confusing!

DOCX supposedly has something like "relativeHeight=“251657728"”, but that
doesn't exist when I round-trip this example as DOCX (but it does have z-index,
which is what is used in this case.)

My guess (which may be entirely wrong) is that DOC has zorder similar to DOCX.
But I see no evidence that this is actually being used. Our implementation
seems to be simply based on the order in which the shape is read from the
document, with the first read as the lowest zorder.

LO seems to use 0-n, where 0 is the lowest zorder.

And that seems like exactly what is happening for attachment 145885. But I
notice something very strange. I expect that the IDs from DOCX will match DOC
(because that is true for the example documents that I made to try to test my
ideas), but in this case they are the opposite!
DOCX -   item     -  DOC
2049 - Text Box 2 - 2051
2050 - Picture 1  - 2050
2051 - Picture 2  - 2049

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210408/e31e4141/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list