Skip to main content

Module powerpoint

Module powerpoint 

Source
Expand description

Everything from powerpoint_ooxml — reading and writing .pptx.

Structs§

AutoShape
An autoshape or text box (<p:sp>, CT_Shape).
ColorScheme
A theme’s 12-color palette (<a:clrScheme>, CT_ColorScheme) — mirrors word_ooxml::ColorScheme by 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.
DocumentProperties
Document metadata (docProps/core.xml’s Dublin Core fields plus docProps/app.xml’s Company/Manager/HyperlinkBase, and docProps/custom.xml’s user-defined properties). A direct port of excel-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, since docProps/app.xml’s schema (CT_Properties, extended-properties) is shared verbatim across every OOXML application, only differing in which app-specific statistics fields (Slides here vs. Sheets/Words elsewhere) each host actually sets — this crate already sets Slides unconditionally in writer.rs, independent of this type.
EmbeddedFont
A TrueType/OpenType font embedded directly in the package (<p:embeddedFont><p:font typeface="."/>{variants}</p:embeddedFont>, CT_EmbeddedFontListEntry).
FontScheme
A theme’s font scheme (<a:fontScheme>, CT_FontScheme) — mirrors word_ooxml::FontScheme by 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 — see Presentation’s doc comment); recording Placeholder on a read-back shape is purely informational; nothing else in this crate consults it.
Presentation
A .pptx presentation: an ordered list of slides, plus the slide size.
ShapeConnection
One end of a Connector’s attachment to another shape (<a:stCxn>/<a:endCxn>, CT_Connection).
ShapeGroup
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.
SlideChart
An embedded chart (<p:graphicFrame> wrapping a <c:chart r:id="..">).
SlideComment
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).
SlideMedia
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 ordinary Picture has).
SlideTable
An embedded table (<p:graphicFrame> wrapping <a:tbl>, a:graphicData uri="../drawingml/2006/table") — DrawingML’s own table vocabulary, distinct from word-ooxml::Table’s WordprocessingML w: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).
SlideTableStyle
A custom table style (<a:tblStyle styleId="." styleName=".">, CT_TableStyle). Package-wide (Presentation::table_styles), referenced by id from SlideTable::style_id.
TableCell
One cell of a TableRow (<a:tc>, CT_TableCell).
TableCellProperties
A TableCell’s own property overrides (<a:tcPr>, CT_TableCellProperties). Not modeled: anchorCtr/horzOverflow attributes, 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 the lnL/lnR/lnT/lnB then fill-choice element order (CT_TableCellProperties’s own sequence).
TableRow
One row of a SlideTable (<a:tr h="..">, CT_TableRow).
TableStylePart
One “table part” style (CT_TableStyleTextStyle + CT_TableStyleCellStyle combined — 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) — see SlideTableStyle’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§

CustomPropertyValue
A single custom document property’s value — same 4 variants as excel-ooxml::CustomPropertyValue/word_ooxml::CustomPropertyValue (CT_Property’s value xsd:choice has 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 .pptx presentation.
MediaFormat
A video/audio clip’s encoding (<a:videoFile>/<a:audioFile>’s referenced media part) — mirrors PictureFormat’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.
PictureFormat
An image’s encoding — mirrors word-ooxml::ImageFormat by 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).
PlaceholderKind
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::Other preserves 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” posture drawing::PresetShape already 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.
SlideHyperlinkTarget
A clickable hyperlink’s target (<a:hlinkClick>, CT_Hyperlink): either SlideHyperlinkTarget::External, or a jump to another slide in the same presentation rather than an outside URL. <a:hlinkClick r:id=".">’s r:id resolves to a relationship — for SlideHyperlinkTarget::External that relationship’s target is the URL itself (TargetMode="External"); for SlideHyperlinkTarget::Slide it instead targets another part inside the same package (TargetMode="Internal", "./slides/slideN.xml"), paired with action="ppaction://hlinksldjump". The four relative-jump variants need no relationship at all — they’re expressed purely via action="ppaction://hlinkshowjump?jump=." with no r:id attribute. Grounded against a real fixture for the r:id+hlinksldjump shape (SlideHyperlinkTarget::Slide); the relative- jump actions have no fixture in this project’s corpus but are modeled directly from the ppaction://hlinkshowjump action 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 9144000 EMU), same posture: not customizable, just written as a fixed, schema-complete value so a generated presentation always has a valid <p:notesSz> (mandatory per CT_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 Presentation doesn’t override it: 16:9 widescreen, 12192000 x 6858000 EMU (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/drawing already use for every EMU-denominated field.

Type Aliases§

Result
A Result alias using [Error] as the error type.