Introduction
ODP is the presentation of the OpenDocument Format (ODF), the open standard from OASIS that is also ISO/IEC 26300. It is the default format of LibreOffice Impress, and PowerPoint and Google Slides can open and save it. It is built the same way as the ODT text document.
.otp is a presentation template, and .fodp a flat, single
XML file version.
Structure
An ODP file is a ZIP archive whose first, uncompressed
entry is mimetype, containing
application/vnd.oasis.opendocument.presentation. The slides are in
content.xml, one draw:page element per slide, holding frames
of text, pictures and shapes; speaker notes sit in a
presentation:notes element inside each page. The master pages and styles
are in styles.xml, and pictures in the Pictures folder.
The package page covers the ZIP rules, manifest, encryption and signatures; the document structure page the XML files, namespaces, masters and metadata; and the slides page slides, presentation shapes, notes, slide show settings and animations. The shapes page covers every drawing shape, frames, 3D scenes and custom shapes; the styles page style families, master slides, slide backgrounds and every transition; the animation values page the values and timing syntax of the animation attributes; and the graphic, text and paragraph formatting pages every formatting attribute; the comments, events and DDE and forms pages the rest of the common content. Tables on slides have the tables and table formatting pages, and charts the charts and chart formatting pages. Not described here: the meaning of SMIL attributes beyond their value lists.
Not described
These pages follow the OpenDocument 1.3 specification, as the ODT pages do.
Known, not yet covered
- Reference: the meaning of SMIL attributes beyond their lists of values; SMIL 2.0 chapters 3 and 11 were not read.
- Viewer: the ODF viewer draws every slide
(and every page of a drawing,
.odg, and a flat.fodp) as a picture: the master page with its background, picture and the date, footer and number the slide asks for; rectangles, ellipses and arcs, lines, polylines, polygons, regular polygons, SVG paths, connectors, groups and thedraw:transformlist; custom shapes from their enhanced-geometry path (with equations, modifiers, mirroring and the text area); fills (solid, gradient, hatch, bitmap), strokes, dashes and markers; pictures; tables with their cell fills; and text with its paragraph and character formatting, lists and numbering. Beside the pictures it lists the text, notes, every shape, the animation tree and the transitions as tables, and an animation timeline that steps through the animations as the slide show plays them: for each click, each effect with its trigger (click, with previous, after previous), its preset, its target shape, when it begins, how long it lasts and what itsanim:set,anim:animateand related nodes change. It does not play an animation or a transition as moving pictures, and a begin time that refers to another node (id.end+1s) is shown as written, not worked out. Effects: the shadow of ODF (draw:shadow,draw:shadow-color,draw:shadow-offset-xand-y,draw:shadow-opacity) and the LibreOffice extensionsloext:shadow-blur,loext:glow-radius,loext:glow-color,loext:glow-transparencyandloext:softedge-radiusare drawn as SVG filters, and the extrusion of custom shapes (draw:extrusionwith its depth, skew and rotation) anddr3d:scenewithdr3d:cube,dr3d:sphere,dr3d:extrudeanddr3d:rotateare drawn as flat-shaded faces; every picture that uses one says Drawn approximately and names it. These were compared by eye with LibreOffice’s own PNG of its test files (shadow-blur.odp,glow.odg,softedges.odg,tdf141301_Extrusion_Skew.odg,tdf169675_3d_object_anim.odp) and of files made for this page; the glow followsCreateGlowAlphaMaskin LibreOffice'sdrawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx(outline grown by half the radius, Gaussian blur of sigma radius / 6), and the soft edge followssoftedgeprimitive2d.cxx(mask eroded by the radius, then blurred by it); the shadow blur is still tuned to the pictures. Not modelled: specular highlights, shadows cast on 3D objects, the second light and light levels of an extrusion, perspective of an extrusion, 3D textures, and the bevel and cube faces of Office Open XML presets. Compared with LibreOffice’s own PNG export these also differ: gradient geometry is approximate, text is laid out by the browser with the fonts it has, so line breaks can differ, fields other than the page number, page count, date, footer and header show the text the file saved, and an opacity gradient is drawn on shape fills only, not on pictures or text. - Viewer: parts of a page that are drawn as a labelled outline and listed under the
slide as Not drawn here: pictures in EMF, WMF or another format the viewer cannot show,
OLE objects and embedded objects other than charts (a chart object is drawn in its frame; a formula or spreadsheet object is a labelled box),
three-dimensional objects outside a scene, and preset custom shapes that the file names without giving a path (the viewer has a path for
about a dozen of them, and reads the path LibreOffice writes in
drawooo:enhanced-path, including its arc commandG). Preset shapes stop here: a path for every Office Open XML preset needspresetShapeDefinitions.xmlread at run time or a table of several hundred entries, which waits on the question of data tables the owner has not answered; this page says so and the viewer outlines such a shape.
Unknown
- Reference: where the specification contradicts itself, which the pages note: for example
the descriptions of
presentation:directionvalueshorizontalandpath, misspelt enhanced-path command names, and an inconsistent grammar foranim:formula.
Divergence from spec
The key programs are LibreOffice Impress and Apache OpenOffice Impress, which write ODP, and PowerPoint, which
imports and exports it. Where the standard and the programs differ, the viewer follows what LibreOffice Impress shows,
checked against its PDF export (soffice in headless mode) of small files made for each point.
- Master page background and objects.
presentation:background-visible(20.232) andpresentation:background-objects-visible(20.231) say whether a slide shows its master page’s background and the shapes on it, both true when absent. LibreOffice does exactly that: with the first false the slide has a white background, with the second false the master’s shapes are gone and its background stays. The viewer does the same. - Opacity gradients.
draw:opacity-name(20.153) names adraw:opacityelement (16.42.7) whosedraw:startanddraw:endare opacities and whose style, angle, border and centre work as in a colour gradient. LibreOffice’s PDF of a red rectangle with a linear and an axial opacity gradient fades as the standard describes. The viewer draws the fade as a mask of grey stops over the shape’s own box and draws the outline apart from the masked fill, so the outline stays solid as in LibreOffice’s PDF of a faded rectangle with a thick black outline (the standard does not say whether the outline fades). - Connectors.
draw:connector(10.3.10) drawssvg:dwhen the file has it. When it has none the path is implementation-dependent (19.229.2); the viewer computes a straight line, an elbow or a curve fromdraw:typebetween the two end points and says so under the slide. Glue points are not re-routed. - Bitmap fills.
style:repeat(20.341),draw:fill-image-widthand-height, the reference point (20.125 to 20.128) anddraw:tile-repeat-offset(20.175) make tiles, rows or columns shifted by the offset, or one picture placed at the reference point. A tile with no size takes the picture’s natural size, as LibreOffice does.draw:background-size="border"insets a slide background by the page margins. - Master page styles. A master page, its shapes and its drawing-page style live in the styles part of the file; they are now read from there, so master backgrounds (colour, gradient, bitmap) show.
- Dashes.
draw:distanceand the dot lengths may be lengths or percentages of the line width; both are read. - Embedded spreadsheets. A
draw:objectholding a spreadsheet is drawn as its cells in plain 10 pt text with no grid, cut off at the frame, as LibreOffice shows it, instead of a grey placeholder. - Default fill of unstyled frames. The standard gives
draw:fill(20.118) no default. LibreOffice, in a file with no styles at all, fills a frame with its built-in default style (green, #18a303, with a darker outline). The viewer draws no fill there; real files from LibreOffice always write their styles. - Slide show. The standard describes transitions and animations as they play; LibreOffice plays
them. The viewer plays the common ones only when the window option “Play transitions and animations (Slide show)”
is on (off by default): the picture then loops, with the slide change first (fade,
move-from-*androll-from-*, push/slide wipes, bar and box wipes, iris and ellipse wipes,open/close, zoom from the centre, stretch) and then each click step (one every 1.5 s) with its entrance or exit effect (appear, disappear, fade, dissolve, fly in or out from a side, zoom, grow, wipe), keyed to the shape byxml:idordraw:idinsmil:targetElement. The timing is the viewer’s (the standard’ssmil:duris used where the effect has one); text build-ups by paragraph and the slide change styles not listed (the others play as a fade) are not played, and the caption under the slide lists what was played and what was not. A picture of the slide shown as an image cannot take a click, so the show loops by itself instead of waiting for a click. Under each slide it says in words what the show would do: how the slide changes (presentation:transition-type,-style,-speed,presentation:duration, 20.237 to 20.240,smil:typeandsmil:subtype, 20.244 and 20.245, a sound in the page style, 10.8.2), the click steps in the order the timeline plays them, and the action of each shape (presentation:event-listener, 10.9.2). Custom shows (presentation:show, 10.9.3.8) and the slide show settings are listed in their own tables. When the file has a custom show, the window option “Show” lists it next to “All slides”; choosing one draws only its slides, in its order, with repeats (presentation:pages, 19.408), as the pictures under the notes and handouts follow the original slide numbers. - Notes pages and handouts. A slide with notes gets its notes page drawn under it: the page’s own
presentation:notes(16.19), or the notes template of its master page, with the slide as adraw:page-thumbnail(3.14); a frame with no place of its own takes it from the template’s frame of the same class. A presentation with astyle:handout-master(10.2.1) also gets handout pages with the slides in the thumbnail places in order. LibreOffice’s PDF of a small file with notes pages has the same layout; the handout pages were not compared with a program. - Presentation page layouts. A frame with no position of its own takes the place of the placeholder of its
class in the slide’s
style:presentation-page-layout(16.43, 16.44), else that of the master’s frame. LibreOffice uses neither: its PDF of such a frame shows a sliver of text at the left edge. The viewer follows the standard’s description of the layout; real files from LibreOffice and PowerPoint write the place on the frame. - Shapes with no path. LibreOffice names some shapes (
smiley,sun,round-calloutand others) without writing their outline. The viewer draws those from the matching preset of ECMA-376 Part 1 (presetShapeDefinitions.xml, the same data the PowerPoint viewer uses) with default adjust values, and says so under the slide. - Compared with LibreOffice by pixels. 41 slides from LibreOffice, odfpy and hand-made files were drawn by LibreOffice (PDF) and by the viewer and compared on a 320 pixel wide grid: mean agreement 97.4 percent at the last full run, at full size, 27 slides at 97 or better and one under 90 (it was 95.3 before the text colour, pie and legend fixes, and 88 before connectors, master styles, dashes, the outline split, tiles, arc commands, turned extrusions, curved arrows, F and S per sub-path and picture frames for plugins were fixed), 22 slides at 97 or better, 13 between 90 and 97, 6 below 90. What is below 90 is listed in the next paragraph.
- Arcs and ellipses in
draw:enhanced-path. The arc commands follow Table 10 of ODF 1.3 section 19.145 and were checked against LibreOffice:AandWdraw a line to the arc start,BandVmove there;AandBrun counter-clockwise,WandVclockwise;TandUangles run clockwise on the screen.F(no fill) andS(no stroke) apply to the sub-path set (up to the nextN) they stand in; a shape whose sets differ is drawn as one element per set, as LibreOffice draws it. - Plugin frames. A
draw:frameholding adraw:plugin(a video or sound) also holds adraw:image, the picture to show in its place; the viewer draws that picture (video-snapshot.odp, 83 to 99). - Text that does not fit. Text longer than its shape is drawn past the shape’s edge, as LibreOffice does, not cut off.
- Picture fills. With no
draw:fill-image-ref-point, LibreOffice puts the middle of a tile on the middle of the area, and a page background picture with nostyle:repeatis tiled; the viewer does the same. - 3D extrusion.
draw:extrusion-rotation-angleturns the solid (first about y, then about x) and the viewer draws it with flat-shaded faces, in perspective whendraw:extrusion-projectionanddraw:extrusion-viewpointask for it, and with the first and second light (draw:extrusion-first-light-direction,draw:extrusion-light-face,draw:extrusion-brightness). Specular light,draw:extrusion-metal, harsh and soft light levels and diffusion are not drawn, and a shape whose viewpoint is far off-centre (extrusion.fodp shape D) is drawn by the viewer but not by LibreOffice. The shading is not LibreOffice’s (it is lighter at both edges of a cylinder). - Connectors with no
svg:d. ODF 10.3.10 leaves the path of such a connector to the implementation. The viewer ends it on the glue points of the shapes named bydraw:start-shapeanddraw:end-shape(the four default points of 10.3.16: 0 top, 1 right, 2 bottom, 3 left) and routes thestandard,linesandlinetypes as LibreOffice does (right angles, 5 mm clear of the shape); the path equals LibreOffice’s own in connectors.fodp. Thecurvetype uses the same route and rounds it as LibreOffice does (measured on itssvg:d: the curve runs from the first point to the last through the middle of every segment, and each corner is one cubic whose control points are the halfway points between the corner and the neighbouring knots); the five curves of connectors-curve.fodp and connectors.fodp equal LibreOffice’s own. Custom glue points,draw:escape-direction, an end that sits behind its start and two ends on one face are not routed. - Emphasis effects and motion paths in the Slide show. Spin, grow/shrink, pulse, transparency, fill colour change and
anim:animateMotionwithsvg:pathare played (slide-effects.fodp). The file follows LibreOffice’s conventions, which the spec does not state: a scale value is a factor (1.5,1.5), motion path numbers are fractions of the slide’s width and height, and a preset name is only a label. A fill colour change draws a coloured copy over the shape, so its text is covered. A font colour change is played too, at once with the effect (not as a timed change of the text colour). - Clicks and sounds. An SVG picture takes no clicks and plays no sound, so the viewer hands the file’s interaction to the markdown view,
which puts a click layer over each slide picture. A click on a shape with a
presentation:event-listener(10.9.2, 19.391) does its action:previous-page,next-page,first-page,last-page,show(a slide of this file by name; the page scrolls to its picture) orsound. Interactive sequences (shape triggers) use the same layer.presentation:soundandanim:audiofiles are played from the package (a blob made from the file; a browser only lets a page play sound after a click or key press, so nothing plays by itself): a click on a shape plays its sound, a click elsewhere on the slide plays the slide’s sounds in turn.executeandverb(they would start another program) are never run and are listed;hideand the fade actions are not acted on. A sound that is only a link is not fetched. Audio in the animation timeline plays at the click, not at its place in the timeline (samples/odp/interactive.odp, click-test.html). - Automatic text colour. Text with no colour of its own is drawn white on a dark solid fill and black otherwise, as LibreOffice does.
The rule is LibreOffice's
Color::IsDark()intools/source/generic/color.cxx: the fill is decoded from sRGB, its luminance is (0.2126 R + 0.7152 G + 0.0722 B) x 255 cut to a whole number (GetWCAGLuminance), and the text is white when that is 87 or less. The one exception is the default shape blue #729fcf, which is judged by the older weighting (76 R + 151 G + 29 B) / 256 against 62. The 87 matches the earlier measurement with soffice (white up to about #9c9c9c, black from #a0a0a0; auto-colour.fodp, auto-colour2.fodp). - Curved arrows. The shape types
mso-spt102tomso-spt105have two sub-paths and LibreOffice fills the second at about 70 percent of the fill colour; ODF has no command for this, so the viewer applies it by type and says so under the slide. - Text that must fit.
style:shrink-to-fit(20.360) shrinks anddraw:fit-to-size(20.130) stretches the text to the shape. In the browser the viewer measures the text with a canvas (the style’s first font, word by word) and says so under the slide; where there is no canvas (Node, tests) it falls back to an estimate of half an em per character and says that instead. Where a custom shape has nofo:wrap-option, LibreOffice does not wrap its text; the viewer does. - Notes and handouts. The notes template and the handout master live in styles.xml and are read with those styles.
Known differences found by that comparison: LibreOffice’s puzzle, flower and bevel shape names have no preset to draw from
(the standard says draw:type must not decide geometry, and no outline data for them is held); LibreOffice’s built-in default
style for unstyled shapes in a file with no styles (green fill #18a303, darker green outline #127a02 1.06 mm wide, white text; values read from the SVG that LibreOffice’s own export writes for
samples/odt/slides.fodp, not from its PDF, whose colours are colour-managed) is drawn by default for slides (the standard does not define it; the key program does), and the window option
“Shapes without a style as LibreOffice draws them” at the top of the window turns it off, which leaves such shapes without fill and with a hairline (slides 1 scored 75 and slides 2 56 with it off);
lo-fillbitmap2 slide 1 differs in tile phase (83); text in the viewer wraps differently, because the browser lays text out in its own font with its own
line breaks while LibreOffice lays out with its own metrics and autofit scaling (the lowest slides, such as slides 2 at 56
and cols at 85, are text-heavy; in cols the text now overflows its boxes as in LibreOffice, and the remaining difference is line
spacing); lo-rotate_flip was explained and fixed: ODF 19.192/19.193 do not say how a mirror combines with draw:transform;
LibreOffice rotates first and then mirrors in the page frame about the shape’s centre (checked against the points in its SVG
export), and the viewer does the same; the chart in chart-in-slide-pie: the file states no slice outline
(the series styles say draw:stroke="none") and no legend box, yet LibreOffice draws black hairlines and a boxed legend, so the
viewer draws what the file says. The pie and its legend follow LibreOffice’s defaults (chart:angle-offset is the start angle counted anticlockwise from 3 o’clock, measured with offsets 0 and 90; a file with no attribute starts at 12 o’clock like 90; slices run anticlockwise; the legend sits at the right,
vertically centred; the slide scores 99); a shape with no draw:shadow-offset-x or -y is shadowed 0.3 cm as LibreOffice writes it, and a proportional fo:line-height (a percentage) is taken of the font’s own line height (about 1.15 times the size), not of the size as in CSS, which matches
cols.odp; a frame holding a
chart or picture gets no default fill or line; the animations and transitions are played only for the common ones (see Slide show above), and
custom shows are applied through the Show option; a few slides with tiled or 3D content still differ in detail.
Sources
- OpenDocument 1.3 part 3: Schema – presentation, draw and animation chapters, 16.42.7 (
draw:opacity), 20.153, 20.231 and 20.232.
Links
Software
- LibreOffice Impress – free office suite’s presentation program, which uses ODP by default (Windows, macOS, Linux)
- Microsoft PowerPoint – Microsoft’s presentation program, which opens and saves ODP (Windows, macOS, web)
- Google Slides – online presentation program that imports and exports ODP (web browsers)
- Apache OpenOffice Impress – the older free office suite’s presentation program (Windows, macOS, Linux)
Developers
- odfpy – library that reads and writes OpenDocument files (Python)
Reference
- OASIS Open Document Format for Office Applications (OpenDocument) TC – the committee that maintains ODF, with the current specification
- OpenDocument 1.3 part 2: Packages – the ZIP package, manifest, encryption and signatures (OASIS, 2021)
- OpenDocument 1.3 part 3: OpenDocument Schema – every element and attribute of the XML (OASIS, 2021)