You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Acombe <a....@laposte.net> on 2008/11/30 10:25:47 UTC

PPT animations

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-tp20755802p20755802.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


Re: PPT animations

Posted by Yegor Kozlov <ye...@dinom.ru>.
Can you create a bug in bugzilla and attach the problem file?

Yegor

> 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.
>>
> 


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


Re: PPT animations

Posted by Acombe <a....@laposte.net>.
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


Re: PPT animations

Posted by Acombe <a....@laposte.net>.
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: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org