.AddClone and .InsertClone bug

Using Aspose.Slides.dll for .Net 4.0 Framework version 7.3.0.0

Created initial PPTX file with PowerPoint 2010.

Steps to recreate error:
Create a pptx or pptm file in powerpoint with 1 or more slides.
Add a Chart (a bar chart for example) to the slide.

-Use a native powerpoint chart. Just insert a chart and use the dummy data powerpoint provides.
-Not an OLE Chart Object
-Not a chart created in excel with its data linked to the excel sheet.

Now try to make a copy of the slide using:

SlideExCollection slides = pres.Slides;
slides.AddClone[pres.Slides[0]];

Save the file.
When opening up the output file you will get a “Repair” question, as the file is corrupt.

From my tests it appears that the AddClone and InsertClone functions work to make a copy of all types of slides except for slides that contain native powerpoint charts. It will work on slides with charts as OLE object charts and charts that have their source linked to an external excel file.

To direct attention to a possible fix I believe that the AddClone function may not be properly copying all of the data parts/paragraphs in the xml for the chart.

Detailed code example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;

using Aspose.Slides;
using Aspose.Slides.Pptx;
using Aspose.Slides.Pptx.Charts;
using Aspose.Slides.Effects;
using Aspose.Slides.Export;
using Aspose.Slides.Import;
using Aspose.Slides.Odp;
using Aspose.Slides.Util;
using Aspose.Slides.Warnings;

namespace AsposeBug {
static class Program {
///
/// The main entry point for the application.
///
[STAThread]
static void Main() {
Assembly assembly;
Version ver;

//powerpoint
Aspose.Slides.License lic = new Aspose.Slides.License();
lic.SetLicense(“Aspose.Total.lic”);
Console.WriteLine("\nPowerPoint Components Registered");

assembly = Assembly.LoadFrom(“Aspose.Slides.dll”);
ver = assembly.GetName().Version;
Console.WriteLine("Version: " + ver);

PresentationEx pres = new PresentationEx(“Presentation1.pptx”);

SlideExCollection slides = pres.Slides;
slides.AddClone(pres.Slides[0]);

pres.Save(“Presentation2.pptx”, SaveFormat.Pptx);
}
}
}





Hi Jay,


I have worked wit the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-34195 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 SLIDESNET-34195) have been fixed in this update.


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