We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

REGRESSION: Getting ClassCastException While Merging PowerPoint Presentations Using AsposeSlides Java 15.6.0 Version

Hi,


We are in process of upgarding Aspose.Slides Java version from 15.3.0 to 15,6.0. One of our test case was working fine with older vesrion and now in version Aspose.Slides 15.6.0, this testcase is encountering ClassCastException. The stack trace is given below:

java.lang.ClassCastException: com.aspose.slides.any cannot be cast to com.aspose.slides.PatternFormatEffectiveData
oracle.epm.platform.core.reportpackage.docman.ppt.AsposeOpenXmlPptManagerTest.testMerge(AsposeOpenXmlPptManagerTest.java:1116)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.lang.reflect.Method.invoke(Method.java:606)

In that testcase, we are trying to merge two PowerPoint presentations using code given below:

public void testMerge() {

Presentation sample = new Presentation(“Office2013Blank.pptx”);
Presentation control = new Presentation(“LayoutObjects.pptx”);

for (IMasterSlide master : control.getMasters()) {
sample.getMasters().addClone(master);
}

for (ISlide slide : control.getSlides()) {
ILayoutSlide controlLayout = slide.getLayoutSlide();
IMasterSlide controlMaster = controlLayout.getMasterSlide();
IMasterSlide sampleMaster = .getMasterByName(sample.getMasters(), getMasterName(controlMaster));
ILayoutSlide layoutToUse = null;
for (ILayoutSlide layout : sampleMaster.getLayoutSlides()) {
if (StringUtils.equalsIgnoreCase(controlLayout.getName(),
layout.getName())) {
layoutToUse = layout;
break;
}
}
sample.getSlides().addClone(slide, layoutToUse);
}

sample.save(“TestMerge.pptx”, SaveFormat.Pptx);

}

private ImasterSlide getMasterByName(final IMasterSlideCollection presentationMasters, final String masterLookUp) {
final IMasterSlideCollection pptMasters = presentationMasters;

IMasterSlide desired = null;
for (IMasterSlide master : pptMasters) {
if (StringUtils.equalsIgnoreCase(masterLookUp, getMasterName(master))) {
desired = master;
break;
}
}
return desired;
}

private String getMasterName(final IMasterSlide master) {
return master.getThemeManager().getOverrideTheme().getName();
}

The PowerPoint presentation attached with this post for your reference.

Please have a look into this as soon as possible. We eagerly want to migrate to Aspose slides 15.6.0 version. This issue may become a blocker for this version migration.

Thanks
Manisha

Hi,

Thanks for inquiring Aspose.Slides.

I have observed the feedback shared by you along with detailed information. An issue with ID SLIDESJAVA-34963 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-34963) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.