Esempio n. 1
0
        public static CT_Shape Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Shape ctObj = new CT_Shape();

            ctObj.macro      = XmlHelper.ReadString(node.Attribute("macro"));
            ctObj.textlink   = XmlHelper.ReadString(node.Attribute("textlink"));
            ctObj.fLocksText = XmlHelper.ReadBool(node.Attribute("fLocksText"));
            ctObj.fPublished = XmlHelper.ReadBool(node.Attribute("fPublished"));
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "nvSpPr")
                {
                    ctObj.nvSpPr = CT_ShapeNonVisual.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "spPr")
                {
                    ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "txBody")
                {
                    ctObj.txBody = CT_TextBody.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "style")
                {
                    ctObj.style = CT_ShapeStyle.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Esempio n. 2
0
        public void Set(CT_Shape obj)
        {
            this.macroField      = obj.macro;
            this.textlinkField   = obj.textlink;
            this.fLocksTextField = obj.fLocksText;
            this.fPublishedField = obj.fPublished;

            this.nvSpPrField = obj.nvSpPr;
            this.spPrField   = obj.spPr;
            this.styleField  = obj.style;
            this.txBodyField = obj.txBody;
        }
Esempio n. 3
0
 public CT_Shape AddNewSp()
 {
     shapeField = new CT_Shape();
     return(shapeField);
 }