SetEmbeddedData()
OleObjectFrame::SetEmbeddedData(System::SharedPtr<IOleEmbeddedDataInfo>) method
Sets information about OLE embedded data.
void Aspose::Slides::OleObjectFrame::SetEmbeddedData(System::SharedPtr<IOleEmbeddedDataInfo> embeddedData) override
Arguments
Parameter | Type | Description |
---|---|---|
embeddedData | System::SharedPtr<IOleEmbeddedDataInfo> | Embedded data IOleEmbeddedDataInfo |
Remarks
This method changes the properties of the object to reflect the new data and sets the IsObjectLink flag to false, indicating that the OLE object is embedded.
System::SharedPtr<Presentation> pres = System::MakeObject<Presentation>(u"SomePresentation.pptx");
System::SharedPtr<OleObjectFrame> oof = System::AsCast<Aspose::Slides::OleObjectFrame>(pres->get_Slides()->idx_get(0)->get_Shapes()->idx_get(0));
if (oof != nullptr)
{
System::SharedPtr<IOleEmbeddedDataInfo> newData = System::MakeObject<OleEmbeddedDataInfo>(System::IO::File::ReadAllBytes(u"Picture.png"), u"png");
oof->SetEmbeddedData(newData);
}
See Also
- Typedef SharedPtr
- Class IOleEmbeddedDataInfo
- Class OleObjectFrame
- Namespace Aspose::Slides
- Library Aspose.Slides