Skip to content

feat(ooxml): edit and save a pptx - #876

Merged
andiwand merged 1 commit into
mainfrom
feat/pptx-edit
Sep 10, 2026
Merged

feat(ooxml): edit and save a pptx#876
andiwand merged 1 commit into
mainfrom
feat/pptx-edit

Conversation

@andiwand

@andiwand andiwand commented Sep 10, 2026

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

Last of five; #875 is merged, so this now sits on main.

What this one does

A .pptx was the one document format that could be read and not written. It
already kept its slide dom resident and already had text_set_content; what it
lacked was save, the two flags and a capability row.

save re-serialises the slide parts and copies the rest of the package through
as bytes, so a part we never parsed survives untouched. The slides are held by
the r:id the slide-id list names them by, so the document keeps the other
direction as well — path to r:id — to know which part it is writing.

Every text operation lands here too, over a:p and a:r: across runs, across
paragraphs, Enter, Backspace at a paragraph start. The dom half is
xml::TreeEditor, the same code odf and ooxml text run; only the tag names
differ, and drawingml states them with the a: prefix rather than w:, which
is now the one argument write_text_nodes takes.

FileTypeCapabilities for pptx now states edit and save, so
saving_an_unsavable_format_leaves_no_file moves to .doc — which throws its
source away as it parses and so has nothing to write back.

Verified

Headless LibreOffice renders both the run edit and the paragraph split out of
the saved deck.

After this lands

The reference output pin advance for the whole stack: 275 files, attributes
only — the visible text of every one is byte-identical, checked — plus
resources/document.js.

@andiwand
andiwand force-pushed the feat/text-edit-browser branch from 22f260f to 9ac0584 Compare September 10, 2026 12:56
@andiwand
andiwand force-pushed the feat/text-edit-browser branch from 9ac0584 to 5ec412a Compare September 10, 2026 13:52
Base automatically changed from feat/text-edit-browser to main September 10, 2026 13:56
A `.pptx` was the one document format that could be read and not written.
It already kept its slide dom resident and already had `text_set_content`;
what it lacked was `save`, the two flags and a capability row.

`save` re-serialises the slide parts and copies the rest of the package
through as bytes, so a part we never parsed survives untouched. The slides
are held by the `r:id` the slide-id list names them by, so the document
keeps the other direction as well - path to `r:id` - to know which part it
is writing.

Every text operation lands here too, over `a:p` and `a:r`. The dom half is
`xml::TreeEditor`, the same code odf and ooxml text run; only the tag
names differ, and drawingml states them with the `a:` prefix rather than
`w:`, which is now the one argument `write_text_nodes` takes.

`saving_an_unsavable_format_leaves_no_file` moves to `.doc`, which throws
its source away as it parses and so has nothing to write back. Verified
with headless LibreOffice: it renders both the run edit and the paragraph
split out of the saved deck.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KKFKbUVCYF2VhujdmjhhPW
@andiwand
andiwand merged commit f35348a into main Sep 10, 2026
23 checks passed
@andiwand
andiwand deleted the feat/pptx-edit branch September 10, 2026 14:01
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