示例#1
0
        public static CT_ObjectStyleDefaults Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_ObjectStyleDefaults ctObj = new CT_ObjectStyleDefaults();

            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "spDef")
                {
                    ctObj.spDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "lnDef")
                {
                    ctObj.lnDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "txDef")
                {
                    ctObj.txDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
示例#2
0
 public CT_OfficeStyleSheet()
 {
     this.extLstField            = new CT_OfficeArtExtensionList();
     this.custClrLstField        = new List <CT_CustomColor>();
     this.extraClrSchemeLstField = new List <CT_ColorSchemeAndMapping>();
     this.objectDefaultsField    = new CT_ObjectStyleDefaults();
     this.themeElementsField     = new CT_BaseStyles();
     this.nameField = "";
 }
示例#3
0
        public static CT_OfficeStyleSheet Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_OfficeStyleSheet ctObj = new CT_OfficeStyleSheet();

            ctObj.name       = XmlHelper.ReadString(node.Attributes["name"]);
            ctObj.custClrLst = new List <CT_CustomColor>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "themeElements")
                {
                    ctObj.themeElements = CT_BaseStyles.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "objectDefaults")
                {
                    ctObj.objectDefaults = CT_ObjectStyleDefaults.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extraClrSchemeLst")
                {
                    if (ctObj.extraClrSchemeLst == null)
                    {
                        ctObj.extraClrSchemeLst = new List <CT_ColorSchemeAndMapping>();
                    }
                    ctObj.extraClrSchemeLst.Add(CT_ColorSchemeAndMapping.Parse(childNode, namespaceManager));
                }
                else if (childNode.LocalName == "custClrLst")
                {
                    ctObj.custClrLst.Add(CT_CustomColor.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
示例#4
0
 public static CT_ObjectStyleDefaults Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_ObjectStyleDefaults ctObj = new CT_ObjectStyleDefaults();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "spDef")
             ctObj.spDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "lnDef")
             ctObj.lnDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "txDef")
             ctObj.txDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
示例#5
0
 public CT_OfficeStyleSheet()
 {
     this.extLstField = new CT_OfficeArtExtensionList();
     this.custClrLstField = new List<CT_CustomColor>();
     this.extraClrSchemeLstField = new List<CT_ColorSchemeAndMapping>();
     this.objectDefaultsField = new CT_ObjectStyleDefaults();
     this.themeElementsField = new CT_BaseStyles();
     this.nameField = "";
 }