InsertOleObjectFrame()

ShapeCollection::InsertOleObjectFrame(int32_t, float, float, float, float, System::SharedPtr<IOleEmbeddedDataInfo>) method

Creates a new OLE object and inserts it to a collection at the specified index.

System::SharedPtr<IOleObjectFrame> Aspose::Slides::ShapeCollection::InsertOleObjectFrame(int32_t index, float x, float y, float width, float height, System::SharedPtr<IOleEmbeddedDataInfo> dataInfo) override

Arguments

ParameterTypeDescription
indexint32_tThe zero-based index at which OLE object should be inserted.
xfloatX coordinate of a new OLE frame.
yfloatY coordinate of a new OLE frame.
widthfloatWidth of a new OLE frame.
heightfloatHeight of a new OLE frame.
dataInfoSystem::SharedPtr<IOleEmbeddedDataInfo>Embedded data info IOleEmbeddedDataInfo.

Return Value

Created OLE object.

Remarks

This example demonstrates inserting an OLE object at the second index:

ArrayPtr<uint8_t> fileData = IO::File::ReadAllBytes(u"test.zip");
auto dataInfo = MakeObject<OleEmbeddedDataInfo>(fileData, u"zip");
auto oleObjectFrame = slide->get_Shapes()->InsertOleObjectFrame(2, 150.0f, 20.0f, 50.0f, 50.0f, dataInfo);

ShapeCollection::InsertOleObjectFrame(int32_t, float, float, float, float, System::String, System::String) method

Creates a new OLE object and inserts it to a collection at the specified index.

System::SharedPtr<IOleObjectFrame> Aspose::Slides::ShapeCollection::InsertOleObjectFrame(int32_t index, float x, float y, float width, float height, System::String className, System::String path) override

Arguments

ParameterTypeDescription
indexint32_tThe zero-based index at which OLE object should be inserted.
xfloatX coordinate of a new OLE frame.
yfloatY coordinate of a new OLE frame.
widthfloatWidth of a new OLE frame.
heightfloatHeight of a new OLE frame.
classNameSystem::StringName of an OLE class.
pathSystem::StringPath to the linked file.

Return Value

Created OLE object.

See Also