public class OleFormat
extends java.lang.Object
Use the Shape.getOleFormat() property to access the data of an OLE object. You do not create instances of the OleFormat class directly.
Shape.getOleFormat()| Modifier and Type | Method and Description |
|---|---|
boolean |
getAutoUpdate()
Specifies whether the link to the OLE object is automatically updated or not in Microsoft Word.
|
java.util.UUID |
getClsid()
Gets the CLSID of the OLE object.
|
java.lang.String |
getIconCaption()
Gets icon caption of OLE object.
|
OleControl |
getOleControl()
Gets
getOleControl() objects if this OLE object is an ActiveX control. |
byte[] |
getOleEntry(java.lang.String oleEntryName) |
boolean |
getOleIcon()
Gets the draw aspect of the OLE object.
|
OlePackage |
getOlePackage()
Provide access to
OlePackage if OLE object is an OLE Package. |
java.lang.String |
getProgId()
Gets the ProgID of the OLE object.
|
byte[] |
getRawData()
Gets OLE object raw data.
|
java.lang.String |
getSourceFullName()
Gets the path and name of the source file for the linked OLE object.
|
java.lang.String |
getSourceItem()
Gets a string that is used to identify the portion of the source file that is being linked.
|
java.lang.String |
getSuggestedExtension()
Gets the file extension suggested for the current embedded object if you want to save it into a file.
|
java.lang.String |
getSuggestedFileName()
Gets the file name suggested for the current embedded object if you want to save it into a file.
|
boolean |
isLink()
Returns true if the OLE object is linked (when
getSourceFullName() / setSourceFullName(java.lang.String) is specified). |
boolean |
isLocked()
Specifies whether the link to the OLE object is locked from updates.
|
void |
isLocked(boolean value)
Specifies whether the link to the OLE object is locked from updates.
|
void |
save(java.io.OutputStream stream) |
void |
save(java.lang.String fileName)
Saves the data of the embedded object into a file with the specified name.
|
void |
setAutoUpdate(boolean value)
Specifies whether the link to the OLE object is automatically updated or not in Microsoft Word.
|
void |
setProgId(java.lang.String value)
Sets the ProgID of the OLE object.
|
void |
setSourceFullName(java.lang.String value)
Sets the path and name of the source file for the linked OLE object.
|
void |
setSourceItem(java.lang.String value)
Sets a string that is used to identify the portion of the source file that is being linked.
|
public void save(java.io.OutputStream stream)
throws java.lang.Exception
java.lang.Exceptionpublic void save(java.lang.String fileName)
throws java.lang.Exception
fileName - Name of the file to save the OLE object data.java.lang.IllegalStateException - Throws if you attempt to save a linked object.java.lang.Exceptionpublic java.lang.String getIconCaption()
throws java.lang.Exception
In case of OLE object is not embedded as icon or caption couldn't be retrieved returns empty string.
java.lang.Exceptionpublic java.lang.String getSuggestedExtension()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getSuggestedFileName()
throws java.lang.Exception
java.lang.Exceptionpublic byte[] getOleEntry(java.lang.String oleEntryName)
public byte[] getRawData()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getProgId()
The ProgID property is not always present in Microsoft Word documents and cannot be relied upon.
Cannot be null.
The default value is an empty string.
public void setProgId(java.lang.String value)
The ProgID property is not always present in Microsoft Word documents and cannot be relied upon.
Cannot be null.
The default value is an empty string.
value - The ProgID of the OLE object.public boolean isLink()
throws java.lang.Exception
getSourceFullName() / setSourceFullName(java.lang.String) is specified).getSourceFullName() / setSourceFullName(java.lang.String) is specified).java.lang.Exceptionpublic java.lang.String getSourceFullName()
throws java.lang.Exception
The default value is an empty string.
If getSourceFullName() / setSourceFullName(java.lang.String) is not an empty string, the OLE object is linked.
java.lang.Exceptionpublic void setSourceFullName(java.lang.String value)
The default value is an empty string.
If getSourceFullName() / setSourceFullName(java.lang.String) is not an empty string, the OLE object is linked.
value - The path and name of the source file for the linked OLE object.public java.lang.String getSourceItem()
The default value is an empty string.
For example, if the source file is a Microsoft Excel workbook, the getSourceItem() / setSourceItem(java.lang.String) property might return "Workbook1!R3C1:R4C2" if the OLE object contains only a few cells from the worksheet.
public void setSourceItem(java.lang.String value)
The default value is an empty string.
For example, if the source file is a Microsoft Excel workbook, the getSourceItem() / setSourceItem(java.lang.String) property might return "Workbook1!R3C1:R4C2" if the OLE object contains only a few cells from the worksheet.
value - A string that is used to identify the portion of the source file that is being linked.public boolean getAutoUpdate()
The default value is false.
boolean value.public void setAutoUpdate(boolean value)
The default value is false.
value - The corresponding boolean value.public boolean getOleIcon()
Aspose.Words does not allow to set this property to avoid confusion. If you were able to change the draw aspect in Aspose.Words, Microsoft Word would still display the OLE object in its original draw aspect until you edit or update the OLE object in Microsoft Word.
public boolean isLocked()
The default value is false.
boolean value.public void isLocked(boolean value)
The default value is false.
value - The corresponding boolean value.public java.util.UUID getClsid()
public OlePackage getOlePackage() throws java.lang.Exception
OlePackage if OLE object is an OLE Package. Returns null otherwise.
OLE Package is a legacy technology that allows to wrap any file format not present in the OLE registry of a Windows system into a generic package allowing to embed almost anything into a document. See OlePackage type for more info.OlePackage value.java.lang.Exceptionpublic OleControl getOleControl() throws java.lang.Exception
getOleControl() objects if this OLE object is an ActiveX control. Otherwise this property is null.getOleControl() objects if this OLE object is an ActiveX control.java.lang.Exception