You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/10/08 13:04:53 UTC
DO NOT REPLY [Bug 47261] SlideShow.removeSlide makes PPT corrupted
https://issues.apache.org/bugzilla/show_bug.cgi?id=47261
Constantin <cv...@pragmaticsoft.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #23711|0 |1
is obsolete| |
Attachment #23712|0 |1
is obsolete| |
Attachment #23844|0 |1
is obsolete| |
--- Comment #8 from Constantin <cv...@pragmaticsoft.com> 2009-10-08 04:04:49 PDT ---
Created an attachment (id=24364)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=24364)
PowerPoint file
Code snippet:
import java.io.FileInputStream;
import org.apache.poi.hslf.model.Slide;
import org.apache.poi.hslf.usermodel.SlideShow;
public class POITest {
public static void main(String[] args) throws Exception {
SlideShow ppt = new SlideShow(new FileInputStream("tt2.ppt"));
Slide[] slides = ppt.getSlides();
for (int i = 0; i < slides.length; i++) {
ppt.removeSlide(0);
}
Slide newSlide = ppt.createSlide();
}
}
This code generates following error:
Exception in thread "main" java.lang.IllegalStateException: The last child
record of a Document should be EndDocument, but it was
org.apache.poi.hslf.record.UnknownRecordPlaceholder@12d96f2
at
org.apache.poi.hslf.record.Document.addSlideListWithText(Document.java:179)
at org.apache.poi.hslf.usermodel.SlideShow.createSlide(SlideShow.java:700)
at POITest.main(POITest.java:19)
With removeSlide commented works ok.
tt2.ppt attached (file received from our customer)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org