From: Nick Burch Date: Tue, 27 Jun 2006 18:15:32 +0000 (+0000) Subject: Hopefully fix bug 39228 - big overhaul of how slides and notes are build, based on... X-Git-Tag: REL_3_0_ALPHA3~82 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2db5e373a28da052cc7a51f81624ce101d1b62f2;p=poi.git Hopefully fix bug 39228 - big overhaul of how slides and notes are build, based on Yegor's discoveries. Hopefully, we now return the right slide #, and in the right order git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@417541 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java b/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java index 3342089879..57efcb0dfc 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java +++ b/src/scratchpad/src/org/apache/poi/hslf/model/Sheet.java @@ -73,9 +73,18 @@ public abstract class Sheet public SlideShow getSlideShow() { return _slideShow; } /** - * Set the SlideShow we're attached to + * Set the SlideShow we're attached to. + * Also passes it on to our child RichTextRuns */ - public void setSlideShow(SlideShow ss) { _slideShow = ss; } + public void setSlideShow(SlideShow ss) { + _slideShow = ss; + TextRun[] trs = getTextRuns(); + if(trs != null) { + for(int i=0; i 0) { - // Get the SlideIdentifier of the Notes - // (Note - might not be the same as the SlideIdentifier of the Slide) - int notesSlideIdentifier = s.getSlideAtom().getNotesID(); - Integer notesSlideIdentifierI = new Integer(notesSlideIdentifier); + // Now, do the same thing for our slides + org.apache.poi.hslf.record.Slide[] slidesRecords; + SlideAtomsSet[] slidesSets = new SlideAtomsSet[0]; + if(slidesSLWT == null) { + // None + slidesRecords = new org.apache.poi.hslf.record.Slide[0]; + } else { + // Match up the records and the SlideAtomSets + slidesSets = slidesSLWT.getSlideAtomsSets(); + slidesRecords = new org.apache.poi.hslf.record.Slide[slidesSets.length]; + for(int i=0; i