feat(ooxml): edit and save a pptx - #876
Merged
Merged
Conversation
andiwand
force-pushed
the
feat/text-edit-browser
branch
from
September 10, 2026 12:56
22f260f to
9ac0584
Compare
andiwand
force-pushed
the
feat/pptx-edit
branch
from
September 10, 2026 12:56
7a9f6ec to
4af77c9
Compare
andiwand
force-pushed
the
feat/text-edit-browser
branch
from
September 10, 2026 13:52
9ac0584 to
5ec412a
Compare
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
force-pushed
the
feat/pptx-edit
branch
from
September 10, 2026 13:59
4af77c9 to
1b1e6b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Last of five; #875 is merged, so this now sits on main.
What this one does
A
.pptxwas the one document format that could be read and not written. Italready kept its slide dom resident and already had
text_set_content; what itlacked was
save, the two flags and a capability row.savere-serialises the slide parts and copies the rest of the package throughas bytes, so a part we never parsed survives untouched. The slides are held by
the
r:idthe slide-id list names them by, so the document keeps the otherdirection as well — path to
r:id— to know which part it is writing.Every text operation lands here too, over
a:panda:r: across runs, acrossparagraphs, Enter, Backspace at a paragraph start. The dom half is
xml::TreeEditor, the same code odf and ooxml text run; only the tag namesdiffer, and drawingml states them with the
a:prefix rather thanw:, whichis now the one argument
write_text_nodestakes.FileTypeCapabilitiesforpptxnow stateseditandsave, sosaving_an_unsavable_format_leaves_no_filemoves to.doc— which throws itssource 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.