スライドの比較

2つのスライドを比較する

EqualsメソッドがIBaseSlideインターフェースとBaseSlideクラスに追加されました。このメソッドは、構造と静的コンテンツが同一のスライド/レイアウトスライド/マスタースライドに対してtrueを返します。

2つのスライドは、すべてのシェイプ、スタイル、テキスト、アニメーションおよびその他の設定が等しい場合に等しいと見なされます。比較では、SlideIdのようなユニークな識別子の値や、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);
}
}