Bug 136059 - Filesave DOCX: Non-square shape with border frame has wrap wrong applied
Summary: Filesave DOCX: Non-square shape with border frame has wrap wrong applied
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard: target:7.2.0
Keywords: filter:docx, implementationError
Depends on:
Blocks: Shape-ODF-OOXML-export
  Show dependency treegraph
 
Reported: 2020-08-24 06:52 UTC by Telesto
Modified: 2021-07-19 13:28 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (17.54 KB, application/vnd.oasis.opendocument.text)
2020-08-24 06:53 UTC, Telesto
Details
Screenshot of the XML parts, side by side, by Writer and by Word. (48.50 KB, image/png)
2020-10-13 09:04 UTC, Balázs Regényi
Details
Example ODT with 6 wraps (19.91 KB, application/vnd.oasis.opendocument.text)
2020-11-05 08:33 UTC, Timur
Details
Example ODT with 6 wraps - comparison screenshot (330.11 KB, image/png)
2020-11-05 08:43 UTC, Timur
Details
The example file fixed up in Word manually (21.56 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-05 12:13 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-08-24 06:52:45 UTC
Description:
Shape gets border frame on docx export ruining the wrap around contour

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

Actual Results:
Notice the frame around the shape

Expected Results:
Probably not


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.2
Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c
CPU threads: 4; OS: Mac OS X 10.12.6; UI render: default; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 1 Telesto 2020-08-24 06:53:06 UTC
Created attachment 164615 [details]
Example file
Comment 2 Telesto 2020-08-24 08:11:34 UTC
Adding bibisectrequest no bibisect the point where this got implemented in they way it currently works. Introduced between 4.3-4.4. It's not a regression, but the fix appears to be incomplete
Comment 3 Telesto 2020-08-24 08:14:02 UTC Comment hidden (obsolete)
Comment 4 Attila Baraksó (NISZ) 2020-08-31 09:22:05 UTC Comment hidden (obsolete)
Comment 5 Attila Baraksó (NISZ) 2020-09-01 09:50:06 UTC
(In reply to Telesto from comment #3)
> @Barakso
> Has NISZ interest in this type of issue; as I love to raise attention for
> certain bugs. But slightly pointless if out of scope of the area of interest

We discussed it, our team is interested in DOCX export issues, so feel free to add CC next time our team account (NISZ LibreOffice Team) instead of my personal account. Thanks!
Comment 6 Attila Baraksó (NISZ) 2020-09-01 09:58:06 UTC
Reproduced in:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 1e0cfd5662d95cea84e80e4fe10d52c3b1101ae6
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL
Comment 7 Timur 2020-09-07 14:55:07 UTC
This is not about frame, but about wrong applied wrap. More wraps is wrong: Optimal, Before, After...  Those wraps look fine if, after fileopen of saved DOCX, wrap is set to None and reapplied. 
Moral: test more and feel less free to call devs until issue is clear.
Comment 8 Balázs Regényi 2020-10-13 09:04:19 UTC
Created attachment 166341 [details]
Screenshot of the XML parts, side by side, by Writer and by Word.


The problem is similar as all remained bugs in meta bug Shape-ODF-OOXML-export (bug 136358). Maybe complete support of custom shapes (from ODF to OOXML) should exist to fix this bug.

But the wrap is problem too, see attachment.
Comment 9 Timur 2020-11-05 08:33:01 UTC
Created attachment 167020 [details]
Example ODT with 6 wraps

Here is a better example ODT.
Comment 10 Timur 2020-11-05 08:43:21 UTC
Created attachment 167021 [details]
Example ODT with 6 wraps - comparison screenshot

Example ODT with 6 wraps is compared from ODT in LO to opening DOC/X in LO and MSO.
None of opens is fully correct. 
DOCX in MSO and LO opens OPTIMAL,BEFORE, AFTER, PARALLEL as Square wrap, BACKGROUND, THROUGH are good.
DOC in LO opens as DOCX.
DOC in MSO is the best, just OPTIMAL is different sided, while BEFORE, AFTER, PARALLEL, BACKGROUND, THROUGH are good.
Comment 11 Xisco Faulí 2020-11-05 10:35:15 UTC
*** Bug 136386 has been marked as a duplicate of this bug. ***
Comment 12 NISZ LibreOffice Team 2020-11-05 12:13:14 UTC
Created attachment 167034 [details]
The example file fixed up in Word manually

To have the desired effect we would need to export these wrap settings (importing them works fine):

Optimal: <wp:wrapTight wrapText="largest">
Before: <wp:wrapTight wrapText="left">
After: <wp:wrapTight wrapText="right">
Paralell: <wp:wrapTight wrapText="bothSides">
Comment 13 Commit Notification 2021-02-04 12:26:52 UTC
Attila Bakos (NISZ) committed a patch related to this issue.
It has been pushed to "master":

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

tdf#136059 OOXML export: fix shape wrap "Contour"

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 14 Timur 2021-02-18 14:33:32 UTC
Filesave as DOCX looks good for wrap, so this seems to be fixed. 
I didn't check the duplicate. 

Text reflow is good on reopen in LO but not good in MSO (page 1 opens on two pages), which was also before, so it's another issue. 

DOC needs to be reported separately.
Comment 15 Regina Henschel 2021-07-19 13:23:04 UTC
The implemented solution has the problem, that it only works if the path has fixed coordinates and no references to adjustment values or to formulas, and if the path uses a "0 0 21600 21600" viewbox. I'll fix it together with the other wrap problems in DocxSdrExport::startDMLAnchorInline.
Comment 16 Regina Henschel 2021-07-19 13:28:06 UTC
The follow up report is bug 142433.