Bug 166335 - FILESAVE DOCX Word fails to open roundtripped document (issue with shape guides/glue points)
Summary: FILESAVE DOCX Word fails to open roundtripped document (issue with shape guid...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium normal
Assignee: Tibor Nagy
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: OOXML-Shapes DOCX-Corrupted
  Show dependency treegraph
 
Reported: 2025-04-25 13:45 UTC by Aron Budea
Modified: 2025-04-30 10:43 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-04-25 13:45:40 UTC
Open and save attachment 115291 [details] from bug 91061 back to DOCX, then try opening it in Word.

=> Word fails to open the file cleanly.

Observed using LO 25.8.0.0.alpha0+ (736998ccef0bacdd2bbf038c98dacfbe654f1a4d) / Windows.

If one:
- unzips the saved DOCX,
- executes the following command (can be done in Linux/Cygwin, needs xmllint installed): find . -name "*.xml" -type f -exec xmllint --output '{}' --format '{}' \;
- rezips the result with .docx extension

...then Word points to line 204 of /word/document.xml, which is the end of an <a:custGeom> element.
The element has lots of shape guides/gluepoints.

This is a regression from the following commit in 25.8 (and its 25.2 backport):
https://git.libreoffice.org/core/commit/86d36ee56521438069504fbacff8dc2aff3a1afc
https://cgit.freedesktop.org/libreoffice/core/commit/?id=86d36ee56521438069504fbacff8dc2aff3a1afc
author		Tibor Nagy <tibor.nagy.extern@allotropia.de>	Sun Feb 23 21:35:17 2025 +0100
committer	Nagy Tibor <tibor.nagy.extern@allotropia.de>	Mon Feb 24 14:22:14 2025 +0100

"tdf165262 PPTX export: fix shape export regression"

Those suspicious gluepoints aren't there when exported from a build preceding the regressing commit.
Based on basic research, it looks like "logwidth" isn't an allowed formula element for shape guides, eg.:
<a:gd name="GluePoint1Y" fmla="3048002*logwidth/6096000"/>

List of test files regressing from the same commit:
fdo75230-1.docx
fdo83227-3.docx
forum-mso-en-11007.docx
forum-mso-en-12264.docx
forum-mso-en-12822.docx
forum-mso-en-16347.docx
forum-mso-en-16497.docx
forum-mso-en-17960.docx
forum-mso-en-3360.docx
forum-mso-en-4455.docx
forum-mso-en-4463.docx
forum-mso-en-4464.docx
forum-mso-en4-598647.docx
forum-mso-en4-746483.docx
forum-mso-en4-771610.docx
forum-mso-en-5509.docx
forum-mso-en-5558.docx
forum-mso-en-6088.docx
forum-mso-en-970.docx
forum-mso-en-974.docx
ooo123731-1.docx
tdf91061-1.docx