https://bz.apache.org/bugzilla/show_bug.cgi?id=60499
Bug ID: 60499 Summary: Deleting a picture that is used twice on a slide corrupt the slide Product: POI Version: 3.16-dev Hardware: PC Status: NEW Severity: normal Priority: P2 Component: XSLF Assignee: dev@poi.apache.org Reporter: amanteaux+bzapa...@gmail.com Target Milestone: --- Created attachment 34536 --> https://bz.apache.org/bugzilla/attachment.cgi?id=34536&action=edit A test PPT with an image used twice, and a java code with a main to reproduce the problem If the same picture is referenced twice in a slide (with 2 XSLFPictureShape), deleting one of the XSLFPictureShape will corrupt the slide. By corrupted, I mean that PowerPoint won't be able to load the slide and it will replace its content with a blank slide. I am guessing that XSLF always deletes the image file along with the XSLFPictureShape. What should be done is deleting the image file only if it is not used by other XSLFPictureShape elements. To create a slide with the same picture referenced twice: 1. insert a picture in a slide, 2. copy and past the inserted picture in the current slide. The same picture should be duplicated in the slide. I have put attached a zip file with: - a PPT with one slide and an image used twice in that slide, - a java class with a small main() to reproduce the probleme. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org