Skip to content

refactor(xml): move insert_in_sequence into xml_util - #941

Merged
andiwand merged 2 commits into
mainfrom
refactor/xml-insert-in-sequence
Sep 28, 2026
Merged

andiwand merged 2 commits into
mainfrom
refactor/xml-insert-in-sequence

Conversation

@andiwand

@andiwand andiwand commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Change

  • insert_in_sequence moves from ooxml_util to xml_util, beside set_attribute. The odf and ooxml writers now share one copy.
  • The odf style writer's properties_of had its own copy of the same ordered insert, because the odf code cannot reach ooxml_util. It now calls xml::insert_in_sequence. Both copies rank a child the sequence does not name last, so the order does not change.
  • The pptx write_run_properties had its own copy of set_attribute in a lambda. It now calls xml::set_attribute (second commit).
  • xml/AGENTS.md and ooxml/AGENTS.md say where the helpers now live.

Proof

  • The full suite passes (1895 tests).
  • The full HTML output, public and private, is byte-identical to the pinned reference output.
  • The six changed files compile clean with -Wall -Wextra -Werror.

andiwand and others added 2 commits September 28, 2026 21:56
The odf style writer ordered the properties of a style with its own copy
of `insert_in_sequence`, which only the ooxml writers could reach. The
helper now sits in `xml_util` beside `set_attribute`, so the odf and the
ooxml writers share one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tigcf9he3w1aHfNPJoEGsd
`write_run_properties` in the pptx writer had its own copy of
`set_attribute`, so its lambda now calls the shared one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tigcf9he3w1aHfNPJoEGsd
@andiwand
andiwand merged commit b248513 into main Sep 28, 2026
27 checks passed
@andiwand
andiwand deleted the refactor/xml-insert-in-sequence branch September 28, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant