files.zip (572.8 KB)
public final class Test {
public static void main(String[] args) {
com.aspose.slides.License license = new com.aspose.slides.License();
license.setLicense("Aspose.Slides.Java.lic");
try {
String dataDir = new File(".").getAbsolutePath() + File.separator;
Presentation inPres = new Presentation(dataDir+"in.potx");
Presentation outPres = new Presentation(dataDir+"newlayout.potx");
//add first slide of inPres to outPres using the first layout of outPres
outPres.getSlides().addClone(inPres.getSlides().get_Item(0),outPres.getLayoutSlides().get_Item(0));
outPres.save(dataDir + "out.pptx", SaveFormat.Pptx);
}
catch( Exception e){
System.out.println("Error Exception in code: "+e.getMessage());
System.exit(1) ;
}
}
}
Hi, I think there’s a bug in ISlideCollection.addClone
see attached files
out.pptx has a duplicated shape in rather than the correct text place holder (with an svg background)
resetting the layout of slide1 in out.pptx in PowerPoint will produce the result I was expecting
(and is what happens if you manually do the operation in powerpoint via cut an paste use destination theme)