Bug 153761 - FILESAVE ODT->DOCX hatch fill in shape is lost
Summary: FILESAVE ODT->DOCX hatch fill in shape is lost
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
4.2 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: OOXML-Object-Fill 126533
  Show dependency treegraph
 
Reported: 2023-02-20 14:29 UTC by Regina Henschel
Modified: 2024-04-19 15:52 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
shapes using hatch fill (13.87 KB, application/vnd.oasis.opendocument.text)
2023-02-20 14:29 UTC, Regina Henschel
Details
Screenshot comparing 7.5 7.6 Word (158.25 KB, image/png)
2023-02-20 14:57 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-02-20 14:29:23 UTC
Created attachment 185491 [details]
shapes using hatch fill

Open attached file and save it to docx. Open the file in Word. Error: Word cannot open the file.

Problem is, that LO writes the markup so, as if it is a bitmap fill, but does not provide the bitmap, which results in an empty rId attribute.

Expected:
In case a corresponding preset fill exists in OOXML, the fil is exported with <a:pattFill> element. The available preset fills are listed in section 20.1.10.51 in ISO/IEC 29500-1:2016(E). Those cover most of our predefined hatch and pattern fill as long as the user does not change the angle.

In case there is no suitable kind of fill in OOXML, the fill is exported as bitmap fill and the needed bitmap is correctly exported and referenced.
Comment 1 m_a_riosv 2023-02-20 14:57:10 UTC
Created attachment 185495 [details]
Screenshot comparing 7.5 7.6 Word

Word allows to recover the file (Microsoft® Word para Microsoft 365 MSO (versión 2301 compilación 16.0.16026.20002) de 64 bit. But changing the hatching in the figures.

Saving with 7.5 or 7.6, gives the same result in Word.
Comment 2 m_a_riosv 2023-02-20 14:58:28 UTC
Partially reproducible.
Version: 7.5.1.1 (X86_64) / LibreOffice Community
Build ID: bd819218336a5be54a11b986ea4dd2db2efb120e
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9788a565b3241d1bd62394b9e29c322361d05f80
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 3 Justin L 2024-02-16 19:41:21 UTC
I am getting oox/source/export/drawingml.cxx:1499: unhandled graphic type 0
when it tries to write out the ESCHER_Prop_fillBlip in VMLExport::Commit.

bisected to 4.2 commit dbc7c605d65cc2dc37af3d2077ac553754bc4f7d
Author: Armin Le Grand on Tue Oct 9 14:41:38 2012 +0000
    Resolves: #i121183# enhance export of ppt hatch masterpagebackground
Comment 4 Commit Notification 2024-02-17 02:58:17 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5132255021aa61f8a1fa7d8de820cb3528699812

tdf#153761 vml export: avoid corrupt docx: don't write empty r:id

It will be available in 24.8.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 5 Commit Notification 2024-02-19 11:53:06 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/38ff7cd25af90dcde19f33aaede23935df6758d8

tdf#153761 vml export: avoid corrupt docx: don't write empty r:id

It will be available in 24.2.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.
Comment 6 Justin L 2024-02-24 18:51:01 UTC
I'm going to leave this open because the hatch fill is still unreadable by Word (and LO for that matter). I think the problem is that lclDrawHatch is trying to output an EMF graphic. (bOOxmlExport probably should be tied to EscherPropertyContainer - it is WRONG when lclDrawHatch is called.)

[I tried to resurrect this for page background, but failed.
https://gerrit.libreoffice.org/c/core/+/163471]
Comment 7 Volga 2024-02-28 04:54:08 UTC Comment hidden (no-value)