Skip to content

feat: [US-043] PPTX parser - SmartArt diagrams (basic)#9

Merged
developer0hye merged 2 commits into
mainfrom
ralph/phase4-polish
Feb 27, 2026
Merged

feat: [US-043] PPTX parser - SmartArt diagrams (basic)#9
developer0hye merged 2 commits into
mainfrom
ralph/phase4-polish

Conversation

@developer0hye

Copy link
Copy Markdown
Owner

Summary

  • Add SmartArt diagram support for PPTX presentations
  • Detect SmartArt elements via dgm:relIds in graphicFrame elements
  • Parse SmartArt data model XML to extract text from diagram nodes (type="node")
  • Render as simplified layout: bordered box with "SmartArt Diagram" header and bulleted list of text items
  • New smartart.rs parser module with parse_smartart_data_xml() and scan_smartart_refs()

Test plan

  • 8 unit tests for SmartArt data parsing (type filtering, multi-run text, empty text, ref scanning)
  • 3 PPTX integration tests (SmartArt produces elements with correct position, mixed with text box, no SmartArt slide)
  • 3 codegen tests (basic rendering, empty items, special char escaping)
  • cargo fmt --all -- --check passes
  • cargo clippy --workspace -- -D warnings passes
  • cargo test --workspace passes (459 tests)
  • cargo check --workspace passes

🤖 Generated with Claude Code

Add SmartArt diagram support for PPTX presentations:

- IR: SmartArt struct with text items, FixedElementKind::SmartArt variant
- Parser: smartart.rs module with parse_smartart_data_xml() for extracting
  text from diagram data model XML (dgm:pt type="node" elements) and
  scan_smartart_refs() for detecting SmartArt graphicFrames in slide XML
- Integration: parse_single_slide() scans for SmartArt references,
  resolves data files via slide .rels, and adds SmartArt elements
- Codegen: renders SmartArt as bordered box with "SmartArt Diagram"
  header and bulleted list of text items
- Tests: 8 unit tests (data parsing, ref scanning), 3 integration tests
  (PPTX with SmartArt), 3 codegen tests (rendering, empty, special chars)

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@developer0hye
developer0hye merged commit edbef0d into main Feb 27, 2026
12 checks passed
nikith-18161 added a commit to nikith-18161/office2pdf that referenced this pull request Jun 8, 2026
- Fix failing test: update Double border style expectation to 'solid'
- Fix cargo fmt violations across xlsx.rs, xlsx_cells.rs, xlsx_style.rs,
  typst_gen.rs
- Fix incorrect paper size table: Statement (code 6) = 5.5x8.5in,
  Executive (code 7) = 7.25x10.5in, remove developer0hye#9 Envelope (code 19)
  from Letter grouping
- Add zero-margins fallback: when pageMargins element is absent umya
  returns 0.0 for all sides; fall back to Excel defaults (0.75in
  top/bottom, 0.7in left/right)
- Fix numeric right-align heuristic: use cell.get_value_number()
  instead of parsing the formatted string, avoiding false positives
  on text like '0050' and missing currency/percentage values
- Revert get_formatted_value fallback to get_value: the fallback
  cannot fix the inlineStr case without an upstream fix and risks
  un-hiding intentionally hidden cells
- Add TODO for vertical-align default inconsistency

Signed-off-by: nikith-18161 <nikith.molaka@progentys.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