Exemplo n.º 1
0
 private void SetGraphicFrameVisualProperties(SlidePart slidePart,
                                              GraphicFrame gfarame)
 {
     base.VisualShapeProp = new PPTVisualPPTShapeProp();
     if (gfarame.Transform != null)
     {
         base.VisualShapeProp.Extents = gfarame.Transform.Extents;
         base.VisualShapeProp.Offset  = gfarame.Transform.Offset;
     }
     else
     {
         //Petco change get properties from layout for GraphicFrame object.
         DocumentFormat.OpenXml.Presentation.ShapeTree shapeTree =
             slidePart.SlideLayoutPart.SlideLayout.CommonSlideData.ShapeTree;
         DocumentFormat.OpenXml.Presentation.GraphicFrame layoutShape;
         if (shapeTree != null)
         {
             layoutShape = shapeTree.GetFirstChild <DocumentFormat.OpenXml.Presentation.GraphicFrame>();
             if (layoutShape.Transform != null)
             {
                 base.VisualShapeProp.Extents = layoutShape.Transform.Extents;
                 base.VisualShapeProp.Offset  = layoutShape.Transform.Offset;
             }
         }
     }
 }