https://bz.apache.org/bugzilla/show_bug.cgi?id=62928
Bug ID: 62928
Summary: XSLFSlide.appendContent changes the PictureData of an
existing picture
Product: POI
Version: 4.0.0-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSLF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
I have one slide originalSlide which is empty.
I have a second slide contentSlide which contains a few shapes including one
picture.
I create a new picture into originalSlide like this:
Integer imgIdx = null;
for (XSLFPictureData p : output.getPictureData()) {
if (Arrays.equals(p.getData(), img.getData())) {
//img exists, no need to add
imgIdx = p.getIndex();
break;
}
}
if (imgIdx == null) {
imgIdx = output.addPicture(img.getData(),
img.getType()).getIndex(); //output is the XMLSlideShow
}
XSLFPictureShape s2 =
originalSlide.createPicture(output.getPictureData().get(imgIdx));
I create a third slide cloneSlide and import all content from the original
slide.
XSLFSlide cloneSlide =
output.createSlide().importContent(originalSlide);
Then, I try to append all content from contentSlide, and the content of my
picture s2 gets replaced with the image from contentSlide, but in originalSlide
the content of s2 is correct:
cloneSlide.appendContent(contentSlide);
--
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]