Re: Powerpoint and HSLF

2006-03-27 Thread Budi Darmawan




Hi Nick,

Thanks for the answers...
These are my futher findings:
- Slide ID is really in the Slide Persist Atom unless the slide is from the
Template
- The slide sequence is listed under the latest 1000 record under 4080 and
the sequence of 1011 shows the list slides ... There is no real Slide
number that I can find.

I am using Powerpoint 2002 SP3

Thanks

Regards,

Budi Darmawan
ITSO Tivoli Projects
[EMAIL PROTECTED]
phone: 1-512-838-7184


Sunday, March 26, 2006 3:27 PM
To: POI Users List poi-user@jakarta.apache.org
cc:
From: Nick Burch [EMAIL PROTECTED]
Subject: Re: Powerpoint and HSLF


On Fri, 24 Mar 2006, Budi Darmawan wrote:
 I am trying to extract slides information from PPT files using POI HSLF
 (alpha 3.0 scratchpad). And got stuck on the following:

I've just taken a look at it, and the current slide ID stuff isn't ideal.
I'm going to have to sit down and do a proper review of it all, and make a
few changes, but that's not going to happen straight away.

For now, I've added a method to Slide to get the Slide's number (1, 2, 3
etc).

 1. The slide ID is not returned from the org.apache.poii.hslf.model.Slide
 ... I need to add the code to return
 _atomSet.getSlidePersistAtom().getSlideIdentifier(); while checking for
 NullPointer.

I'm not sure we always pass in the right SlideAtomSet, and we don't always
give a SlideAtomSet in all cases, so this isn't ideal. I'm going to need
to think about this a bit, and hopefully find a more ideal solution

 2. The slides is returned out-of-order;

Can you upload an example where this happens to bugzilla? That might help
me spot how it works/breaks, and can also make the basis of a new unit
test

 then I am trying to get the Sheet number. The source indicate that Sheet
 number is in the Slide Atom object, however, I cant find any reference
 in that object to a number (I browse the hex codes.) Where can I get the
 sheet number for slide ordering?

As best I can tell, the slide atom doesn't actually have the slide number
(even though it would be an obvious place to put it). It does have the ID
of the associated notes field, which is also the Identifier in the
matching SlidePersistAtom, but if you don't have a notes field then
there's nothing to tie it up with :(

Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Powerpoint and HSLF

2006-03-27 Thread Nick Burch

On Mon, 27 Mar 2006, Budi Darmawan wrote:

- Slide ID is really in the Slide Persist Atom unless the slide is from the
Template


That's certainly the main place to find it, but that's still not much help 
for matching it to a slide record


- The slide sequence is listed under the latest 1000 record under 4080 
and the sequence of 1011 shows the list slides ... There is no real 
Slide number that I can find.


Yup, you just seem to have to get the slide number from either the RefId 
or the Identifier. I'm wondering if the RefId can be used to identify the 
slide record, but I've yet to test this out on a document with lots of 
slides.



Any chance you could upload one of your out-of-order PPT docs to bugzilla, 
so I can use it to check if I ever fix the out-of-order stuff?


Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: Powerpoint and HSLF

2006-03-27 Thread Nick Burch
On Mon, 27 Mar 2006, Nick Burch wrote:
  - The slide sequence is listed under the latest 1000 record under 4080
  and the sequence of 1011 shows the list slides ... There is no real
  Slide number that I can find.

 Yup, you just seem to have to get the slide number from either the RefId
 or the Identifier. I'm wondering if the RefId can be used to identify
 the slide record, but I've yet to test this out on a document with lots
 of slides.

I'm starting to think that the RefId in a SlidePersistAtom corresponds to
the ID of a core record (as found from PersistPtr stuff).

So, you find a SlidePersistPtr. That gives you the slide's external facing
ID (via SlideIdentifier), which is also the value used to match a Slide to
its Notes (SlideAtom - Notes ID, NotesAtom - Slide ID).

Then, you take the RefId, and go and fetch the record that has that ID
allocated to it by the PersistPtr stuff (in hslf, that means the most
recent core record with an ID one less than that, since our array is zero
based). That should be the matching slide record.

(With slides with notes, this does all tie up).


Can you run org.apache.poi.hslf.dev.SlideIdListing against a problem
sheet, and check that the RefIds from SlidePersistAtom matches that sheet
ID from PersistPtr? If it does, I can use the above to link slides and
their text better, hopefully fixing your out-of-order problem

Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Re: Powerpoint and HSLF

2006-03-27 Thread Budi Darmawan




Yes, the output from Slide ID listing quite match with it.

Thanks

Regards,

Budi Darmawan
ITSO Tivoli Projects
[EMAIL PROTECTED]
phone: 1-512-838-7184


Monday, March 27, 2006 1:52 PM
To: POI Users List poi-user@jakarta.apache.org
cc:
From: Nick Burch [EMAIL PROTECTED]
Subject: Re: Powerpoint and HSLF


On Mon, 27 Mar 2006, Nick Burch wrote:
  - The slide sequence is listed under the latest 1000 record under 4080
  and the sequence of 1011 shows the list slides ... There is no real
  Slide number that I can find.

 Yup, you just seem to have to get the slide number from either the RefId
 or the Identifier. I'm wondering if the RefId can be used to identify
 the slide record, but I've yet to test this out on a document with lots
 of slides.

I'm starting to think that the RefId in a SlidePersistAtom corresponds to
the ID of a core record (as found from PersistPtr stuff).

So, you find a SlidePersistPtr. That gives you the slide's external facing
ID (via SlideIdentifier), which is also the value used to match a Slide to
its Notes (SlideAtom - Notes ID, NotesAtom - Slide ID).

Then, you take the RefId, and go and fetch the record that has that ID
allocated to it by the PersistPtr stuff (in hslf, that means the most
recent core record with an ID one less than that, since our array is zero
based). That should be the matching slide record.

(With slides with notes, this does all tie up).


Can you run org.apache.poi.hslf.dev.SlideIdListing against a problem
sheet, and check that the RefIds from SlidePersistAtom matches that sheet
ID from PersistPtr? If it does, I can use the above to link slides and
their text better, hopefully fixing your out-of-order problem

Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Powerpoint and HSLF

2006-03-26 Thread Nick Burch
On Fri, 24 Mar 2006, Budi Darmawan wrote:
 I am trying to extract slides information from PPT files using POI HSLF
 (alpha 3.0 scratchpad). And got stuck on the following:

I've just taken a look at it, and the current slide ID stuff isn't ideal.
I'm going to have to sit down and do a proper review of it all, and make a
few changes, but that's not going to happen straight away.

For now, I've added a method to Slide to get the Slide's number (1, 2, 3
etc).

 1. The slide ID is not returned from the org.apache.poii.hslf.model.Slide
 ... I need to add the code to return
 _atomSet.getSlidePersistAtom().getSlideIdentifier(); while checking for
 NullPointer.

I'm not sure we always pass in the right SlideAtomSet, and we don't always
give a SlideAtomSet in all cases, so this isn't ideal. I'm going to need
to think about this a bit, and hopefully find a more ideal solution

 2. The slides is returned out-of-order;

Can you upload an example where this happens to bugzilla? That might help
me spot how it works/breaks, and can also make the basis of a new unit
test

 then I am trying to get the Sheet number. The source indicate that Sheet
 number is in the Slide Atom object, however, I cant find any reference
 in that object to a number (I browse the hex codes.) Where can I get the
 sheet number for slide ordering?

As best I can tell, the slide atom doesn't actually have the slide number
(even though it would be an obvious place to put it). It does have the ID
of the associated notes field, which is also the Identifier in the
matching SlidePersistAtom, but if you don't have a notes field then
there's nothing to tie it up with :(

Nick

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/