Bug 162317 - Saving a fodt document with an image to DOCX creates a broken file
Summary: Saving a fodt document with an image to DOCX creates a broken file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/writer-...
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks: DOCX-Corrupted ODF-Flat
  Show dependency treegraph
 
Reported: 2024-08-02 12:56 UTC by Mike Kaganski
Modified: 2024-08-21 03:16 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Saving to DOCX creates a broken file (1.23 KB, application/vnd.oasis.opendocument.text)
2024-08-02 12:56 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2024-08-02 12:56:41 UTC
Created attachment 195666 [details]
Saving to DOCX creates a broken file

The attachment contains an image frame with several empty paragraphs. A DOCX created from it misses xmlns:pic, so fails to open in Word.

Regression after commit 1279f9c835d188be72a21779377cb03841d6bc54 (DOCX drawingml export: give drawinglayer pictures the correct namespace, 2013-12-17).
Comment 1 Mike Kaganski 2024-08-02 15:18:38 UTC
The image has disappeared in experimental mode since commit 4614af18d3e033e0eed27db3d4c897afb8c8baa1 (DOCX shape export: when in experimental mode, use DML instead of VML, 2013-12-10), and in normal mode it started generating broken file since commit cfb5b20cdc230320ff9f864d1cfd81aaea221da0 (DocxAttributeOutput::OutputFlyFrame_Impl: enable DML export by default, 2013-12-18).
Comment 2 Mike Kaganski 2024-08-02 15:26:34 UTC
Removing paragraphs from the image fixes the export.
Comment 3 Dieter 2024-08-20 08:53:21 UTC
I confirm it with

Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: default; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: CL threaded

Steps:
1. Open attachment 195666 [details]
2. Save as docx
3. Reload -> Press "Yes", if LO asks to repair the file

Additional inforation
Haven't tested, if this also happens with normal odt-file