Bug 138141

Summary: FILEOPEN DOCX Textframes don’t inherit their shapes z-order
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: WriterAssignee: Attila Bakos (NISZ) <bakos.attilakaroly>
Status: VERIFIED FIXED    
Severity: normal CC: aron.budea, bakos.attilakaroly, marcoagpinto, nemeth, serval2412, srdosm, stgatev, telesto, vmiklos, xiscofauli
Priority: medium Keywords: filter:docx
Version: 4.4.0.3 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=100037
https://bugs.documentfoundation.org/show_bug.cgi?id=138995
Whiteboard: target:7.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 104449    
Attachments: Example file from Word
Screenshot of the original document side by side in Word and Writer
Screenshot of the original document side by side in Word and Writer

Description NISZ LibreOffice Team 2020-11-11 16:03:53 UTC
Created attachment 167208 [details]
Example file from Word

Attached document contains some overlapping textboxes with different z-order.
When opened in Writer the textboxes seem to respect the z-order, but their textframes don’t.

Steps to reproduce:
    1. Open attached document

Actual results:
Black text overlaps the blue and green; the blue text overlaps the green.

Expected results:
Text follows the z-order of their shapes: green should overlap blue and black, blue should overlap black.

LibreOffice details:
Version: 7.1.0.0.alpha1+ (x64)
Build ID: 00e5c63c35307faacf76a5e2ca7953c4208244ed
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Also in:
Version: 6.0.0.3
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: en-US (hu_HU); Calc: CL

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: hu-HU (hu_HU)

Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: hu_HU

Not yet in:
Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0
Comment 1 NISZ LibreOffice Team 2020-11-11 16:04:09 UTC
Created attachment 167209 [details]
Screenshot of the original document side by side in Word and Writer
Comment 2 Martin Srdoš 2020-11-11 18:56:11 UTC
Thank you for reporting the bug. I can confirm that the bug is present in:

[Version: 7.1.0.0.alpha1+ (x64)
Build ID: 00e5c63c35307faacf76a5e2ca7953c4208244ed
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: en-US
Calc: CL]

and also in
[Version: 4.4.0.3
Bild ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7]

And it is not present in
[Version: 4.3.0.4
Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0]
Comment 3 Xisco Faulí 2020-11-11 19:33:56 UTC
Reproduced in

Version: 7.1.0.0.alpha1+
Build ID: 03cafc2ab6b1678f82e9a30b6f81e505660ee702
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 Julien Nabet 2020-11-11 19:58:32 UTC
It makes me think about tdf#100037 I had submitted, I put it in See also.
Comment 5 NISZ LibreOffice Team 2021-01-14 11:55:48 UTC
Created attachment 168877 [details]
Screenshot of the original document side by side in Word and Writer

This got better after bug #138995 was fixed, but still not perfect:

- Black no longer overlaps green, but
- Blue still overlaps green and black still overlaps blue.
Comment 6 Commit Notification 2021-05-25 11:06:47 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0e6d963fbca16f98a3dbb6ef2fee3736a89d055b

tdf#138141 sw: fix textbox z-order

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 7 Attila Bakos (NISZ) 2021-05-25 11:12:56 UTC
*** Bug 107428 has been marked as a duplicate of this bug. ***
Comment 8 NISZ LibreOffice Team 2021-05-28 12:28:56 UTC
*** Bug 70105 has been marked as a duplicate of this bug. ***
Comment 9 NISZ LibreOffice Team 2021-06-08 09:27:45 UTC
Verified in: 
Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 3b57ebb445df8a2bc3d916ea79f8af45e20e4e62
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded
Comment 10 Miklos Vajna 2021-11-03 13:53:24 UTC
*** Bug 137055 has been marked as a duplicate of this bug. ***