internal LayoutPicture(SCSlideLayout slideLayout, P.Picture pPicture) : base(slideLayout, pPicture) { }
internal SCSlideMaster GetSlideMasterByLayout(SCSlideLayout slideLayout) { return(CollectionItems.First(sldMaster => sldMaster.SlideLayouts.Any(sl => sl.SlideLayoutPart == slideLayout.SlideLayoutPart))); }
public LayoutChart(SCSlideLayout slideLayout, P.GraphicFrame pGraphicFrame) : base(slideLayout, pGraphicFrame) { }
internal LayoutOLEObject(SCSlideLayout slideLayout, P.GraphicFrame pGraphicFrame) : base(slideLayout, pGraphicFrame) { }
internal static ShapeCollection CreateForSlideLayout(P.ShapeTree pShapeTree, SCSlideLayout slideLayout) { var shapeList = new List <IShape>(); foreach (OpenXmlCompositeElement compositeElement in pShapeTree.OfType <OpenXmlCompositeElement>()) { switch (compositeElement) { case P.Shape pShape: shapeList.Add(new LayoutAutoShape(slideLayout, pShape)); continue; case P.GraphicFrame pGraphicFrame: { A.GraphicData aGraphicData = pGraphicFrame.GetFirstChild <A.Graphic>().GetFirstChild <A.GraphicData>(); if (aGraphicData.Uri.Value.Equals("http://schemas.openxmlformats.org/presentationml/2006/ole", StringComparison.Ordinal)) { shapeList.Add(new LayoutOLEObject(slideLayout, pGraphicFrame)); continue; } if (aGraphicData.Uri.Value.Equals("http://schemas.openxmlformats.org/drawingml/2006/chart", StringComparison.Ordinal)) { shapeList.Add(new LayoutChart(slideLayout, pGraphicFrame)); continue; } if (aGraphicData.Uri.Value.Equals("http://schemas.openxmlformats.org/drawingml/2006/table", StringComparison.Ordinal)) { shapeList.Add(new LayoutTable(slideLayout, pGraphicFrame)); continue; } break; } } // OLE Objects should be parsed before pictures, since OLE containers can contain p:pic elements, // thus OLE objects can be parsed as a picture by mistake. P.Picture pPicture; if (compositeElement is P.Picture treePicture) { pPicture = treePicture; } else { P.Picture framePicture = compositeElement.Descendants <P.Picture>().FirstOrDefault(); pPicture = framePicture; } if (pPicture != null) { shapeList.Add(new LayoutPicture(slideLayout, pPicture)); } } return(new ShapeCollection(shapeList)); }
protected LayoutShape(SCSlideLayout slideLayout, OpenXmlCompositeElement pShapeTreeChild) : base( pShapeTreeChild) { SlideLayout = slideLayout; }
internal LayoutTable(SCSlideLayout slideLayout, P.GraphicFrame pGraphicFrame) : base(slideLayout, pGraphicFrame) { }