@Override public HSLFObjectShape createOleShape(PictureData pictureData) { if (!(pictureData instanceof HSLFPictureData)) { throw new IllegalArgumentException("pictureData needs to be of type HSLFPictureData"); } HSLFObjectShape s = new HSLFObjectShape((HSLFPictureData)pictureData); s.setAnchor(new Rectangle2D.Double(0, 0, 100, 100)); addShape(s); return s; }
@Override public HSLFObjectShape createOleShape(PictureData pictureData) { if (!(pictureData instanceof HSLFPictureData)) { throw new IllegalArgumentException("pictureData needs to be of type HSLFPictureData"); } HSLFObjectShape s = new HSLFObjectShape((HSLFPictureData)pictureData, this); s.setAnchor(new Rectangle2D.Double(0, 0, 100, 100)); addShape(s); return s; } }
private static HSLFShape createFrame(EscherContainerRecord spContainer, ShapeContainer<HSLFShape,HSLFTextParagraph> parent) { InteractiveInfo info = getClientDataRecord(spContainer, RecordTypes.InteractiveInfo.typeID); if(info != null && info.getInteractiveInfoAtom() != null){ switch(info.getInteractiveInfoAtom().getAction()){ case InteractiveInfoAtom.ACTION_OLE: return new HSLFObjectShape(spContainer, parent); case InteractiveInfoAtom.ACTION_MEDIA: return new MovieShape(spContainer, parent); default: break; } } ExObjRefAtom oes = getClientDataRecord(spContainer, RecordTypes.ExObjRefAtom.typeID); return (oes != null) ? new HSLFObjectShape(spContainer, parent) : new HSLFPictureShape(spContainer, parent); }