Compare Slides

Compare Two Slides

Equals method has been added to IBaseSlide interface and BaseSlide class. It returns true for the slides / layout slides / master slides which identical by its structure and static content.

Two slides are equal if all shapes, styles, texts, animation and other settings. etc. The comparison doesn’t take into account unique identifier values, e.g. SlideId and dynamic content, e.g. current date value in Date Placeholder.

For complete examples and data files, please go to https://github.com/aspose-slides/Aspose.Slides-for-C
// The path to the documents directory.
const String templatePath1 = u"../templates/AccessSlides.pptx";
const String templatePath2 = u"../templates/HelloWorld.pptx";
// Instantiate Presentation class
SharedPtr<Presentation> presentation1 = MakeObject<Presentation>(templatePath1);
SharedPtr<Presentation> presentation2 = MakeObject<Presentation>(templatePath2);
for (int i = 0; i < presentation1->get_Masters()->get_Count(); i++)
{
for (int j = 0; j <presentation2->get_Masters()->get_Count(); j++)
{
if (presentation1->get_Masters()->idx_get(i)->Equals(presentation2->get_Masters()->idx_get(j)))
printf("SomePresentation1 MasterSlide# %d is equal to SomePresentation2 MasterSlide #%d : %d\n",i,j);
}
}