Repository navigation
Conversation
First slice of .odp support: file.open sniffs an OpenDocument package and imports pages as slides with text frames (fonts, bold/italic/underline, colour, lists), rectangles, ellipses, preset custom shapes, lines, pictures, groups (flattened), rotation and speaker notes. Styles resolve through parent chains and default styles; page size comes from styles.xml. Masters, tables, charts and animations are not imported yet, and saving still writes .pptx. Co-authored-by: Cursor <cursoragent@cursor.com>
FredApps
left a comment
There was a problem hiding this comment.
ReviewerA — source-read COMMENT (not an approval)
I read the head of the diff: OpenDocument .odp presentations can be imported. The engine sniffs the bytes (sniff_odp), imports through a new odp module in the PPTX crate and repairs the result with the common repair step, like other formats. An ODP is a ZIP of XML parts, so the importer is a parser for untrusted archives: entry counts, decompressed sizes and XML depth need bounds, external entities must not be resolved, and media inside must be bounded as for PPTX. ODF is an open standard, so the specification is the oracle. A sniff that decides by bytes, not by extension, is right. I did not read the importer. I have not run it, and no exact-head CI result exists for this head. Nothing was run.
I ran nothing and have no exact-head CI result for this PR, so this is not an approval. Where a diff was long I read its code hunks rather than every generated or documentation line.
Status: waiting_author.
Summary
crates/pptx/src/odp.rs:file.opendetects an OpenDocument presentation (mimetype) and imports it, then runs the usual repair passdraw:transformrotation/translation, speaker notesTest plan
crates/pptx/tests/odp.rsbuilds an .odp in memory: checks slide count, page aspect, rich text, filled rotated ellipse, picture, notescargo xtask cipasses