Bug 168337 - ODF: missing attribute draw:escape-direction of draw:glue-point
Summary: ODF: missing attribute draw:escape-direction of draw:glue-point
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-09 23:13 UTC by Regina Henschel
Modified: 2025-09-10 22:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example with user defined glue-point (14.17 KB, application/vnd.oasis.opendocument.presentation)
2025-09-09 23:13 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2025-09-09 23:13:10 UTC
Created attachment 202766 [details]
Example with user defined glue-point

Open the attached file. It contains a circle and a rectangle with a user defined glue-point in the center. The circle has the draw:escape-direction "up", for the rectangle no escape-direction was set.

Validate the file with https://odfvalidator.org/
The validator complains about a missing attribute "escape-direction". The complain is correct because the attribute is not optional and LibreOffice has indeed not written the attribute.
https://docs.oasis-open.org/office/OpenDocument/v1.4/cs01/schemas/OpenDocument-v1.4-schema.rng. (Search for "draw:escape:direction")

The attribute corresponds to the API enum drawing:EscapeDirection. If the user does not set a direction, this is the enum value drawing::EscapeDirection_SMART. In case of value SMART, LibreOffice does not write the attribute draw:escape-direction. But LibreOffice needs to write the attribue with value "auto" in this case.

The error is in https://opengrok.libreoffice.org/xref/core/xmloff/source/draw/shapeexport.cxx?r=9b79ae1161af42d7a54e34a1dbcf78831acab86d#1315

I propose this as easy-hack. The code part is easy. A unit test can go to core/xmloff/qa/unit/draw.cxx. That file has already some examples, where you can see how to use assertXPath. Some knowledge about XML is useful.