wordcraft/crates/docx/tests
Valentin Klein baeb8d9c6c
Open and save Word XML Document (Flat OPC); open Word 2003 XML (#548) (#560)
- docx: Flat OPC (`pkg:package`) read by unpacking the parts into an
  in-memory package for the DOCX reader; written from the DOCX writer's
  parts (XML inline, binary parts in base64). Part count, part size,
  total size and base64 length are capped.
- docx: Word 2003 XML (`w:wordDocument`) imported by rewriting it as the
  corresponding package (hyphenated names, w:hlink, w:listPr, w:lists,
  inline headers/footers, notes, aml annotations, w:binData pictures,
  o:DocumentProperties) and reading that with the DOCX reader.
- `.xml` told apart by root element; other XML is refused with
  "not a Word XML document". File > Export gets "Word XML Document (*.xml)"
  (all 9 catalogs); .xml saves keep the document like .docx.
- Tests: Flat OPC round trip equals DOCX round trip, hand-written Flat OPC
  package, Word 2003 import, hostile inputs, engine io.

Fixes #548

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-11 21:59:00 -04:00
..
bidi.rs Right-to-left tables and sections (#362) (#365) 2026-10-11 14:00:53 -04:00
char_units.rs Chinese documents: character-unit indents, .doc indents and line spacing, floating tables, blank pages (#534) (#550) 2026-10-11 21:49:25 -04:00
citations.rs Zotero integration: cite while you write, with a Zotero tab (#189) 2026-10-10 08:35:59 -04:00
content_controls.rs Content controls: keep, show and edit w:sdt (#381) (#392) 2026-10-11 16:36:53 -04:00
fixtures.rs DOCX: theme colours and theme fonts take precedence over the fixed values, as in Word (#626) 2026-10-11 21:53:05 -04:00
malformed.rs Zotero integration: cite while you write, with a Zotero tab (#189) 2026-10-10 08:35:59 -04:00
roundtrip.rs Open and save Word XML Document (Flat OPC); open Word 2003 XML (#548) (#560) 2026-10-11 21:59:00 -04:00
section_text_direction.rs Vertical text for sections (w:textDirection) (#491) (#496) 2026-10-11 19:45:49 -04:00
text_boxes.rs WordArt text effects and transforms, and shape connectors (#416) (#481) 2026-10-11 16:51:01 -04:00
word_xml.rs Open and save Word XML Document (Flat OPC); open Word 2003 XML (#548) (#560) 2026-10-11 21:59:00 -04:00