Bug 141467 - z-index of form control does not correspond to visual appearance
Summary: z-index of form control does not correspond to visual appearance
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-02 23:30 UTC by Regina Henschel
Modified: 2021-04-07 08:05 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example with image control and custom shape (25.22 KB, application/vnd.oasis.opendocument.text)
2021-04-02 23:30 UTC, Regina Henschel
Details
Shape vs Control (11.56 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-04-03 15:21 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2021-04-02 23:30:09 UTC
Created attachment 170929 [details]
Example with image control and custom shape

The attached document has an image control and a custom shape. Control shapes are always in front of other objects, because they are automatically put to layer "Controls" and this layer has the special property to show its content always in front.

Click on the custom shape and use "Bring to front". You notice, that this is not possible in relationship to the image control. 

Save the file, unpack it and examine content.xml. Notice, that the custom shape has a higher z-index as the form control, although the form control has been in front.

Expected: The form control has a higher z-index than the custom shape for to reflect the visual appearance.
Comment 1 Regina Henschel 2021-04-03 15:21:44 UTC
Created attachment 170935 [details]
Shape vs Control

The same problem is in Calc. If you switch to form edit mode and you select the arrow, you can see, that part of the arrow is behind the control. But in file format the control has index 0 and the arrow index 1. I know as long as we treat controls this way, we cannot reflect the z-index on import, but we can write it that way to file, that controls always have higher z-index to correspond to the way we render it.
Comment 2 Commit Notification 2021-04-07 08:03:57 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/79ef3c7ae3b2f7be5ba6fe38997e846fd9c7e0ee

tdf#141467 xmloff,sc,sw: ODF export: reorder flys' ZOrder/z-index harder

It will be available in 7.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Michael Stahl (allotropia) 2021-04-07 08:05:14 UTC
fixed on master