Exemplo n.º 1
0
        /**
         * Initialize default structure of a new shape group
         */
        internal static CT_GroupShape Prototype()
        {
            if (prototype == null)
            {
                CT_GroupShape shape = new CT_GroupShape();


                CT_GroupShapeNonVisual   nv   = shape.AddNewNvGrpSpPr();
                CT_NonVisualDrawingProps nvpr = nv.AddNewCNvPr();
                nvpr.id   = (0);
                nvpr.name = ("Group 0");
                nv.AddNewCNvGrpSpPr();
                CT_GroupShapeProperties sp  = shape.AddNewGrpSpPr();
                CT_GroupTransform2D     t2d = sp.AddNewXfrm();
                CT_PositiveSize2D       p1  = t2d.AddNewExt();
                p1.cx = (0);
                p1.cy = (0);
                CT_Point2D p2 = t2d.AddNewOff();
                p2.x = (0);
                p2.y = (0);
                CT_PositiveSize2D p3 = t2d.AddNewChExt();
                p3.cx = (0);
                p3.cy = (0);
                CT_Point2D p4 = t2d.AddNewChOff();
                p4.x = (0);
                p4.y = (0);

                prototype = shape;
            }
            return(prototype);
        }
Exemplo n.º 2
0
        public static CT_GroupShape Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_GroupShape ctObj = new CT_GroupShape();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "nvGrpSpPr")
                {
                    ctObj.nvGrpSpPr = CT_GroupShapeNonVisual.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "grpSpPr")
                {
                    ctObj.grpSpPr = CT_GroupShapeProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "pic")
                {
                    var pic = CT_Picture.Parse(childNode, namespaceManager);
                    ctObj.pictures.Add(pic);
                }
                else if (childNode.LocalName == "sp")
                {
                    var shape = CT_Shape.Parse(childNode, namespaceManager);
                    ctObj.shapes.Add(shape);
                }
            }
            return(ctObj);
        }
Exemplo n.º 3
0
        public static CT_GroupShape Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_GroupShape ctObj = new CT_GroupShape();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "nvGrpSpPr")
                {
                    ctObj.nvGrpSpPr = CT_GroupShapeNonVisual.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "grpSpPr")
                {
                    ctObj.grpSpPr = CT_GroupShapeProperties.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Exemplo n.º 4
0
 public CT_GroupShapeProperties AddNewGrpSpPr()
 {
     this.grpSpPrField = new CT_GroupShapeProperties();
     return this.grpSpPrField;
 }
Exemplo n.º 5
0
 public void Set(CT_GroupShape groupShape)
 {
     this.grpSpPrField = groupShape.grpSpPr;
     this.nvGrpSpPrField = groupShape.nvGrpSpPr;
 }
Exemplo n.º 6
0
 public CT_GroupShapeProperties AddNewGrpSpPr()
 {
     this.grpSpPrField = new CT_GroupShapeProperties();
     return(this.grpSpPrField);
 }
Exemplo n.º 7
0
 public void Set(CT_GroupShape groupShape)
 {
     this.grpSpPrField   = groupShape.grpSpPr;
     this.nvGrpSpPrField = groupShape.nvGrpSpPr;
 }
Exemplo n.º 8
0
 public CT_GroupShape()
 {
     this.itemsField     = new List <object>();
     this.grpSpPrField   = new CT_GroupShapeProperties();
     this.nvGrpSpPrField = new CT_GroupShapeNonVisual();
 }
Exemplo n.º 9
0
 public CT_GroupShape()
 {
     this.itemsField = new List<object>();
     this.grpSpPrField = new CT_GroupShapeProperties();
     this.nvGrpSpPrField = new CT_GroupShapeNonVisual();
 }