Created attachment 173629 [details] attachment 168914 [details] saved with current nightly This is split off from bug 139650 attachment 168914 [details] contains a grouped shape with Contour wrap set. When saved as DOCX the wrap is Square instead of Tight. Steps to reproduce: 1. Open attachment 168914 [details] 2. Save as DOCX, reload in Word Actual results: Bottom grouped shape no longer has contour wrap. See attachment 173625 [details] Expected results: Should save the contour wrap. LibreOffice details: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: da13b76e07231131cb951868a314ee6f51c0f254 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL Also in 7.0, 6.0, 5.0, 4.3. In 4.0 the shape completely disappeared.
That is a missing feature. Only for custom shapes a wrap polygon is created and that one is bad. The relevant part is in docxsdrexport.cxx, starting in line 1092. In addition interpretation of text::WrapTextMode_LEFT and text::WrapTextMode:Right is missing. I have already started to work on it, so I would like to take it. But I'm not working full time on LibreOffice, so I need some time. Do you need a quick solution?
I'll work on it and fix it together with the other wrap problems in DocxSdrExport::startDMLAnchorInline.
Created attachment 175062 [details] The example file and its docx version in current master The contour wrap seems to be exported correctly now in: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 80a47aae1419842f4496f02028e2b49763aea25b CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL after: commit 61ef73bb9e06ac7325abc26698314d7e35c164cc [log] author Regina Henschel <rb.henschel@t-online.de> Sun Aug 08 01:05:09 2021 +0200 committer Miklos Vajna <vmiklos@collabora.com> Fri Aug 13 16:00:35 2021 +0200 tdf#143432 and more, improve wrap contour export
Created attachment 175063 [details] The exported docx in Writer and Word However it is still not good in Word: - Writer sees the grouped shape as Optimal wrap with Contour enabled - Word sees it as Through wrap instead of Tight
Created attachment 175064 [details] The example file saved by Writer The relevant part seems to be this in document.xml: <wp:wrapThrough wrapText="largest"> <wp:wrapPolygon edited="0"> <wp:start x="0" y="0"/> <wp:lineTo x="21600" y="0"/> <wp:lineTo x="21600" y="21600"/> <wp:lineTo x="0" y="21600"/> <wp:lineTo x="0" y="0"/> </wp:wrapPolygon> </wp:wrapThrough>
Created attachment 175065 [details] The previous example fixed up in Word 2019 After manually fixing it in Word and saving, the relevant looking part in document.xml: <wp:wrapTight wrapText="largest"> <wp:wrapPolygon edited="0"> <wp:start x="10740" y="0"/> <wp:lineTo x="10740" y="7144"/> <wp:lineTo x="0" y="8288"/> <wp:lineTo x="0" y="14432"/> <wp:lineTo x="10502" y="16289"/> <wp:lineTo x="10502" y="21433"/> <wp:lineTo x="19571" y="21433"/> <wp:lineTo x="19571" y="4858"/> <wp:lineTo x="21003" y="1143"/> <wp:lineTo x="20765" y="0"/> <wp:lineTo x="10740" y="0"/> </wp:wrapPolygon> </wp:wrapTight>
Dear Regina, bug has been in ASSIGNED status for more than 3 months without any activity. Resetting it to NEW. Please assign it back to yourself if you're still working on this.