Esempio n. 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);
        }
Esempio n. 2
0
        private CT_NonVisualPictureProperties cNvPicPrField = new CT_NonVisualPictureProperties(); // 1..1

        public static CT_PictureNonVisual Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_PictureNonVisual ctObj = new CT_PictureNonVisual();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "cNvPr")
                {
                    ctObj.cNvPr = CT_NonVisualDrawingProps.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "cNvPicPr")
                {
                    ctObj.cNvPicPr = CT_NonVisualPictureProperties.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Esempio n. 3
0
 public CT_PictureNonVisual AddNewNvPicPr()
 {
     nvPicPrField = new CT_PictureNonVisual();
     return(this.nvPicPrField);
 }