Bug 140123 - FILESAVE DOCX Image caption Z-order incorrect in specific document
Summary: FILESAVE DOCX Image caption Z-order incorrect in specific document
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Textbox
  Show dependency treegraph
 
Reported: 2021-02-03 13:17 UTC by NISZ LibreOffice Team
Modified: 2022-07-07 08:48 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (37.52 KB, application/vnd.oasis.opendocument.text)
2021-02-03 13:17 UTC, NISZ LibreOffice Team
Details
The original file saved by Writer (32.83 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-03 13:17 UTC, NISZ LibreOffice Team
Details
Screenshot of the original and exported document side by side in Writer (87.09 KB, image/png)
2021-02-03 13:18 UTC, NISZ LibreOffice Team
Details
The example file after adding one more image and saving to docx. (33.08 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-02-03 13:18 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-02-03 13:17:31 UTC
Created attachment 169432 [details]
Example file from Writer

Attached document was edited in Writer, saved as docx and saved back to odt.
When saved as docx, the captioned image breaks and disappears. Selecting its frame, then sending it to the back reveals the image and the caption.
At the same time It looks fine in Word.

It is also somewhat difficult to reproduce this problem: I can’t reproduce with a new file, or with this example if I remove the header image (not the complete header, only the image is enough) or any of the mostly empty first three pages.

Steps to reproduce:
1.	Open attached file
2.	Save as DOCX, reload.

Actual results:
Image on last page is hidden by the caption frame (shape since docx save).

Expected results:
Image and caption is visible.

Another way to reproduce the problem is inserting a new image before the last page, adding a caption and saving to docx.
This causes the new image to be hidden by its caption frame and the already existing one to not be hidden.

LibreOffice details:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 318d384c596c1593667d6c936f55bf6ebd0c5db6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL

Additional Information: 

Bibisected using bibisect-win64-7.1 to:
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=d84e590486e2c26212931de80a84181d7aca7bbe 
author	Michael Stahl <Michael.Stahl@cib.de>	2020-08-26 17:08:00 +0200
committer	Michael Stahl <michael.stahl@cib.de>	2020-08-26 20:44:07 +0200

sw: DOCX export: don't export text frames as transparent

Although I think this only made the problem visible (by adding a white background to the frame on export) and did not cause it. So not setting regression.
Comment 1 NISZ LibreOffice Team 2021-02-03 13:17:55 UTC
Created attachment 169433 [details]
The original file saved by Writer
Comment 2 NISZ LibreOffice Team 2021-02-03 13:18:19 UTC
Created attachment 169434 [details]
Screenshot of the original and exported document side by side in Writer
Comment 3 NISZ LibreOffice Team 2021-02-03 13:18:36 UTC
Created attachment 169435 [details]
The example file after adding one more image and saving to docx.
Comment 4 NISZ LibreOffice Team 2021-02-03 14:13:57 UTC
@Attila I thought you might be interested in this one.
Comment 5 Xisco Faulí 2021-02-18 10:17:08 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=d84e590486e2c26212931de80a84181d7aca7bbe

author	Michael Stahl <Michael.Stahl@cib.de>	2020-08-26 17:08:00 +0200
committer	Michael Stahl <michael.stahl@cib.de>	2020-08-26 20:44:07 +0200
commit d84e590486e2c26212931de80a84181d7aca7bbe (patch)
tree b0e1448db85e72ba5e480ca9ab3fa0573e048821
parent 8280491bec32fea5bbdad23f000538d000ed2f24 (diff)
sw: DOCX export: don't export text frames as transparent

Bisected with: bibisect-linux64-7.1

Adding Cc: to Michael Stahl
Comment 6 Michael Stahl (allotropia) 2021-02-18 10:18:58 UTC
according to description it's not a regression, the commit just made the bug visible
Comment 7 Xisco Faulí 2021-02-18 10:22:23 UTC
(In reply to Michael Stahl (allotropia) from comment #6)
> according to description it's not a regression, the commit just made the bug
> visible

oh, you are right, I didn't read the entire description. sorry for that
Comment 8 NISZ LibreOffice Team 2022-07-07 08:48:28 UTC
Verified in:
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: e4066a41406b1ddd454901b4fa718cf9be2746c4
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL