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;
}
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;
}
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);
}
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);
}
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);
}
Aggregations