IOleObjectFrame

All Implemented Interfaces: com.aspose.slides.IGraphicalObject

public interface IOleObjectFrame extends IGraphicalObject

Represents an OLE object on a slide.

Methods

MethodDescription
getSubstitutePictureFormat()Returns OleObject image fill properties object.
getObjectName()Returns or sets the name of an object.
setObjectName(String value)Returns or sets the name of an object.
getEmbeddedData()Gets information about OLE embedded data.
setEmbeddedData(IOleEmbeddedDataInfo embeddedData)Sets information about OLE embedded data.
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.
getLinkPathRelative()Returns the relative path to a linked file if present, otherwise returns an empty string.
getEmbeddedFileLabel()Returns the file name of embedded OLE object
getEmbeddedFileName()Returns the path of embedded OLE object
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.
getSubstitutePictureTitle()Returns or sets the title for OleObject icon.
setSubstitutePictureTitle(String value)Returns or sets the title for OleObject icon.

getSubstitutePictureFormat()

public abstract IPictureFillFormat getSubstitutePictureFormat()

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

Returns: IPictureFillFormat

getObjectName()

public abstract String getObjectName()

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

Returns: java.lang.String

setObjectName(String value)

public abstract void setObjectName(String value)

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

Parameters:

ParameterTypeDescription
valuejava.lang.String

getEmbeddedData()

public abstract IOleEmbeddedDataInfo getEmbeddedData()

Gets information about OLE embedded data. Read only IOleEmbeddedDataInfo.

Returns: IOleEmbeddedDataInfo

setEmbeddedData(IOleEmbeddedDataInfo embeddedData)

public abstract void setEmbeddedData(IOleEmbeddedDataInfo embeddedData)

Sets information about OLE embedded data.


Following example demonstrates how to change OLE embedded data
 and its type for existing [IOleObjectFrame](../../com.aspose.slides/ioleobjectframe) object 
 
 Presentation pres = new Presentation("SomePresentation.pptx");
 try {
     OleObjectFrame oof = (OleObjectFrame) pres.getSlides().get_Item(0).getShapes().get_Item(0);
     if (oof != null)
     {
         BufferedInputStream bis = null;
         DataInputStream dis = null;
         try {
             File file = new File("Picture.png");
             byte[] bytes = new byte[(int) file.length()];
             bis = new BufferedInputStream(new FileInputStream(file));
             dis = new DataInputStream(bis);
             dis.readFully(bytes);
             IOleEmbeddedDataInfo newData = new OleEmbeddedDataInfo(bytes, "png");
             oof.setEmbeddedData(newData);
         } finally {
             if (dis != null) {
                 dis.close();
             if (bis != null)
                 bis.close();
             }
         }
     }
 } catch (IOException e) {
 } finally {
     if (pres != null) pres.dispose();
 }

Parameters:

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

getObjectProgId()

public abstract String getObjectProgId()

Returns the ProgID of an object. Read olny String.

Returns: java.lang.String

setObjectProgId(String value)

public abstract void setObjectProgId(String value)

Returns the ProgID of an object. Read olny String.

Parameters:

ParameterTypeDescription
valuejava.lang.String

getLinkFileName()

public abstract 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 abstract 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 abstract void setLinkPathLong(String value)

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

Parameters:

ParameterTypeDescription
valuejava.lang.String

getLinkPathRelative()

public abstract String getLinkPathRelative()

Returns the relative path to a linked file if present, otherwise returns an empty string. Readonly String.


Presentation presentation = new Presentation("demo.ppt");
 try {
     IOleObjectFrame oleFrame = (IOleObjectFrame)presentation.getSlides().get_Item(0).getShapes().get_Item(0);
     if (oleFrame != null)
     {
         System.out.println("The relative path: " + oleFrame.getLinkPathRelative());
     }
 } finally {
     if (presentation != null) presentation.dispose();
 }

In the Ppt presentations, some Ole object links may have a relative representation.

Returns: java.lang.String

getEmbeddedFileLabel()

public abstract String getEmbeddedFileLabel()

Returns the file name of embedded OLE object

Returns: java.lang.String

getEmbeddedFileName()

public abstract String getEmbeddedFileName()

Returns the path of embedded OLE object

Returns: java.lang.String

isObjectIcon()

public abstract boolean isObjectIcon()

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

Returns: boolean

setObjectIcon(boolean value)

public abstract void setObjectIcon(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean
public abstract boolean isObjectLink()

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

Returns: boolean

getUpdateAutomatic()

public abstract 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 abstract void setUpdateAutomatic(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

getSubstitutePictureTitle()

public abstract 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 abstract 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:

ParameterTypeDescription
valuejava.lang.String