Hi,
Yesterday, i came back to this problem and i found that the following code
was almost OK but not exactly :
EscherContainerRecord container = _shape.getSpContainer();
ArrayList lAnimInfoAtom = new ArrayList();
container.getRecordsById((short) RecordTypes.AnimationInfoAtom.typeID,
lAnimInfoAtom);
if (lAnimInfoAtom.size() != 0)
{
UnknownEscherRecord unknown = (UnknownEscherRecord)lAnimInfoAtom.get(0);
}
In the ppt file, there is indeed an animation attached to this _shape.
I'm looking for an AnimationInfoAtom object (recordtype 4081) but
getRecordsById returns an UnknownEscherRecord object...
Any Idea ??
Thanks.
Alex.
Acombe wrote:
>
> Hi everyone,
>
> I want to get the animations from a ppt file, so I tried to use the
> AnimationInfo
> and AnimationInfoAtom classes in the following ways :
>
> - At the slide level (with a slide appearing with a translation) :
> org.apache.poi.hslf.record.Slide sRecord = slide.getSlideRecord();
> AnimationInfo animInfo = (AnimationInfo)
> sRecord.findFirstOfType(RecordTypes.AnimationInfo.typeID);
> if (animInfo!=null)
> {
> ...
>
> - At the shape level (shape participating in an animation) with the
> following code :
> EscherContainerRecord container = _shape.getSpContainer();
> if (container!=null)
> {
> ArrayList<AnimationInfo> lAnimInfo = new ArrayList<AnimationInfo>();
> container.getRecordsById((short) RecordTypes.AnimationInfo.typeID,
> lAnimInfo);
> if (lAnimInfo.size() != 0)
> {
> AnimationInfo animContainer = lAnimInfo.get(0);
> ...
>
> In both case, I can't get neither AnimationInfo nor AnimationInfoArom
> objet (every time it's null).
> Do you have any example of AnimationInfo usage ?
>
> Thanks for the help.
> Alex.
>
--
View this message in context:
http://www.nabble.com/PPT-animations-tp20755802p21593617.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]