Package io.keikai.model.impl
Class OleObjectImpl
java.lang.Object
io.keikai.model.impl.OleObjectImpl
- All Implemented Interfaces:
SOleObject,Serializable
Default implementation of
SOleObject.- Since:
- 7.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOleObjectImpl(String progId, int shapeId, ViewAnchor anchor, byte[] embeddedData, byte[] previewImage, String linkPath, boolean linked, boolean displayAsIcon) Constructs an OLE object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the anchor that positions this OLE object on the sheet.byte[]Returns the raw binary data of the embedded document.Returns the file path for linked OLE objects.byte[]Returns the preview image data (typically EMF or WMF format) used to display the OLE object when the source application is not available.Returns the programmatic identifier of the OLE object, e.g., "Word.Document.12", "Excel.Sheet.12", "Equation.3".intReturns the shape ID associated with this OLE object in the drawing layer.booleanReturns whether this OLE object is displayed as an icon rather than showing the document preview.booleanisLinked()Returns whether this OLE object is linked (rather than embedded).
-
Constructor Details
-
OleObjectImpl
public OleObjectImpl(String progId, int shapeId, ViewAnchor anchor, byte[] embeddedData, byte[] previewImage, String linkPath, boolean linked, boolean displayAsIcon) Constructs an OLE object.- Parameters:
progId- the programmatic identifier (e.g., "Word.Document.12")shapeId- the shape ID in the drawing layeranchor- the position anchor on the sheetembeddedData- the embedded document bytes (null for linked objects)previewImage- the preview image bytes (EMF/WMF)linkPath- the link path (null for embedded objects)linked- true if linked, false if embeddeddisplayAsIcon- true if displayed as an icon
-
-
Method Details
-
getProgId
Description copied from interface:SOleObjectReturns the programmatic identifier of the OLE object, e.g., "Word.Document.12", "Excel.Sheet.12", "Equation.3".- Specified by:
getProgIdin interfaceSOleObject- Returns:
- the ProgID string, or null if not available
-
getShapeId
public int getShapeId()Description copied from interface:SOleObjectReturns the shape ID associated with this OLE object in the drawing layer.- Specified by:
getShapeIdin interfaceSOleObject- Returns:
- the shape ID
-
getAnchor
Description copied from interface:SOleObjectReturns the anchor that positions this OLE object on the sheet.- Specified by:
getAnchorin interfaceSOleObject- Returns:
- the view anchor
-
getEmbeddedData
public byte[] getEmbeddedData()Description copied from interface:SOleObjectReturns the raw binary data of the embedded document. For linked objects, this returns null.- Specified by:
getEmbeddedDatain interfaceSOleObject- Returns:
- the embedded document bytes, or null if linked
-
getPreviewImage
public byte[] getPreviewImage()Description copied from interface:SOleObjectReturns the preview image data (typically EMF or WMF format) used to display the OLE object when the source application is not available.- Specified by:
getPreviewImagein interfaceSOleObject- Returns:
- the preview image bytes, or null if not available
-
getLinkPath
Description copied from interface:SOleObjectReturns the file path for linked OLE objects. For embedded objects, this returns null.- Specified by:
getLinkPathin interfaceSOleObject- Returns:
- the link path, or null if embedded
-
isLinked
public boolean isLinked()Description copied from interface:SOleObjectReturns whether this OLE object is linked (rather than embedded).- Specified by:
isLinkedin interfaceSOleObject- Returns:
- true if linked, false if embedded
-
isDisplayAsIcon
public boolean isDisplayAsIcon()Description copied from interface:SOleObjectReturns whether this OLE object is displayed as an icon rather than showing the document preview.- Specified by:
isDisplayAsIconin interfaceSOleObject- Returns:
- true if displayed as icon
-