Bug 138995 - FILEOPEN DOCX: A shape in front of textbox is position behind textbox (fine with DOC)
Summary: FILEOPEN DOCX: A shape in front of textbox is position behind textbox (fine w...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.7.2 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.2.0 target:7.1.0.2
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: WPSShapeTextImport-Change
  Show dependency treegraph
 
Reported: 2020-12-17 14:21 UTC by Telesto
Modified: 2023-02-28 01:43 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (9.88 KB, application/vnd.oasis.opendocument.text)
2020-12-18 11:11 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-12-17 14:21:58 UTC
Description:
A shape in front of textbox is position behind textbox after DOCX export

Steps to Reproduce:
1. Open the attached file
2. Save as DOCX
3. File reload

Actual Results:
Shape behind textbox

Expected Results:
Shape above textbox


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.0.0.beta1+ (x64)
Build ID: f9fab4203c1aa0b9a3f27ce2713b6d5addc7df19
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: nl-NL
Calc: CL
Comment 1 Telesto 2020-12-17 14:26:15 UTC
Fine with
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Comment 2 Regina Henschel 2020-12-18 00:21:55 UTC
(In reply to Telesto from comment #0)
> Description:
> A shape in front of textbox is position behind textbox after DOCX export
> 
> Steps to Reproduce:
> 1. Open the attached file

Attachment is missing.
Comment 3 Telesto 2020-12-18 11:11:00 UTC
Created attachment 168286 [details]
Example file
Comment 4 Regina Henschel 2020-12-18 12:36:33 UTC
It seems to be an import error. If I save the attached file to docx, then the docx-file has the correct stacking order in Word.

It seems there is a mishandling of property "wrap through". The blue ellipse is in front of the orange background of the text box, but behind the text of the text box. So the stacking order seems to be correct.
Comment 5 raal 2020-12-22 23:37:00 UTC
This seems to have begun at the below commit.
Adding Cc: to Miklos Vajna ; Could you possibly take a look at this one?
Thanks

bisected with bibisect-44max> 64c8b13f248fe7ea3808c7f8e62d0d656f170378 is the first bad commit
commit 64c8b13f248fe7ea3808c7f8e62d0d656f170378
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Mar 14 21:42:08 2015 +0800

    source-hash-d379d18666aa42031359ca8eb34b0021960347ae
    
    commit d379d18666aa42031359ca8eb34b0021960347ae
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    AuthorDate: Wed Jun 18 11:57:31 2014 +0200
    Commit:     Miklos Vajna <vmiklos@collabora.co.uk>
    CommitDate: Wed Jun 18 12:09:15 2014 +0200
    
        oox: import WPS shape with text as shape with textbox
    
        This allows having real shapes (like having rounded corners) and complex
        content (like containing a table) at the same time.
    
        WPS shapes are wrappers around drawingML markup in DOCX files, so this
        only affects the DOCX import.
    
        Change-Id: Iad1c1c61233be1c17efa1821e680927aa9587215
Comment 6 Commit Notification 2021-01-12 15:08:51 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/200cd2b99bee18962a970edc5d059286f6c3ea0e

tdf#138995 DOCX import: fix handling of textbox zorders

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 Xisco Faulí 2021-01-13 19:31:48 UTC
Verified in

Version: 7.2.0.0.alpha0+
Build ID: e027a91010a4517cfa907f3d80c9188f026b3823
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Miklos, thanks for fixing this issue!!
Comment 8 Commit Notification 2021-01-14 07:36:15 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#138995 DOCX import: fix handling of textbox zorders

It will be available in 7.1.0.2.

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.