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.draw primitives 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

Types 5

Describes a slide transition effect.

Fields
string transitionType
string transitionStyle
string transitionSpeed
string duration
string soundFile
Methods
bool isEmpty() const @safe pure nothrowReturns `true` when no transition properties are set.

Describes an animation effect on a presentation element.

Preservation-first: unknown animation types are stored as raw XML.

Fields
string id
string effect
string direction
string startTime
string duration
string fill
XmlElement[] unknownElements
Methods
bool isEmpty() const @safe pure nothrowReturns `true` when this animation has no effect properties.

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

A single presentation slide.

Extends the drawing page concept with presentation-specific metadata such as layout name, transition, duration, and placeholder info.

Fields
string name
string styleName
string masterPageName
string layoutName
string id
SlideTransition transition
PlaceholderKind placeholder
DrawShape[] shapes
DrawLayer[] layers
AnimationEffect[] animations
XmlElement[] unknownElements
Methods
size_t shapeCount() const @safe pure nothrowReturns the number of top-level shapes on this slide.
bool isEmpty() const @safe pure nothrowReturns `true` when the slide has no shapes.

Top-level model for office:presentation body content.

Fields
XmlElement[] unknownElements
Methods
size_t length() const @safe pure nothrowReturns the number of slides.
bool isEmpty() const @safe pure nothrowReturns `true` when the body has no slides.
const(PresentationSlide) * findSlide(string name) const @trusted nothrowFinds a slide by name.

Functions 14

fnPresentationSlide parsePresentationSlide(XmlElement pageElement)Parses a `draw:page` XML element into a `PresentationSlide`.
fnOdfPresentationBody parsePresentationBody(XmlElement presElement)Parses an `office:presentation` XML element into an `OdfPresentationBody`.
fnOdfPresentationBody emptyPresentationBody() @safe pure nothrowReturns an empty `OdfPresentationBody`.
fnstring serializePresentationBody(const ref OdfPresentationBody body)Serialises an `OdfPresentationBody` to an XML fragment string.
fnPresentationSlide slide(string name, DrawShape[] shapes...)Constructs a `PresentationSlide` with the given name and shapes.
fnPresentationSlide withTransition(PresentationSlide s, string transitionType, string transitionStyle, string transitionSpeed)Sets the transition on a presentation slide.
fnSlideTransition slideTransition(string transitionType, string transitionStyle, string transitionSpeed, string duration = "")Constructs a `SlideTransition`.
fnAnimationEffect animationEffect(string effect, string direction = "", string startTime = "", string duration = "")Constructs an `AnimationEffect`.
fnPresentationSlide withLayout(PresentationSlide s, string layoutName)Returns a copy of `s` with the layout name set.
fnPresentationSlide withMasterPage(PresentationSlide s, string masterPageName)Returns a copy of `s` with the master page name set.
fnstring getPresAttr(XmlElement el, string qName) @trusted nothrow
fnPlaceholderKind parsePlaceholderKind(string s) @safe pure nothrow
fnstring placeholderKindString(PlaceholderKind k) @safe pure nothrow
fnvoid serializeSlide(XmlElement parent, ref const PresentationSlide ps)