Class HSLFObjectShape

All Implemented Interfaces:
IAdjustableShape, ObjectShape<HSLFShape,HSLFTextParagraph>, PictureShape<HSLFShape,HSLFTextParagraph>, PlaceableShape<HSLFShape,HSLFTextParagraph>, Shape<HSLFShape,HSLFTextParagraph>, SimpleShape<HSLFShape,HSLFTextParagraph>

public final class HSLFObjectShape extends HSLFPictureShape implements ObjectShape<HSLFShape,HSLFTextParagraph>
A shape representing embedded OLE object.
  • Constructor Details

  • Method Details

    • getObjectID

      public int getObjectID()
      Returns unique identifier for the OLE object.
      Returns:
      the unique identifier for the OLE object
    • setObjectID

      public void setObjectID(int objectId)
      Set the unique identifier for the OLE object and register it in the necessary structures
      Parameters:
      objectId - the unique identifier for the OLE object
    • getObjectData

      public HSLFObjectData getObjectData()
      Returns unique identifier for the OLE object.
      Specified by:
      getObjectData in interface ObjectShape<HSLFShape,HSLFTextParagraph>
      Returns:
      the unique identifier for the OLE object
    • getExEmbed

      public ExEmbed getExEmbed()
      Return the record container for this embedded object.

      It contains: 1. ExEmbedAtom.(4045) 2. ExOleObjAtom (4035) 3. CString (4026), Instance MenuName (1) used for menus and the Links dialog box. 4. CString (4026), Instance ProgID (2) that stores the OLE Programmatic Identifier. A ProgID is a string that uniquely identifies a given object. 5. CString (4026), Instance ClipboardName (3) that appears in the paste special dialog. 6. MetaFile( 4033), optional

    • getInstanceName

      public String getInstanceName()
      Returns the instance name of the embedded object, e.g. "Document" or "Workbook".
      Returns:
      the instance name of the embedded object
    • getFullName

      public String getFullName()
      Description copied from interface: ObjectShape
      Returns the full name of the embedded object, e.g. "Microsoft Word Document" or "Microsoft Office Excel Worksheet".
      Specified by:
      getFullName in interface ObjectShape<HSLFShape,HSLFTextParagraph>
      Returns:
      the full name of the embedded object
    • setFullName

      public void setFullName(String fullName)
    • getProgId

      public String getProgId()
      Description copied from interface: ObjectShape
      Returns the ProgID that stores the OLE Programmatic Identifier. A ProgID is a string that uniquely identifies a given object, for example, "Word.Document.8" or "Excel.Sheet.8".
      Specified by:
      getProgId in interface ObjectShape<HSLFShape,HSLFTextParagraph>
      Returns:
      the ProgID
    • setProgId

      public void setProgId(String progId)
    • updateObjectData

      public OutputStream updateObjectData(ObjectMetaData.Application application, ObjectMetaData metaData) throws IOException
      Description copied from interface: ObjectShape
      Updates the ole data. If there wasn't an object registered before, a new ole embedding is registered in the parent slideshow.

      For HSLF this needs to be a POIFSFileSystem stream.

      Specified by:
      updateObjectData in interface ObjectShape<HSLFShape,HSLFTextParagraph>
      Parameters:
      application - a preset application enum
      metaData - or a custom metaData object, can be null if the application has been set
      Returns:
      an OutputStream which receives the new data, the data will be persisted on close()
      Throws:
      IOException - if the linked object data couldn't be found or a new object data couldn't be initialized