cstkingkey / docx-rs

A Rust library for parsing and generating docx files.
MIT License
12 stars 12 forks source link

Error when parsing relativeFrom #10

Closed bavardage closed 5 months ago

bavardage commented 5 months ago

I have a docx file (which unfortunately I cannot share here)

Result::unwrap() on an Err value: Xml(FromStr("Unkown Value. Found page, Expected \"column\", \"row\", \"paragraph\","))

it appears as if the RelativeFrom enum (https://github.com/cstkingkey/docx-rs/blob/2a209e5006283c97d56f6f6bc9ed6753e74413b7/src/document/drawing.rs#L182) is missing some variants

I'm not sure what parts of this are code-gen'd from the spec/which version of the spec we're targeting, but it appears there are a few more valid variants of this attribute https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.drawing.wordprocessing.horizontalrelativepositionvalues?view=openxml-2.8.1