コード例 #1
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 = "";
 }
コード例 #2
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);
        }
コード例 #3
0
 public CT_ClipboardStyleSheet()
 {
     this.clrMapField        = new CT_ColorMapping();
     this.themeElementsField = new CT_BaseStyles();
 }
コード例 #4
0
 public void AddNewThemeElements()
 {
     this.themeElementsField = new CT_BaseStyles();
     //return this.themeElementsField;
 }
コード例 #5
0
ファイル: BaseStylesheet.cs プロジェクト: CMONO/npoi
 public static CT_BaseStyles Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_BaseStyles ctObj = new CT_BaseStyles();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "clrScheme")
             ctObj.clrScheme = CT_ColorScheme.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "fontScheme")
             ctObj.fontScheme = CT_FontScheme.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "fmtScheme")
             ctObj.fmtScheme = CT_StyleMatrix.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
コード例 #6
0
ファイル: StyleSheet.cs プロジェクト: xoposhiy/npoi
 public CT_ClipboardStyleSheet()
 {
     this.clrMapField = new CT_ColorMapping();
     this.themeElementsField = new CT_BaseStyles();
 }
コード例 #7
0
ファイル: StyleSheet.cs プロジェクト: xoposhiy/npoi
 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 = "";
 }