Search in sources :

Example 1 with MovieShape

use of org.apache.poi.hslf.model.MovieShape in project poi by apache.

the class HSLFShapeFactory method createFrame.

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 OLEShape(spContainer, parent);
            case InteractiveInfoAtom.ACTION_MEDIA:
                return new MovieShape(spContainer, parent);
            default:
                break;
        }
    }
    ExObjRefAtom oes = getClientDataRecord(spContainer, RecordTypes.ExObjRefAtom.typeID);
    return (oes != null) ? new OLEShape(spContainer, parent) : new HSLFPictureShape(spContainer, parent);
}
Also used : ExObjRefAtom(org.apache.poi.hslf.record.ExObjRefAtom) MovieShape(org.apache.poi.hslf.model.MovieShape) InteractiveInfo(org.apache.poi.hslf.record.InteractiveInfo) OLEShape(org.apache.poi.hslf.model.OLEShape)

Aggregations

MovieShape (org.apache.poi.hslf.model.MovieShape)1 OLEShape (org.apache.poi.hslf.model.OLEShape)1 ExObjRefAtom (org.apache.poi.hslf.record.ExObjRefAtom)1 InteractiveInfo (org.apache.poi.hslf.record.InteractiveInfo)1