Replies: 1 comment 1 reply
-
@shanaki, thank you for the report. I can reproduce this behavior. Yeah, the current slide copying implementation is not good/optimal: it copies all Slide Layouts of the source slide's Slide Master which leads to copying images from other Slide Layouts. The valid implementation is copying the Slide and only its Slide Layout. I've created an issue to optimize this: #274 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When insert a slide from source presentation file and add to target presentation file,
it looks like ppt/media contains duplicated images.
Originally, source.pptx has one image file(in slide master), I can confirm it in ppt/media after remaned to source.zip and unzip it.
target.pptx has also one image file(in slide master), I can also confirm it in ppt/media after remaned to target.zip and unzip it.
Both image files are identical.
Then, run following program.
using IPresentation source = SCPresentation.Open("C:\testdir\source.pptx", true);
using IPresentation dest = SCPresentation.Open("C:\testdir\target.pptx", true);
// Copy the first slide from source and add to the last slide in dest
ISlide copyingSlide = source.Slides[0];
dest.Slides.Add(copyingSlide);
dest.Save();
As a result, target.pptx has two image files in ppt/media. They are duplicated ones.(the same image files)
It looks like image in slide master of source presentation is copied to the target presentation.
Is this intentional behavior or kind of an issue?
testfiles.zip
I also found that ppt\presentation.xml contains weird relationship id like this in target presentation file after rename target.zip and unzip it.
<p:sldId r:id="rId2" id="256"/>
<p:sldId r:id="rId3" id="257"/>
<p:sldId r:id="rId4" id="258"/>
<p:sldId r:id="R94ea77bcca954761" id="259"/>
I'm not sure this is related to the above issue, or separated issue.
Beta Was this translation helpful? Give feedback.
All reactions