ddn.odf.presentation
ODF presentation document body model.
Provides typed access to office:presentation content for creating and reading OpenDocument Presentation files (.odp).
Presentation constructs
Fully typed:
- Slides (
draw:page) with name, style, layout, and master-page - Slide transitions (type, duration, sound)
- Animation effects on shape elements
- Builder helpers:
slide(),slideTransition(),animationEffect(),withLayout(),withMasterPage() - All
ddn.odf.drawprimitives for slide content (shapes, frames, groups, connectors, text boxes)
Preservation-first (raw XML retained):
- Custom presentation effects beyond basic transitions
- Header and footer declarations
- Handout and notes master pages
- Extension elements from third-party office suites
enum PlaceholderKind
Types 5
structSlideTransition
Describes a slide transition effect.
Fields
string transitionTypestring transitionStylestring transitionSpeedstring durationstring soundFileMethods
structAnimationEffect
Describes an animation effect on a presentation element.
Preservation-first: unknown animation types are stored as raw XML.
Fields
string idstring effectstring directionstring startTimestring durationstring fillXmlElement[] unknownElementsMethods
enumPlaceholderKind
Describes a presentation placeholder type.
NONE
TITLE
OUTLINE
SUBTITLE
TEXT
NOTES
HANDOUT
HEADER
FOOTER
PAGE_NUMBER
DATE_TIME
CHART
IMAGE
OBJECT
TABLE
VERTICAL_TEXT
VERTICAL_OUTLINE
UNKNOWN
structPresentationSlide
A single presentation slide.
Extends the drawing page concept with presentation-specific metadata such as layout name, transition, duration, and placeholder info.
Fields
string namestring styleNamestring masterPageNamestring layoutNamestring idSlideTransition transitionPlaceholderKind placeholderDrawShape[] shapesDrawLayer[] layersAnimationEffect[] animationsXmlElement[] unknownElementsMethods
structOdfPresentationBody
Top-level model for office:presentation body content.
Methods
Functions 14
fn
PresentationSlide parsePresentationSlide(XmlElement pageElement)Parses a `draw:page` XML element into a `PresentationSlide`.fn
OdfPresentationBody parsePresentationBody(XmlElement presElement)Parses an `office:presentation` XML element into an `OdfPresentationBody`.fn
OdfPresentationBody emptyPresentationBody() @safe pure nothrowReturns an empty `OdfPresentationBody`.fn
string serializePresentationBody(const ref OdfPresentationBody body)Serialises an `OdfPresentationBody` to an XML fragment string.fn
PresentationSlide slide(string name, DrawShape[] shapes...)Constructs a `PresentationSlide` with the given name and shapes.fn
PresentationSlide withTransition(PresentationSlide s,
string transitionType, string transitionStyle, string transitionSpeed)Sets the transition on a presentation slide.fn
SlideTransition slideTransition(string transitionType,
string transitionStyle, string transitionSpeed, string duration = "")Constructs a `SlideTransition`.fn
AnimationEffect animationEffect(string effect, string direction = "",
string startTime = "", string duration = "")Constructs an `AnimationEffect`.fn
PresentationSlide withLayout(PresentationSlide s, string layoutName)Returns a copy of `s` with the layout name set.fn
PresentationSlide withMasterPage(PresentationSlide s,
string masterPageName)Returns a copy of `s` with the master page name set.fn
void serializeSlide(XmlElement parent, ref const PresentationSlide ps)