Embeddings in a PresentationML Document

When an embedding is present in a PresentationML document, it shall be stored as follows:

  • In the slide, the embedding is stored as a graphic frame using the <graphicFrame> element in PresentationML.

  • The <graphicData> element for the frame shall have the appropriate URI for its contents: http://schemas.openxmlformats.org/presentationml/2006/ole. Its child element shall be the PresentationML <oleObj> element, which stores an explicit relationship to the associated Embedded Package or Embedded Object part, the ProgID for that embedded object, and (optionally) the shape ID for the associated VML shape.

  • The Slide part shall also have an implicit relationship to a VML Drawing part that (optionally) contains the image data to be used in place of loading the actual object data.

For example, if we embed the Equation.3 object in a PresentationML document, the following markup would be stored in the shape tree of the appropriate Slide part:

<p:graphicFrame><a:graphic>
  C:\Documents and Settings\tristand\Local Settings\Temp\Temporary Directory 4 for embeddedObject.pptx.zip\ppt\slides\slide1.xml  <a:graphicData 
      uri="http://schemas.openxmlformats.org/presentationml/2006/ole">
      <p:oleObj spid="_x0000_s1026" name="Equation" r:id="rId3" 
        imgW="320" imgH="272" progId="Equation.3">
        <p:embed />
      </p:oleObj>
    </a:graphicData>
  </a:graphic>
</p:graphicFrame>

If we examine this markup, it can be seen that:

  • The @uri attribute on the <graphicData> element is http://schemas.openxmlformats.org/presentationml/2006/ole, which dictates that this is an embedded object

  • It contains an <oleObj> element that specifies that the properties of the embedded object. Its attributes specify that the object is of type Equation.3 and that the explicit relationship to the embedded object is rId3.

  • The slide may also contain an implicit relationship to a Legacy Drawing part. If we examine the legacy drawing part's contents, the shape with ID _x0000_s1026 (if present) defines the alternate image:

<v:shape id="_x0000_s1026" type="#_x0000_t75" style='position:absolute;
  left:282pt;top:24pt;width:152pt;height:129.25pt'>
  <v:imagedata o:relid="rId1" o:title=""/>
</v:shape>