OleObjectFrame

Inheritance: java.lang.Object, com.aspose.slides.Shape, com.aspose.slides.GraphicalObject

All Implemented Interfaces: com.aspose.slides.IOleObjectFrame

public class OleObjectFrame extends GraphicalObject implements IOleObjectFrame

Represents an OLE object on a slide.

Methods

Method Description
getSubstitutePictureFormat() Returns OleObject image fill properties object.
getSubstitutePictureTitle() Returns or sets the title for OleObject icon.
setSubstitutePictureTitle(String value) Returns or sets the title for OleObject icon.
getObjectName() Returns or sets the name of an object.
setObjectName(String value) Returns or sets the name of an object.
getObjectProgId() Returns the ProgID of an object.
setObjectProgId(String value) Returns the ProgID of an object.
getLinkFileName() Returns the full path to a linked file.
getLinkPathLong() Returns the full path to a linked file.
setLinkPathLong(String value) Returns the full path to a linked file.
getEmbeddedFileLabel() Returns the file name of embedded OLE object
getEmbeddedFileName() Returns the path of embedded OLE object
getEmbeddedData() Gets or sets information about OLE embedded data.
setEmbeddedData(IOleEmbeddedDataInfo embeddedData) Sets information about OLE embedded data.
isObjectIcon() Determines whether an object is visible as icon.
setObjectIcon(boolean value) Determines whether an object is visible as icon.
isObjectLink() Determines whether an object is linked to external file.
getUpdateAutomatic() Determines if the linked embedded object is automatically updated when the presentation is opened or printed.
setUpdateAutomatic(boolean value) Determines if the linked embedded object is automatically updated when the presentation is opened or printed.

getSubstitutePictureFormat()

public final IPictureFillFormat getSubstitutePictureFormat()

Returns OleObject image fill properties object. Read-only IPictureFillFormat.

Returns: IPictureFillFormat

getSubstitutePictureTitle()

public final String getSubstitutePictureTitle()

Returns or sets the title for OleObject icon. Read/write String.


When IsObjectIcon == false this value is ignored. The string can be truncated according to the size of the Ole icon.

Returns: java.lang.String

setSubstitutePictureTitle(String value)

public final void setSubstitutePictureTitle(String value)

Returns or sets the title for OleObject icon. Read/write String.


When IsObjectIcon == false this value is ignored. The string can be truncated according to the size of the Ole icon.

Parameters:

Parameter Type Description
value java.lang.String

getObjectName()

public final String getObjectName()

Returns or sets the name of an object. Read/write String.

Returns: java.lang.String

setObjectName(String value)

public final void setObjectName(String value)

Returns or sets the name of an object. Read/write String.

Parameters:

Parameter Type Description
value java.lang.String

getObjectProgId()

public final String getObjectProgId()

Returns the ProgID of an object. Read only String.

Returns: java.lang.String

setObjectProgId(String value)

public final void setObjectProgId(String value)

Returns the ProgID of an object. Read only String.

Parameters:

Parameter Type Description
value java.lang.String

getLinkFileName()

public final String getLinkFileName()

Returns the full path to a linked file. Short file name will be used. Read-only String.

Returns: java.lang.String

getLinkPathLong()

public final String getLinkPathLong()

Returns the full path to a linked file. Long file name will be used. Read/write String.

Returns: java.lang.String

setLinkPathLong(String value)

public final void setLinkPathLong(String value)

Returns the full path to a linked file. Long file name will be used. Read/write String.

Parameters:

Parameter Type Description
value java.lang.String

getEmbeddedFileLabel()

public final String getEmbeddedFileLabel()

Returns the file name of embedded OLE object

Returns: java.lang.String

getEmbeddedFileName()

public final String getEmbeddedFileName()

Returns the path of embedded OLE object

Returns: java.lang.String

getEmbeddedData()

public final IOleEmbeddedDataInfo getEmbeddedData()

Gets or sets information about OLE embedded data. Read/write IOleEmbeddedDataInfo.

Returns: IOleEmbeddedDataInfo

setEmbeddedData(IOleEmbeddedDataInfo embeddedData)

public final void setEmbeddedData(IOleEmbeddedDataInfo embeddedData)

Sets information about OLE embedded data.


Presentation pres = new Presentation("SomePresentation.pptx");
 try {
     OleObjectFrame oof = (OleObjectFrame) pres.getSlides().get_Item(0).getShapes().get_Item(0);
     if (oof != null)
     {
         IOleEmbeddedDataInfo newData = new OleEmbeddedDataInfo(Files.readAllBytes(Paths.get("Picture.png")), "png");
         oof.setEmbeddedData(newData);
     }
 } catch (IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

Parameter Type Description
embeddedData IOleEmbeddedDataInfo Embedded data IOleEmbeddedDataInfo

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. |

isObjectIcon()

public final boolean isObjectIcon()

Determines whether an object is visible as icon. Read/write ``` boolean ```.

Returns: boolean

setObjectIcon(boolean value)

public final void setObjectIcon(boolean value)

Determines whether an object is visible as icon. Read/write ``` boolean ```.

Parameters:

Parameter Type Description
value boolean
public final boolean isObjectLink()

Determines whether an object is linked to external file. Read-only ``` boolean ```.

Returns: boolean

getUpdateAutomatic()

public final boolean getUpdateAutomatic()

Determines if the linked embedded object is automatically updated when the presentation is opened or printed. Read/write ``` boolean ```.

Returns: boolean

setUpdateAutomatic(boolean value)

public final void setUpdateAutomatic(boolean value)

Determines if the linked embedded object is automatically updated when the presentation is opened or printed. Read/write ``` boolean ```.

Parameters:

Parameter Type Description
value boolean