Bug 133487 - z-index wrong for shape with style:run-through="background"
Summary: z-index wrong for shape with style:run-through="background"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:7.2.0
Keywords:
Depends on:
Blocks: ODF-export-invalid
  Show dependency treegraph
 
Reported: 2020-05-28 23:57 UTC by Regina Henschel
Modified: 2024-06-04 06:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example with wrong z-index (16.95 KB, application/vnd.oasis.opendocument.text)
2020-05-28 23:57 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2020-05-28 23:57:19 UTC
Created attachment 161386 [details]
Example with wrong z-index

Open attached document. You see a red triangle in background, then a blue ellipse in the middle and a yellow rectangle in front. So for the z-index you would expect
red index < blue index < yellow index. But when opening the file you will find
red (2), blue (0) and yellow (1).

For z-index ODF 1.3 says in 19.231, part 3 of the spec:
"The draw:z-index values increase from back to front."
And especially for the case style:run-through:
"For a shape on which the style:run-through 20.351 attribute with value foreground is in effect, producers should not generate a draw:z-index value that is smaller than the value of any draw:z-index on a shape on which the style:run-through attribute with value background is in effect."

Because negative values are not allowed, the z-index values should be
red(0), blue(1), yellow(2), for example.

The ODF 1.2 spec had not such clear rules, but only states "The draw:z-index attribute defines a rendering order for shapes in a document instance."
It becomes more precise in ODF 1.3 with issue https://issues.oasis-open.org/browse/OFFICE-2122. The implementation in LO 7.0 needs to be adapted for ODF 1.3.
Comment 1 Xisco Faulí 2020-06-15 13:35:05 UTC
Moving to NEW
Comment 2 Commit Notification 2021-03-08 11:22:21 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3bc8f90e9693f710f12632f69b9348c1c833c906

(related: tdf#133487) sw: fix ordering of virtual SdrObjects for textboxes

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 Commit Notification 2021-03-11 12:26:13 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/18397b2ede1e6c3feb54bd2bf59da57fd8c4d13a

tdf#140292: (related: tdf#133487) sw: fix ordering of virtual SdrObjects for textboxes

It will be available in 7.1.3.

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 4 Commit Notification 2021-03-15 09:16:30 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9bc6160e0acbc78be998129ea55ed7e4529959fa

tdf#133487 sw ODF export: reorder flys' ZOrder/z-index...

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 5 Commit Notification 2021-03-15 09:17:40 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b4f38c6b8bbc6ea6a5d9354bfd24e411fc5a51fc

tdf#133487 sc ODF export: reorder flys' ZOrder/z-index...

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 6 Michael Stahl (allotropia) 2021-03-15 09:18:57 UTC
fixed on master, also for Calc

note the sorting happens on export so you'll get a new Undo action unless things were sorted properly already