Expand description
Everything from powerpoint_ooxml — reading and writing .pptx.
Structs§
- Auto
Shape - An autoshape or text box (
<p:sp>,CT_Shape). - Color
Scheme - A theme’s 12-color palette (
<a:clrScheme>,CT_ColorScheme) — mirrorsword_ooxml::ColorSchemeby name/shape (see that type’s own doc comment for the full rationale, including why every slot is a plain RGB hex string rather than modeling<a:sysClr>’s live system-color binding). - Connector
- A straight/elbow/curved connector line (
<p:cxnSp>,CT_Connector), typically used to visually link two other shapes. - Document
Properties - Document metadata (
docProps/core.xml’s Dublin Core fields plusdocProps/app.xml’sCompany/Manager/HyperlinkBase, anddocProps/custom.xml’s user-defined properties). A direct port ofexcel-ooxml::DocumentProperties’s own shape (same fields, same posture — see that type’s own doc comment for the full rationale); no PowerPoint-specific fields added, sincedocProps/app.xml’s schema (CT_Properties, extended-properties) is shared verbatim across every OOXML application, only differing in which app-specific statistics fields (Slideshere vs.Sheets/Wordselsewhere) each host actually sets — this crate already setsSlidesunconditionally inwriter.rs, independent of this type. - Embedded
Font - A TrueType/OpenType font embedded directly in the package (
<p:embeddedFont><p:font typeface="."/>{variants}</p:embeddedFont>,CT_EmbeddedFontListEntry). - Font
Scheme - A theme’s font scheme (
<a:fontScheme>,CT_FontScheme) — mirrorsword_ooxml::FontSchemeby name/shape (Latin typeface only, same scope limit). - Picture
- An embedded image (
<p:pic>,CT_Picture). - Placeholder
<p:nvPr><p:ph type=".." idx=".."/></p:nvPr>(CT_Placeholder) — a shape’s placeholder role: which slot of the slide layout/master it fills, so its position/formatting can be inherited from there instead of being set explicitly. This crate never resolves that inheritance (no slide layout/master model beyond a single fixed, empty one — seePresentation’s doc comment); recordingPlaceholderon a read-back shape is purely informational; nothing else in this crate consults it.- Presentation
- A
.pptxpresentation: an ordered list of slides, plus the slide size. - Shape
Connection - One end of a
Connector’s attachment to another shape (<a:stCxn>/<a:endCxn>,CT_Connection). - Shape
Group - A group of shapes moving/resizing together (
<p:grpSp>,CT_GroupShape). - Slide
- A single slide: an ordered list of shapes (
<p:spTree>’s children), plus optional speaker notes. - Slide
Chart - An embedded chart (
<p:graphicFrame>wrapping a<c:chart r:id="..">). - Slide
Comment - A slide comment (
ppt/comments/commentN.xml’s own<p:cm>,CT_Comment) — the legacy comment mechanism ECMA-376 itself defines (pre-2016 “modern threaded comments”, which PowerPoint now stores in a different, Microsoft-proprietary way this crate doesn’t model). - Slide
Media - An embedded video or audio clip (
<p:pic>carrying an<a:videoFile r:link=".">/<a:audioFile r:link=".">reference in its own<p:nvPr>, instead of the plain<a:blip>image an ordinaryPicturehas). - Slide
Table - An embedded table (
<p:graphicFrame>wrapping<a:tbl>,a:graphicData uri="../drawingml/2006/table") — DrawingML’s own table vocabulary, distinct fromword-ooxml::Table’s WordprocessingMLw:tbl(a different XML namespace/vocabulary entirely, despite the conceptual overlap — no code is shared between the two, same posture as every other cross-crate “same real-world concept, separate small copy” case in this workspace, e.g.PictureFormat). - Slide
Table Style - A custom table style (
<a:tblStyle styleId="." styleName=".">,CT_TableStyle). Package-wide (Presentation::table_styles), referenced by id fromSlideTable::style_id. - Table
Cell - One cell of a
TableRow(<a:tc>,CT_TableCell). - Table
Cell Properties - A
TableCell’s own property overrides (<a:tcPr>,CT_TableCellProperties). Not modeled:anchorCtr/horzOverflowattributes, the diagonal borders (<a:lnTlToBr>/<a:lnBlToTr>), and<a:cell3D>(bevel/lighting effects) — all secondary refinements on top of margins, vertical anchor, four straight borders, and background fill. Grounded against a real fixture, which confirmed the attribute set and thelnL/lnR/lnT/lnBthen fill-choice element order (CT_TableCellProperties’s own sequence). - Table
Row - One row of a
SlideTable(<a:tr h="..">,CT_TableRow). - Table
Style Part - One “table part” style (
CT_TableStyleTextStyle+CT_TableStyleCellStylecombined — real PowerPoint always writes both wrapped in the same<a:wholeTbl>/<a:band1H>/etc. element, so this crate models them as a single value rather than two separate optional fields) — seeSlideTableStyle’s own doc comment for scope. - Theme
- A presentation’s customizable color/font theme (
ppt/theme/theme1.xml’s own<a:clrScheme>/<a:fontScheme>).
Enums§
- Custom
Property Value - A single custom document property’s value — same 4 variants as
excel-ooxml::CustomPropertyValue/word_ooxml::CustomPropertyValue(CT_Property’s valuexsd:choicehas several more — vectors, blobs, currency, a date variant — not modeled here, same “simple case first” posture as those two sibling types). - Error
- Errors that can occur while reading or writing a
.pptxpresentation. - Media
Format - A video/audio clip’s encoding (
<a:videoFile>/<a:audioFile>’s referenced media part) — mirrorsPictureFormat’s own “closed enum, small known set” posture, covering the handful of container formats real PowerPoint itself natively embeds rather than every format a media player could theoretically open. - Picture
Format - An image’s encoding — mirrors
word-ooxml::ImageFormatby name and scope for cross-crate consistency (same real-world concept, each host crate keeps its own tiny copy rather than one depending on the other — there is no shared “media” crate, and this enum is far too small to justify creating one). - Placeholder
Kind - A useful subset of
ST_PlaceholderType’s values — the ones a shape (as opposed to a placeholder picture/chart/table, not modeled) can play.PlaceholderKind::Otherpreserves round-trip fidelity for any type not explicitly modeled here (chart/tbl/clipArt/dgm/media/sldImg/pic, all placeholder roles for a non-<p:sp>shape kind that this crate doesn’t tag with placeholder info on the writing side, but must still be able to read back without error), same “closed enum + escape hatch” posturedrawing::PresetShapealready established. - Shape
- A single item in a slide’s shape tree (
<p:spTree>’s children, in document order) — an enum covering every distinct shape kind PresentationML defines. - Slide
Hyperlink Target - A clickable hyperlink’s target (
<a:hlinkClick>,CT_Hyperlink): eitherSlideHyperlinkTarget::External, or a jump to another slide in the same presentation rather than an outside URL.<a:hlinkClick r:id=".">’sr:idresolves to a relationship — forSlideHyperlinkTarget::Externalthat relationship’s target is the URL itself (TargetMode="External"); forSlideHyperlinkTarget::Slideit instead targets another part inside the same package (TargetMode="Internal","./slides/slideN.xml"), paired withaction="ppaction://hlinksldjump". The four relative-jump variants need no relationship at all — they’re expressed purely viaaction="ppaction://hlinkshowjump?jump=."with nor:idattribute. Grounded against a real fixture for ther:id+hlinksldjumpshape (SlideHyperlinkTarget::Slide); the relative- jump actions have no fixture in this project’s corpus but are modeled directly from theppaction://hlinkshowjumpaction values ECMA-376 itself documents for “next slide”/“previous slide”/“first slide”/“last slide”.
Constants§
- DEFAULT_
NOTES_ HEIGHT_ EMU - DEFAULT_
NOTES_ WIDTH_ EMU - The default notes page size (4:3 portrait,
6858000 x 9144000EMU), same posture: not customizable, just written as a fixed, schema-complete value so a generated presentation always has a valid<p:notesSz>(mandatory perCT_Presentation), matching the real fixture’s own value. - DEFAULT_
SLIDE_ HEIGHT_ EMU - DEFAULT_
SLIDE_ WIDTH_ EMU - The default slide size this crate uses when a
Presentationdoesn’t override it: 16:9 widescreen,12192000 x 6858000EMU (13.333 x 7.5 inches) — real PowerPoint’s own current default. - EMU_
PER_ INCH - EMUs (English Metric Units) per inch — 914,400, the same conversion factor
word-ooxml/drawingalready use for every EMU-denominated field.