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 2021/11/29 15:55:38 UTC
[Bug 65712] New: Missing Diagram relations when merging presentations
https://bz.apache.org/bugzilla/show_bug.cgi?id=65712
Bug ID: 65712
Summary: Missing Diagram relations when merging presentations
Product: POI
Version: 5.0.x-dev
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSLF
Assignee: dev@poi.apache.org
Reporter: vadim.zav@storied.co
Target Milestone: ---
I'm trying to merge two presentations (using example from the XSLF Cookbook)
with the SmartArts inside and getting corrupted presentation as result
(PowerPoint says: "PowerPoint found a problem with content in merged.pptx")
After troubleshooting I've found that diagram relations is missing in the
slideslide2.xml.rels file.
Problem is caused by XSLFSheet::importPart() method which checks existence of
package part and skip creation of new relation for diagrams.
Code:
XMLSlideShow ppt = new XMLSlideShow();
String[] pptx = {"diagram.pptx", "diagram1.pptx"};
for(String arg : pptx){
XMLSlideShow src = XSLFTestDataSamples.openSampleDocument(arg);
for(XSLFSlide srcSlide : src.getSlides()){
ppt.createSlide().importContent(srcSlide);
}
}
FileOutputStream out = new FileOutputStream("merged.pptx");
ppt.write(out);
ppt.close();
Call stack:
importPart:679, XSLFSheet (org.apache.poi.xslf.usermodel)
copyDiagram:257, XSLFGraphicFrame (org.apache.poi.xslf.usermodel)
copy:213, XSLFGraphicFrame (org.apache.poi.xslf.usermodel)
wipeAndReinitialize:455, XSLFSheet (org.apache.poi.xslf.usermodel)
importContent:434, XSLFSheet (org.apache.poi.xslf.usermodel)
importContent:293, XSLFSlide (org.apache.poi.xslf.usermodel)
testMergeSlidesWithDiagram:206, TestXSLFSlide (org.apache.poi.xslf.usermodel)
I would like if someone looks at this issue and try to fix or provide details
on how this bug should be fixed.
Thank you.
--
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
[Bug 65712] Missing Diagram relations when merging presentations
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65712
--- Comment #1 from Vadim <va...@storied.co> ---
Created attachment 38110
--> https://bz.apache.org/bugzilla/attachment.cgi?id=38110&action=edit
Sample presentations with diagrams
--
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
[Bug 65712] Missing Diagram relations when merging presentations
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65712
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INFORMATIONPROVIDED
Status|NEW |RESOLVED
--- Comment #3 from PJ Fanning <fa...@yahoo.com> ---
https://bz.apache.org/bugzilla/show_bug.cgi?id=66176 might help - will close
this. Please reopen if #66176 does not help.
--
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
[Bug 65712] Missing Diagram relations when merging presentations
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65712
PJ Fanning <fa...@yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
A previous issue on stackoverflow on
https://stackoverflow.com/questions/54556729/merging-powerpoint-presentations-using-apache-poi-doesnt-work-well-with-charts
There are not people working the XSLF code base and it may be a case of the
person who has the issue fixing it and submitting it for the benefit of other
users.
--
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