Add is_page_break_before() to ParagraphRef and is_underline() to RunRef#4
Open
hanthor wants to merge 1 commit into
Open
Add is_page_break_before() to ParagraphRef and is_underline() to RunRef#4hanthor wants to merge 1 commit into
hanthor wants to merge 1 commit into
Conversation
These read-side methods were missing from ParagraphRef and RunRef, making it impossible to detect page breaks and underline formatting when reading DOCX files programmatically. - ParagraphRef::is_page_break_before() reads CT_PPr.page_break_before - RunRef::is_underline() reads CT_RPr.underline Use case: GTK4 word processor importing DOCX files with preserved layout and formatting.
hanthor
added a commit
to tuna-os/gtk-office-suite
that referenced
this pull request
Jun 24, 2026
- Cargo.toml uses path dep to local rdocx fork - docx_bridge.rs now uses run.is_underline() for import - docx_bridge.rs now uses p.is_page_break_before() for import - Both previously blocked on rdocx 0.1.2 API gaps - PR submitted upstream: tensorbee/rdocx#4
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
Adds two missing read-side methods to rdocx 0.1.2:
These are needed by gtk-office-suite (a GTK4 word processor) to import DOCX files with preserved layout and formatting.
Changes
crates/rdocx/src/paragraph.rs: Addedis_page_break_before()to ParagraphRefcrates/rdocx/src/run.rs: Addedis_underline()to RunRefTesting
cargo check -p rdocxpasses