Skip to content

Support paragraph borders in the reader#897

Open
developer0hye wants to merge 3 commits into
bokuweb:mainfrom
developer0hye:fix/read-paragraph-borders
Open

Support paragraph borders in the reader#897
developer0hye wants to merge 3 commits into
bokuweb:mainfrom
developer0hye:fix/read-paragraph-borders

Conversation

@developer0hye

@developer0hye developer0hye commented Jul 16, 2026

Copy link
Copy Markdown

What does this change?

This change makes the reader preserve paragraph borders from w:pBdr.

Previously, ParagraphBorders could be written but w:pBdr was not recognized while reading, so direct paragraph borders were silently dropped. The new reader handles top, left, bottom, right, between, and bar borders and preserves w:val, w:sz, w:space, and w:color.

References

Screenshots

Not applicable.

What can I check for bug fixes?

Parse a paragraph containing w:pBdr and verify that ParagraphProperty.borders contains the corresponding border positions and attributes.

Verification:

  • cargo test -p docx-rs test_read_paragraph_borders
  • cargo test -p docx-rs --lib -- --test-threads=1 (280 passed)
  • cargo test -p docx-rs --test lib read_comment_in_delete_in_insert
  • cargo test -p docx-rs --test reader read_comment_in_delete_in_insert
  • rustfmt --check on the changed Rust files
  • git diff --check

The two shared-fixture snapshots now include the paragraph borders already present in the source DOCX. The repository-wide make lint and cargo fmt --all --check still report pre-existing warnings and formatting differences outside these files.

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
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