Ah sorry, somehow I missed the bugzilla link on the main page.
Unfortunately, the sample PPTs that demonstrated incorrect Notes-Slides linkage
are internal company files which I'm not sure I'm allowed to send out. There was
already a comment about this problem in the code, so you or some other HSLF
developer must have had an example PPT file for this at some point? If not, I
can try some random PPT files from the web...
As for the second bug, it should be easy to reproduce, I will attach a sample
PPT later.
On 21.05.2007 19:34, Yegor Kozlov wrote:
Ivan,
Thanks for the patches. I will find time to review them.
P.S. We submit patches via Bugzilla. Please use it next time. Brief
instructions for contributors are here:
http://jakarta.apache.org/poi/getinvolved/index.html
I opened a new bug and attached your patches to it:
http://issues.apache.org/bugzilla/show_bug.cgi?id=42474
Could you attach sample ppts that were causing problems? One for Notes
- Slides linkage problem and another for NPE in
RichTextRun.isBold()?
Regards,
Yegor
Forgot the attachments...
On 20.05.2007 11:58, Ivan Todoroski wrote:
1. Incorrect matching of notes to slides
This is a long standing problem apparently, I noticed a TODO comment
about it. Anyway, after a bit of trial and error the problem seems to be
that for some PPT files the SlidePersistAtom from the note's
SlideAtomSet sometimes has a wrong slideIdentifier, so matching it to
the associated slide is impossible. But, if you look at the NotesAtom
from the actual Notes record (retrieved via getCoreRecordForSAS()), it
has the correct slideId, so that's what I use in my patch.
I don't know yet why
SlideAtomSet.getSlidePersistAtom().getSlideIdentifier() is different
from Notes.getNotesAtom().getSlideId(), maybe that's the real bug and my
patch is simply working around it? Someone more knowledgeable could shed
some light whether these two values are even supposed to be equal, in
the mean time this patch works perfectly for all my test cases which
exhibited incorrect note->slide association.
2. NPE in RichTextRun.isBold() when the RichTextRun comes from a Notes
model object
The Notes object wasn't doing setSheet(this) on the text runs it
returned, causing a NPE inside RichTextRun.isCharFlagsTextPropVal() when
any style accessor is called, because it tries to get the style info
from the master sheet if not present. However, doing setSheet() in Notes
was not enough, it merely moved the NPE a couple of lines down because
NotesMaster objects are not yet implemented in HSLF, so I had to add a
few null checks in RichTextRun too.
P.S. Not subscribed, please CC.
---------------------------------------------------------------------
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/
---------------------------------------------------------------------
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/