Hi,
I'm facing an issue with creating a slide from a slideLayout. My SlideLayout has some placeholder shapes. But after creating the slide(slide1) with that slideLayout, I don't see any of of those placeholder shapes in /ppt/slides/slide1.xml.
This is how i'm creating a slide using that slideLayout.
SlideLayoutPart introSlideLayout = (SlideLayoutPart)pmlPackage.getParts().get(new PartName("/ppt/slideLayouts/slideLayout1.xml"));
SlidePart introSlide = PresentationMLPackage.createSlidePart(mpp, qbrIntroSlideLayout, new PartName("/ppt/slides/slide1.xml"));
I've even referred to the docx4j source code on how the slide is being created. By default, it's creating only the following XML for the slide.
public final static String COMMON_SLIDE_DATA =
"<p:cSld xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\">"
+ "<p:spTree>"
+ "<p:nvGrpSpPr>"
+ "<p:cNvPr id=\"1\" name=\"\"/>"
+ "<p:cNvGrpSpPr/>"
+ "<p:nvPr/>"
+ "</p:nvGrpSpPr>"
+ "<p:grpSpPr>"
+ "<a:xfrm>"
+ "<a:off x=\"0\" y=\"0\"/>"
+ "<a:ext cx=\"0\" cy=\"0\"/>"
+ "<a:chOff x=\"0\" y=\"0\"/>"
+ "<a:chExt cx=\"0\" cy=\"0\"/>"
+ "</a:xfrm>"
+ "</p:grpSpPr>"
+ "</p:spTree>"
+ "</p:cSld>";
Do we need to explicitly copy the shapes from slideLayout to slide or Am I doing something wrong ? I've seen a class called ResolvedLayout but don't know how to use it.
Please provide assistance in resolving this issue.
-Thanks,
Praveen