Free Support Forum - aspose.com

Slide cloning from Office 2007 PPTX does not fill in defaults

The way in which PowerPoint 2007 and PowerPoint 2010 write and read
Chart XML is slightly different, causing problems if charts written by
PP 2007 are brought into a presentation written by PP 2010. If this kind
of presentation is opened in PP 2010, not only is the presentation
mildly corrupted - PP opens it only after repairing it - the chart may
not have its intended appearance. If this presentation’s
‘/docProps/app.xml’ subdocument is edited so that ‘AppVersion’ is
‘12.0000’ instead of ‘14.0000’, PP 2010 still states that the
presentation has problems, but the chart looks fine.



One of the ways in which the two PowerPoint versions’ charts seem to
differ is the amount of elements they write into the XML and the way
they interpret missing elements. For example, if writing a bar chart
whose bars all share the same color, PP 2010 writes a ‘<c:varyColors
val=“0”>’ element into the XML, while PP 2007 doesn’t write the
element at all. If the PP 2007 version of this bar chart, with the
element missing, is put into a presentation with AppVersion of 14 and it
is opened with PP 2010, the bars are of different colors. Open the same
presentation in PP 2007 and the bars are of a single color. The two
PowerPoints thus appear to interpret the meaning of the missing
varyColors element in the opposite ways.


The Aspose Slides library saves PPTX documents as though they were PP 2010 files, but if a slide is copied from a PP 2007 document, it does not fill in the missing default values. Attached is a document we encountered this problem with during deployment to a client (example.pptx) and the result of extracting the 6th slide from it (broken.pptx).

And a test program to generate broken.pptx from example.pptx, using Aspose Slides v2.5.0:

import com.aspose.slides.pptx.PresentationEx;
import com.aspose.slides.pptx.SlidesEx;

public class Test
{
public static void main(String[] args) throws Exception
{
PresentationEx target = new PresentationEx();
SlidesEx targetSlides = target.getSlides();
targetSlides.remove(0);

PresentationEx source = new PresentationEx("example.pptx");
targetSlides.addClone(source.getSlides().get(5));

target.write("broken.pptx");
}
}

Hi Juusov,

I have observed the comments shared by you. I have reproduced the issue shared by you and have observed the multiple colors in cloned slide bar chart as against in source slide with single color bar chart. An issue with ID 28871 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 is resolved.

We are sorry for your inconvenience,