Read getters, hyperlink write, and inline-image readback#6
Open
hanthor wants to merge 9 commits into
Open
Conversation
- ParagraphRef::numbering() -> (num_id, level) + Document::numbering_is_bullet - RunRef::highlight() covering both w:highlight and shading-fill mechanisms - Relationships::add_external (TargetMode=External) in rdocx-opc - Document::append_hyperlink: external URL on the last paragraph All verified by to_bytes/from_bytes round-trip tests. Driven by the gtk-office-suite letters-core parity corpus (its red tests name these exact gaps). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Positional hyperlink readback: spans as (run_start, run_end, rel_id) with rel_id -> URL resolution, so consumers can map links onto runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…data Round-trip test embeds a PNG via add_picture and reads it back byte- identical. Driven by gtk-office-suite letters-core image fidelity work. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hanthor
added a commit
to tuna-os/gtk-office-suite
that referenced
this pull request
Jul 18, 2026
…data Publishing state: rdocx additions PRed upstream (tensorbee/rdocx#6); letters-core publish blocked on that release (crates.io forbids git deps) and on cargo login. Blog post is a draft for review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
hanthor
added a commit
to tuna-os/gtk-office-suite
that referenced
this pull request
Jul 18, 2026
…ables-core 0.1.0 letters-core/decks-core publishing blocked on the rdocx upstream release (tensorbee/rdocx#6) — crates.io forbids git dependencies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reads w:spacing/@w:line as a multiplier when @w:lineRule is auto (or unset) — the counterpart of the existing line_spacing_multiple setter. Exact/atLeast point spacing returns None. Round-trip test included. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ph::add_footnote_ref, RunRef::footnote_id footnotes.xml round-trips through the package: loaded on open via the FOOTNOTES relationship, written back with content-type and rel on save.
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.
Summary
Six additive commits extending the read and write surface, driven by real consumer needs in tuna-os/gtk-office-suite (a GNOME office suite using rdocx as its OOXML layer, with fidelity measured against a LibreOffice-based conformance corpus in CI):
Read getters (all round-trip tested via to_bytes/from_bytes):
ParagraphRef::numbering()→(num_id, level)+Document::numbering_is_bullet()— list readbackRunRef::highlight()— covers bothw:highlightand the shading-fill mechanism the existinghighlight()builder writesRunRef::is_underline()(excludesnone) andParagraphRef::is_page_break_before()RunRef::inline_image()→(rel_id, alt)+Document::image_data(rel_id)— byte-identical picture round-tripParagraphRef::hyperlink_spans()+Document::hyperlink_url()— positional link readbackWrite support:
Document::append_hyperlink(text, url)with properTargetMode="External"(newRelationships::add_externalin rdocx-opc)Document::last_paragraph_mut()for interleaving plain runs with hyperlinksEach addition has a round-trip test; the full workspace suite passes. Everything is additive — no signature changes to existing APIs (one exception: none;
RunRef::highlightis a new method, the builderRun::highlightis untouched).Downstream, these getters are exercised by ~120 external conformance tests (DOCX round-trip suite + a 104-scenario corpus where LibreOffice authors the documents), so they're validated against both our writer's output and Writer's.
🤖 Generated with Claude Code