https://issues.apache.org/bugzilla/show_bug.cgi?id=47261
Summary: SlideShow.removeSlide makes PPT corrupted
Product: POI
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: critical
Priority: P1
Component: HSLF
AssignedTo: [email protected]
ReportedBy: [email protected]
removeSlide method of SlideShow makes PPT corrupted.
Check code snippet below.
When I try to open TestSlide_Empty.ppt in MS Powerpoint 2003, I catch
"PowerPoint was unable to display some og the text...". error. See full error
text in attached screenshot.
Code snippet:
import java.io.FileInputStream;
import java.io.FileOutputStream;
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("TestSlide.ppt"));
Slide[] slides = ppt.getSlides();
for (int i = 0; i < slides.length; i++) {
ppt.removeSlide(0);
}
FileOutputStream out = new FileOutputStream("TestSlide_Empty.ppt");
ppt.write(out);
out.close();
}
}
--
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: [email protected]
For additional commands, e-mail: [email protected]