Example #1
0
        public static CT_Picture Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Picture ctObj = new CT_Picture();

            ctObj.macro      = XmlHelper.ReadString(node.Attribute("macro"));
            ctObj.fPublished = XmlHelper.ReadBool(node.Attribute("fPublished"));
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "nvPicPr")
                {
                    ctObj.nvPicPr = CT_PictureNonVisual.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "blipFill")
                {
                    ctObj.blipFill = CT_BlipFillProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "spPr")
                {
                    ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "style")
                {
                    ctObj.style = CT_ShapeStyle.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Example #2
0
 public void Set(CT_Picture pict)
 {
     this.nvPicPr             = pict.nvPicPr;
     this.spPr                = pict.spPr;
     this.macro               = pict.macro;
     this.macroSpecified      = this.macroSpecified;
     this.style               = pict.style;
     this.styleSpecified      = pict.styleSpecified;
     this.fPublished          = pict.fPublished;
     this.fPublishedSpecified = pict.fPublishedSpecified;
     this.blipFill            = pict.blipFill;
 }
Example #3
0
 public CT_Picture AddNewPic()
 {
     pictureField = new CT_Picture();
     return(pictureField);
 }