poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <n...@torchbox.com>
Subject Re: How to get the comment text on a power point slide
Date Wed, 15 Nov 2006 11:10:57 GMT
On Wed, 15 Nov 2006, Duc Phuong Nguyen wrote:
> I tried to get the comment on a power point slide (Menu-Insert-Comment) 
> using the Comment2000 class but haven't succeeded so far.

Looks like your code is only checking for top level records. In a normal 
powerpoint file, the top level records are things like Slide, Notes, 
Document.

The Comment records are stored as (IIRC) children of children of Slide 
records. If I were you, I'd write some code to recursivly search the 
children until you find it.


Also, you might want to do
 	if(record.getRecordType() == RecordTypes.Comment2000.typeID)
rather than hard coding 1200 into your code, so it's a bit cleaner. Or, do
 	if(record instanceof Comment2000)
since we do have a Comment2000 class

Nick

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


Mime
View raw message