Bug 161178 - Inserting text objets over image messes the result on every reopening
Summary: Inserting text objets over image messes the result on every reopening
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.3.2 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:odf, regression
Depends on:
Blocks: ODF-export-invalid Z-Order
  Show dependency treegraph
 
Reported: 2024-05-20 00:01 UTC by philippe
Modified: 2024-10-14 15:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Shows that 2 and 4 have moved (they were over the image) 6 and 7 have gone under the image (which was before below everything) (182.37 KB, image/png)
2024-05-20 00:03 UTC, philippe
Details
The document which shows the problem (chapter 4.2... almost images show the problem) (2.14 MB, application/vnd.oasis.opendocument.text)
2024-05-20 00:14 UTC, philippe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description philippe 2024-05-20 00:01:45 UTC
Description:
I've inserted an image in my document (as anchored to a character) and added text objects over the image (achored to the same character). The text objects are over the image. I save and close and reopen and some of the text objects have moved or are under the image. I always have to review all my images for the same reason.

It happens on 24.2.3.2 but it happened with ALL previous versions (just updated to the very latest see it is works better).

Steps to Reproduce:
1.Insert an image
2.Add several text objects over the image
3.Save and close document
4.Reopen, normally some of the the text objects have moved or have gone under the image, you must review all of them all the time.

Actual Results:
Objects move by themselves and Zorder is changed

Expected Results:
The objects stay where they were put and the zorder doesn't change


Reproducible: Always


User Profile Reset: No

Additional Info:
I could send an image showing the result AFTER reopening, I can do it with almost all my images with text objects and every time I reopen the document.
I'm considering creating an image outside of LO because I'm tired of fixing the same things again and again, better create a fixed bitmap but that would be accepting to be defeated. Just can't believe it doesn't happen to the others.
Comment 1 philippe 2024-05-20 00:03:39 UTC
Created attachment 194204 [details]
Shows that 2 and 4 have moved (they were over the image) 6 and 7 have gone under the image (which was before below everything)
Comment 2 philippe 2024-05-20 00:14:24 UTC
Created attachment 194205 [details]
The document which shows the problem (chapter 4.2... almost images show the problem)

I attached my original file which makes the problem all the time (but it does it with all me other files, for the other ones I anded up using Word which works great doing the same thing).
Comment 3 Stéphane Guillou (stragu) 2024-06-04 05:57:40 UTC Comment hidden (obsolete)
Comment 4 Stéphane Guillou (stragu) 2024-06-04 06:52:57 UTC
Hm I had a closer look, and turns out the movements of objects (using "send to back" on the image) are not inherited (so different to bug 72367), and didn't start in 7.3 (so different to bug 159140).

With steps:
1. Open attachment 194205 [details]
2. Go to the first illustration in chapter 4.2 (page 18)
3. Send picture to back (see that six text boxes are now visible)
4. Save and reload

Result: some objects moved; object text position not synced to object frame; objects lower than image in Z-order.

Bibisected with linux-64-7.2 to first bad build [4a2ecb149dcd234c72b218ad7fef12b1d506538e] which is:

commit 3bc8f90e9693f710f12632f69b9348c1c833c906
author	Michael Stahl 	Fri Mar 05 21:06:28 2021 +0100
committer	Miklos Vajna 	Mon Mar 08 12:21:42 2021 +0100
(related: tdf#133487) sw: fix ordering of virtual SdrObjects for textboxes
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112029

This patch also made it 7.1.3 as 18397b2ede1e6c3feb54bd2bf59da57fd8c4d13a.

Before those commits, text boxes would stay put above the image, at their original location.

Michael, can you please have a look? Symptoms have changed slightly since then, for example with bug 159140 in 7.3, but that commit is when it started going wrong.
Comment 5 Stéphane Guillou (stragu) 2024-06-04 06:54:39 UTC
(Michael, forgot to copy you in, please see comment 4)