Files
wordcraft/crates/docx/src
Daniele MoriandClaude Opus 5.5 53296879db Floating objects are drawn in their stacking order (relativeHeight)
Word stacks floating objects by wp:anchor/@relativeHeight, not by the
order of their anchors in the paragraph. The reader ignored the
attribute, so a panel anchored after the text boxes it frames, but
lower in the stack, was drawn over them and hid their text.

- wordcraft-doc: Float gets a `z` (0 = none, drawn in document order).
- wordcraft-docx: it is read from relativeHeight and written back as
  read; an object without one gets the next order above, as before.
- wordcraft-layout: place_objects collects each object's items with
  its order and emits them lowest first (stable, so objects without an
  order keep the paragraph's).

Four round-trip tests compare whole floats after a save; saving now
gives objects without an order one, so those tests compare without it
(`unstacked`). The order itself is covered by its own round-trip test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 15:44:38 +02:00
..