poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Acombe <a.co...@laposte.net>
Subject Re: PPT animations
Date Wed, 21 Jan 2009 22:36:19 GMT

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)
{
  // unknown should be of type AnimationInfoAtom...
  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-tp20755802p21593625.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message