Presentation slide count is wrong

Please, take a look at the attached presentation. Is was created via CloneSlide.

Aspose.Slides.Slide srcSlide = srcPresentation.GetSlideByPosition(slidePosition);
Presentation resultPresentation = new Presentation();
int clonedSlidePosition = 1;
srcPresentation.CloneSlide(srcSlide, clonedSlidePosition, resultPresentation, new SortedList());


Now, when I open it with MS PowerPoint it tells me that there is only one slide in presentation (and that’s the result i intended to get). But when i open it with Aspose it tells me that there are two slides in the presentation.

I think it’s a bug.

Best regards,
Victor

Dear Kindzaza,

Actually, there are two slides, one is slide you can see and other is the master slide.

Actually, there are four slides - two master slides and two user slides. But why MS Power Point shows 1 slide in presentation? And not two or four?
I always thought that Presentation.Slides.Count takes only non Master slides into account. I was wrong?
But thwn why Aspose counts 1 slide in other presentations that also have some master slides in them?
Please, shed some light.

Best regards,
Victor

Dear Victor,

When I was looking into this problem, I found out that Slides.SlideCount does not take into consideration slide masters; however it takes into consideration title masters. In your 2.ppt, there are two slide masters and one title master in addition to one slide, so the count is showing 2.

As an experiment, if you add another slide master in 2.ppt, count will remain 2 but if you add another title master, it will become 3.

Are you planning on fixing this so that Master slides (title or otherwise) are not considered in Slides.Count? If not, please tell me why, as I don't think it makes sense to include them.

Thanks!

Dan Thayer

Dear Dan,

Actually, Title Slide are normal slides, that's why they are included with Normal Slides.

However, Slide Master is different, so they are included in Presentation.Masters collection.

To get the normal slide count, you can use Presentation.Slides.LastSlidePosition

I just figured that out, but thank you for your quick response!

Dan Thayer