EmbeddedObject Class
Inline Embedded Object.When the object is serialized out as xml, its qualified name is w:object.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Wordprocessing.EmbeddedObject
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
<ChildElementInfoAttribute(GetType(Rectangle))> _
<ChildElementInfoAttribute(GetType(Group))> _
<ChildElementInfoAttribute(GetType(ImageFile))> _
<ChildElementInfoAttribute(GetType(Line))> _
<ChildElementInfoAttribute(GetType(Oval))> _
<ChildElementInfoAttribute(GetType(PolyLine))> _
<ChildElementInfoAttribute(GetType(Shapetype))> _
<ChildElementInfoAttribute(GetType(RoundRectangle))> _
<ChildElementInfoAttribute(GetType(Shape))> _
<ChildElementInfoAttribute(GetType(Curve))> _
<ChildElementInfoAttribute(GetType(Control))> _
<ChildElementInfoAttribute(GetType(Arc))> _
<ChildElementInfoAttribute(GetType(OleObject))> _
Public Class EmbeddedObject _
Inherits OpenXmlCompositeElement
'Usage
Dim instance As EmbeddedObject
[ChildElementInfoAttribute(typeof(Rectangle))]
[ChildElementInfoAttribute(typeof(Group))]
[ChildElementInfoAttribute(typeof(ImageFile))]
[ChildElementInfoAttribute(typeof(Line))]
[ChildElementInfoAttribute(typeof(Oval))]
[ChildElementInfoAttribute(typeof(PolyLine))]
[ChildElementInfoAttribute(typeof(Shapetype))]
[ChildElementInfoAttribute(typeof(RoundRectangle))]
[ChildElementInfoAttribute(typeof(Shape))]
[ChildElementInfoAttribute(typeof(Curve))]
[ChildElementInfoAttribute(typeof(Control))]
[ChildElementInfoAttribute(typeof(Arc))]
[ChildElementInfoAttribute(typeof(OleObject))]
public class EmbeddedObject : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
DocumentFormat.OpenXml.Vml.Group <v:group>
DocumentFormat.OpenXml.Vml.ImageFile <v:image>
DocumentFormat.OpenXml.Vml.Line <v:line>
DocumentFormat.OpenXml.Vml.Oval <v:oval>
DocumentFormat.OpenXml.Vml.PolyLine <v:polyline>
DocumentFormat.OpenXml.Vml.Rectangle <v:rect>
DocumentFormat.OpenXml.Vml.RoundRectangle <v:roundrect>
DocumentFormat.OpenXml.Vml.Shape <v:shape>
DocumentFormat.OpenXml.Vml.Shapetype <v:shapetype>
DocumentFormat.OpenXml.Vml.Arc <v:arc>
DocumentFormat.OpenXml.Vml.Curve <v:curve>
DocumentFormat.OpenXml.Vml.Office.OleObject <o:OLEObject>
Control <w:control>
[ISO/IEC 29500-1 1st Edition]
17.3.3.19 object (Embedded Object)
This element specifies that an embedded object is located at this position in the run’s contents. The layout properties of this embedded object, as well as an optional static representation, are specified using the drawing element (§17.3.3.9).
[Example: Consider a run which consists of an embedded object which is in line with the text in that paragraph (i.e. on the line and affects the line height). That run would be specified using the following WordprocessingML:
<w:r> <w:object> <w:drawing> … </w:drawing> </w:object> </w:r>
The object element indicates that an embedded object and its positioning data are located at the current position in the run (e.g. an embedded object). end example]
Parent Elements |
---|
r (§22.1.2.87); r (§17.3.2.25) |
Child Elements |
Subclause |
---|---|
control (Embedded Control) |
§17.3.3.3 |
drawing (DrawingML Object) |
§17.3.3.9 |
movie (Embedded Video) |
§17.3.3.17 |
objectEmbed (Embedded Object Properties) |
§17.3.3.20 |
objectLink (Linked Object Properties) |
§17.3.3.21 |
Attributes |
Description |
---|---|
dxaOrig (Original Image Width) |
Specifies the original (natural) width of the image representation of the current control within the document. Some vector image formats do not store a native size within their format, and this attribute shall only be used in those cases to store this information, so that the image can be appropriately restored as needed. If this element is excluded, then the natural size of the image as stored in its format shall be used. [Example: Consider the following WordprocessingML for an embedded object: <w:object w:dxaOrig="3360" w:dyaOrig="2520"> … </w:object> The dxaOrig attribute has a value of 3360, which specifies that the image used for the embedded object doesn't store its native width, but that width should be 3360 twentieths of a point. end example] The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14). |
dyaOrig (Original Image Height) |
Specifies the original (natural) height of the image representation of the current control within the document. Some vector image formats do not store a native size within their format, and this attribute shall only be used in those cases to store this information, so that the image can be appropriately restored as needed. If this element is excluded, then the natural size of the image as stored in its format shall be used. [Example: Consider the following WordprocessingML for an embedded object: <w:object w:dxaOrig="3360" w:dyaOrig="2520"> … </w:object> The dyaOrig attribute has a value of 2520, which specifies that the image used for the embedded object doesn't store its native height, but that height should be 2520 twentieths of a point. end example] The possible values for this attribute are defined by the ST_TwipsMeasure simple type (§22.9.2.14). |
[Note: The W3C XML Schema definition of this element’s content model (CT_Object) is located in §A.1. end note]
© ISO/IEC29500: 2008.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.