Reputation: 851
I've run into a situation:
XSLFSlide xslfSlide = ppt.createSlide();
for (XSLFShape shape : xslfSlide) {
if (shape instanceof XSLFTextShape) {
//some code here
} else if(shape instanceof XSLFPictureShape) {
//some code here
}
}
if I have a shape type XSLFPictureShape(simply saying - picture) it throws me an Exception:
java.lang.IllegalArgumentException: Unsupported shape: org.apache.poi.xslf.usermodel.XSLFPictureShape
Is there any way to remove an image from a slide?
Upvotes: 2
Views: 1759
Reputation: 3446
After amanteaux raised a bug report, I've fixed this in r1717018
After reading the comments, I've also added the missing table remove code in r1717087
As for an answer, it's generally better to raise a bug at the projects issue tracking system than hoping that someone of a projects checks the posts at SO. (I've stopped to track/answer SO posts, as I mostly got votes for no-brainers and not for stuff I worked several days/weeks ...)
Upvotes: 3