Search in sources :

Example 1 with InteractiveInfoAtom

use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.

the class SoundFinder method getSoundReference.

/**
     * Check if a given shape is associated with a sound.
     * @return 0-based reference to a sound in the sound collection
     * or -1 if the shape is not associated with a sound
     */
protected static int getSoundReference(HSLFShape shape) {
    int soundRef = -1;
    //dive into the shape container and search for InteractiveInfoAtom
    InteractiveInfoAtom info = shape.getClientDataRecord(RecordTypes.InteractiveInfo.typeID);
    if (info != null && info.getAction() == InteractiveInfoAtom.ACTION_MEDIA) {
        soundRef = info.getSoundRef();
    }
    return soundRef;
}
Also used : InteractiveInfoAtom(org.apache.poi.hslf.record.InteractiveInfoAtom)

Example 2 with InteractiveInfoAtom

use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.

the class MovieShape method createSpContainer.

/**
     * Create a new Placeholder and initialize internal structures
     *
     * @return the created <code>EscherContainerRecord</code> which holds shape data
     */
@Override
protected EscherContainerRecord createSpContainer(int idx, boolean isChild) {
    EscherContainerRecord ecr = super.createSpContainer(idx, isChild);
    setEscherProperty(EscherProperties.PROTECTION__LOCKAGAINSTGROUPING, 0x1000100);
    setEscherProperty(EscherProperties.FILL__NOFILLHITTEST, 0x10001);
    ExObjRefAtom oe = new ExObjRefAtom();
    InteractiveInfo info = new InteractiveInfo();
    InteractiveInfoAtom infoAtom = info.getInteractiveInfoAtom();
    infoAtom.setAction(InteractiveInfoAtom.ACTION_MEDIA);
    infoAtom.setHyperlinkType(InteractiveInfoAtom.LINK_NULL);
    AnimationInfo an = new AnimationInfo();
    AnimationInfoAtom anAtom = an.getAnimationInfoAtom();
    anAtom.setFlag(AnimationInfoAtom.Automatic, true);
    HSLFEscherClientDataRecord cldata = getClientData(true);
    cldata.addChild(oe);
    cldata.addChild(an);
    cldata.addChild(info);
    return ecr;
}
Also used : ExObjRefAtom(org.apache.poi.hslf.record.ExObjRefAtom) HSLFEscherClientDataRecord(org.apache.poi.hslf.record.HSLFEscherClientDataRecord) InteractiveInfoAtom(org.apache.poi.hslf.record.InteractiveInfoAtom) AnimationInfo(org.apache.poi.hslf.record.AnimationInfo) AnimationInfoAtom(org.apache.poi.hslf.record.AnimationInfoAtom) EscherContainerRecord(org.apache.poi.ddf.EscherContainerRecord) InteractiveInfo(org.apache.poi.hslf.record.InteractiveInfo)

Example 3 with InteractiveInfoAtom

use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.

the class HSLFHyperlink method linkToFirstSlide.

@Override
public void linkToFirstSlide() {
    InteractiveInfoAtom iia = info.getInteractiveInfoAtom();
    iia.setAction(InteractiveInfoAtom.ACTION_JUMP);
    iia.setJump(InteractiveInfoAtom.JUMP_FIRSTSLIDE);
    iia.setHyperlinkType(InteractiveInfoAtom.LINK_FirstSlide);
    linkToDocument(1, -1, "FIRST", 0x10);
}
Also used : InteractiveInfoAtom(org.apache.poi.hslf.record.InteractiveInfoAtom) TxInteractiveInfoAtom(org.apache.poi.hslf.record.TxInteractiveInfoAtom)

Example 4 with InteractiveInfoAtom

use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.

the class HSLFHyperlink method linkToPreviousSlide.

@Override
public void linkToPreviousSlide() {
    InteractiveInfoAtom iia = info.getInteractiveInfoAtom();
    iia.setAction(InteractiveInfoAtom.ACTION_JUMP);
    iia.setJump(InteractiveInfoAtom.JUMP_PREVIOUSSLIDE);
    iia.setHyperlinkType(InteractiveInfoAtom.LINK_PreviousSlide);
    linkToDocument(1, -1, "PREV", 0x10);
}
Also used : InteractiveInfoAtom(org.apache.poi.hslf.record.InteractiveInfoAtom) TxInteractiveInfoAtom(org.apache.poi.hslf.record.TxInteractiveInfoAtom)

Example 5 with InteractiveInfoAtom

use of org.apache.poi.hslf.record.InteractiveInfoAtom in project poi by apache.

the class HSLFHyperlink method linkToLastSlide.

@Override
public void linkToLastSlide() {
    InteractiveInfoAtom iia = info.getInteractiveInfoAtom();
    iia.setAction(InteractiveInfoAtom.ACTION_JUMP);
    iia.setJump(InteractiveInfoAtom.JUMP_LASTSLIDE);
    iia.setHyperlinkType(InteractiveInfoAtom.LINK_LastSlide);
    linkToDocument(1, -1, "LAST", 0x10);
}
Also used : InteractiveInfoAtom(org.apache.poi.hslf.record.InteractiveInfoAtom) TxInteractiveInfoAtom(org.apache.poi.hslf.record.TxInteractiveInfoAtom)

Aggregations

InteractiveInfoAtom (org.apache.poi.hslf.record.InteractiveInfoAtom)10 TxInteractiveInfoAtom (org.apache.poi.hslf.record.TxInteractiveInfoAtom)8 HSLFEscherClientDataRecord (org.apache.poi.hslf.record.HSLFEscherClientDataRecord)2 InteractiveInfo (org.apache.poi.hslf.record.InteractiveInfo)2 EscherContainerRecord (org.apache.poi.ddf.EscherContainerRecord)1 AnimationInfo (org.apache.poi.hslf.record.AnimationInfo)1 AnimationInfoAtom (org.apache.poi.hslf.record.AnimationInfoAtom)1 ExHyperlink (org.apache.poi.hslf.record.ExHyperlink)1 ExObjRefAtom (org.apache.poi.hslf.record.ExObjRefAtom)1 Record (org.apache.poi.hslf.record.Record)1