• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class OleShape

Represents an embedded or linked OLE object in a document.

Inheritance
object
AbstractShape
OleShape
Implements
IDrawingObject
Inherited Members
AbstractShape.Id
AbstractShape.Name
AbstractShape.Size
AbstractShape.ParentGroup
AbstractShape.GetGeometryPaths()
AbstractShape.AnchorPosition
AbstractShape.RelativePosition
AbstractShape.Position
AbstractShape.ShapeType
AbstractShape.FlipH
AbstractShape.FlipV
AbstractShape.PrintObject
AbstractShape.Locked
AbstractShape.Locks
AbstractShape.EnableLocks()
AbstractShape.Hidden
AbstractShape.ZOrderPosition
AbstractShape.LockText
AbstractShape.AlternateText
AbstractShape.Tags
AbstractShape.Fill
AbstractShape.Line
AbstractShape.Effects
AbstractShape.GlowFormat
AbstractShape.Glow
AbstractShape.ReflectionFormat
AbstractShape.Reflection
AbstractShape.ShadowFormat
AbstractShape.SoftEdgeFormat
AbstractShape.SoftEdge
AbstractShape.HyperLink
AbstractShape.Action
AbstractShape.RotationAngle
AbstractShape.SetImage(string)
AbstractShape.SetImageBytes(byte[], string)
AbstractShape.SetImage(string, string)
AbstractShape.WithAdjustments(params long[])
AbstractShape.Adjustments
AbstractShape.PolygonPoints
AbstractShape.OleObject
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Document.Drawing
Assembly: DRIT.Document.dll
Syntax
public class OleShape : AbstractShape, IDrawingObject

Constructors

OleShape()

Initializes a new OLE shape.

Declaration
public OleShape()

Properties

DisplayName

Gets or sets the display name shown for this OLE object.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
string

ProgId

Gets or sets the ProgId of the OLE object (e.g. "Excel.Sheet.12", "Package").

Declaration
public string ProgId { get; set; }
Property Value
Type Description
string

Methods

ClearEmbeddedContent()

Clears the embedded OLE binary payload so that no embedding part is written on the next save. The preview image (if any) is not affected.

Declaration
public void ClearEmbeddedContent()

GetEmbeddedBytes()

Returns the embedded OLE bytes, or null if none have been set.

Declaration
public byte[] GetEmbeddedBytes()
Returns
Type Description
byte[]

GetPreviewBytes()

Returns the preview image bytes, or null if none have been set.

Declaration
public byte[] GetPreviewBytes()
Returns
Type Description
byte[]

SetEmbeddedContent(byte[], string)

Embeds the OLE content from the supplied byte array.

Declaration
public void SetEmbeddedContent(byte[] bytes, string extension)
Parameters
Type Name Description
byte[] bytes

Raw OLE compound document bytes.

string extension

File extension including leading dot (e.g. ".xlsx", ".bin").

SetPreviewImage(byte[], string)

Sets the preview/thumbnail image shown while the OLE object is inactive.

Declaration
public void SetPreviewImage(byte[] bytes, string extension)
Parameters
Type Name Description
byte[] bytes

Image bytes (PNG or JPEG recommended).

string extension

File extension including leading dot (e.g. ".png", ".jpg").

Implements

IDrawingObject
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX