npoi
703 строки · 21.7 Кб
1// ------------------------------------------------------------------------------
2// <auto-generated>
3// Generated by Xsd2Code. Version 3.4.0.38967
4// <NameSpace>NPOI.OpenXmlFormats.Dml</NameSpace><Collection>List</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>False</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net20</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><EnableEncoding>False</EnableEncoding><AutomaticProperties>False</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>True</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>True</ExcludeIncludedTypes><EnableInitializeFields>True</EnableInitializeFields>
5// </auto-generated>
6// ------------------------------------------------------------------------------
7namespace NPOI.OpenXmlFormats.Dml8{
9using System;10using System.Diagnostics;11using System.Xml.Serialization;12using System.Collections;13using System.Xml.Schema;14using System.ComponentModel;15using System.Collections.Generic;16using System.Xml;17using System.IO;18using NPOI.OpenXml4Net.Util;19
20
21[Serializable]22[DebuggerStepThrough]23[System.ComponentModel.DesignerCategoryAttribute("code")]24[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]25[XmlRoot("themeManager", Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = false)]26public class CT_EmptyElement27{28}29
30[Serializable]31[DebuggerStepThrough]32[System.ComponentModel.DesignerCategoryAttribute("code")]33[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]34[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]35public partial class CT_ColorMapping36{37
38private CT_OfficeArtExtensionList extLstField;39
40private ST_ColorSchemeIndex bg1Field;41
42private ST_ColorSchemeIndex tx1Field;43
44private ST_ColorSchemeIndex bg2Field;45
46private ST_ColorSchemeIndex tx2Field;47
48private ST_ColorSchemeIndex accent1Field;49
50private ST_ColorSchemeIndex accent2Field;51
52private ST_ColorSchemeIndex accent3Field;53
54private ST_ColorSchemeIndex accent4Field;55
56private ST_ColorSchemeIndex accent5Field;57
58private ST_ColorSchemeIndex accent6Field;59
60private ST_ColorSchemeIndex hlinkField;61
62private ST_ColorSchemeIndex folHlinkField;63
64public static CT_ColorMapping Parse(XmlNode node, XmlNamespaceManager namespaceManager)65{66if (node == null)67return null;68CT_ColorMapping ctObj = new CT_ColorMapping();69if (node.Attributes["bg1"] != null)70ctObj.bg1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["bg1"].Value);71if (node.Attributes["tx1"] != null)72ctObj.tx1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["tx1"].Value);73if (node.Attributes["bg2"] != null)74ctObj.bg2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["bg2"].Value);75if (node.Attributes["tx2"] != null)76ctObj.tx2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["tx2"].Value);77if (node.Attributes["accent1"] != null)78ctObj.accent1 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent1"].Value);79if (node.Attributes["accent2"] != null)80ctObj.accent2 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent2"].Value);81if (node.Attributes["accent3"] != null)82ctObj.accent3 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent3"].Value);83if (node.Attributes["accent4"] != null)84ctObj.accent4 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent4"].Value);85if (node.Attributes["accent5"] != null)86ctObj.accent5 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent5"].Value);87if (node.Attributes["accent6"] != null)88ctObj.accent6 = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["accent6"].Value);89if (node.Attributes["hlink"] != null)90ctObj.hlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["hlink"].Value);91if (node.Attributes["folHlink"] != null)92ctObj.folHlink = (ST_ColorSchemeIndex)Enum.Parse(typeof(ST_ColorSchemeIndex), node.Attributes["folHlink"].Value);93foreach (XmlNode childNode in node.ChildNodes)94{95if (childNode.LocalName == "extLst")96ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);97}98return ctObj;99}100
101
102
103internal void Write(StreamWriter sw, string nodeName)104{105sw.Write(string.Format("<a:{0}", nodeName));106XmlHelper.WriteAttribute(sw, "bg1", this.bg1.ToString());107XmlHelper.WriteAttribute(sw, "tx1", this.tx1.ToString());108XmlHelper.WriteAttribute(sw, "bg2", this.bg2.ToString());109XmlHelper.WriteAttribute(sw, "tx2", this.tx2.ToString());110XmlHelper.WriteAttribute(sw, "accent1", this.accent1.ToString());111XmlHelper.WriteAttribute(sw, "accent2", this.accent2.ToString());112XmlHelper.WriteAttribute(sw, "accent3", this.accent3.ToString());113XmlHelper.WriteAttribute(sw, "accent4", this.accent4.ToString());114XmlHelper.WriteAttribute(sw, "accent5", this.accent5.ToString());115XmlHelper.WriteAttribute(sw, "accent6", this.accent6.ToString());116XmlHelper.WriteAttribute(sw, "hlink", this.hlink.ToString());117XmlHelper.WriteAttribute(sw, "folHlink", this.folHlink.ToString());118sw.Write(">");119if (this.extLst != null)120this.extLst.Write(sw, "extLst");121sw.Write(string.Format("</a:{0}>", nodeName));122}123
124public CT_ColorMapping()125{126//this.extLstField = new CT_OfficeArtExtensionList();127}128
129[XmlElement(Order = 0)]130public CT_OfficeArtExtensionList extLst131{132get133{134return this.extLstField;135}136set137{138this.extLstField = value;139}140}141
142[XmlAttribute]143public ST_ColorSchemeIndex bg1144{145get146{147return this.bg1Field;148}149set150{151this.bg1Field = value;152}153}154
155[XmlAttribute]156public ST_ColorSchemeIndex tx1157{158get159{160return this.tx1Field;161}162set163{164this.tx1Field = value;165}166}167
168[XmlAttribute]169public ST_ColorSchemeIndex bg2170{171get172{173return this.bg2Field;174}175set176{177this.bg2Field = value;178}179}180
181[XmlAttribute]182public ST_ColorSchemeIndex tx2183{184get185{186return this.tx2Field;187}188set189{190this.tx2Field = value;191}192}193
194[XmlAttribute]195public ST_ColorSchemeIndex accent1196{197get198{199return this.accent1Field;200}201set202{203this.accent1Field = value;204}205}206
207[XmlAttribute]208public ST_ColorSchemeIndex accent2209{210get211{212return this.accent2Field;213}214set215{216this.accent2Field = value;217}218}219
220[XmlAttribute]221public ST_ColorSchemeIndex accent3222{223get224{225return this.accent3Field;226}227set228{229this.accent3Field = value;230}231}232
233[XmlAttribute]234public ST_ColorSchemeIndex accent4235{236get237{238return this.accent4Field;239}240set241{242this.accent4Field = value;243}244}245
246[XmlAttribute]247public ST_ColorSchemeIndex accent5248{249get250{251return this.accent5Field;252}253set254{255this.accent5Field = value;256}257}258
259[XmlAttribute]260public ST_ColorSchemeIndex accent6261{262get263{264return this.accent6Field;265}266set267{268this.accent6Field = value;269}270}271
272[XmlAttribute]273public ST_ColorSchemeIndex hlink274{275get276{277return this.hlinkField;278}279set280{281this.hlinkField = value;282}283}284
285[XmlAttribute]286public ST_ColorSchemeIndex folHlink287{288get289{290return this.folHlinkField;291}292set293{294this.folHlinkField = value;295}296}297}298
299
300[Serializable]301[DebuggerStepThrough]302[System.ComponentModel.DesignerCategoryAttribute("code")]303[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]304[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]305public partial class CT_ColorMappingOverride306{307
308private object itemField;309
310[XmlElement("masterClrMapping", typeof(CT_EmptyElement), Order = 0)]311[XmlElement("overrideClrMapping", typeof(CT_ColorMapping), Order = 0)]312public object Item313{314get315{316return this.itemField;317}318set319{320this.itemField = value;321}322}323}324
325
326[Serializable]327[DebuggerStepThrough]328[System.ComponentModel.DesignerCategoryAttribute("code")]329[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]330[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]331public partial class CT_ColorSchemeAndMapping332{333
334private CT_ColorScheme clrSchemeField;335
336private CT_ColorMapping clrMapField;337
338public static CT_ColorSchemeAndMapping Parse(XmlNode node, XmlNamespaceManager namespaceManager)339{340if (node == null)341return null;342CT_ColorSchemeAndMapping ctObj = new CT_ColorSchemeAndMapping();343foreach (XmlNode childNode in node.ChildNodes)344{345if (childNode.LocalName == "clrScheme")346ctObj.clrScheme = CT_ColorScheme.Parse(childNode, namespaceManager);347else if (childNode.LocalName == "clrMap")348ctObj.clrMap = CT_ColorMapping.Parse(childNode, namespaceManager);349}350return ctObj;351}352
353
354
355internal void Write(StreamWriter sw, string nodeName)356{357sw.Write(string.Format("<a:{0}", nodeName));358sw.Write(">");359if (this.clrScheme != null)360this.clrScheme.Write(sw, "clrScheme");361if (this.clrMap != null)362this.clrMap.Write(sw, "clrMap");363sw.Write(string.Format("</a:{0}>", nodeName));364}365
366public CT_ColorSchemeAndMapping()367{368//this.clrMapField = new CT_ColorMapping();369//this.clrSchemeField = new CT_ColorScheme();370}371
372[XmlElement(Order = 0)]373public CT_ColorScheme clrScheme374{375get376{377return this.clrSchemeField;378}379set380{381this.clrSchemeField = value;382}383}384
385[XmlElement(Order = 1)]386public CT_ColorMapping clrMap387{388get389{390return this.clrMapField;391}392set393{394this.clrMapField = value;395}396}397}398
399
400[Serializable]401[DebuggerStepThrough]402[System.ComponentModel.DesignerCategoryAttribute("code")]403[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]404[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]405public partial class CT_ColorSchemeList406{407
408private List<CT_ColorSchemeAndMapping> extraClrSchemeField;409
410public CT_ColorSchemeList()411{412this.extraClrSchemeField = new List<CT_ColorSchemeAndMapping>();413}414
415[XmlElement("extraClrScheme", Order = 0)]416public List<CT_ColorSchemeAndMapping> extraClrScheme417{418get419{420return this.extraClrSchemeField;421}422set423{424this.extraClrSchemeField = value;425}426}427}428
429
430[Serializable]431[DebuggerStepThrough]432[System.ComponentModel.DesignerCategoryAttribute("code")]433[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]434[XmlRoot("theme", Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = false)]435public class CT_OfficeStyleSheet436{437
438private CT_BaseStyles themeElementsField;439
440private CT_ObjectStyleDefaults objectDefaultsField;441
442private List<CT_ColorSchemeAndMapping> extraClrSchemeLstField;443
444private List<CT_CustomColor> custClrLstField;445
446private CT_OfficeArtExtensionList extLstField;447
448private string nameField;449
450public CT_OfficeStyleSheet()451{452}453public static CT_OfficeStyleSheet Parse(XmlNode node, XmlNamespaceManager namespaceManager)454{455if (node == null)456return null;457CT_OfficeStyleSheet ctObj = new CT_OfficeStyleSheet();458ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);459ctObj.custClrLst = new List<CT_CustomColor>();460foreach (XmlNode childNode in node.ChildNodes)461{462if (childNode.LocalName == "themeElements")463ctObj.themeElements = CT_BaseStyles.Parse(childNode, namespaceManager);464else if (childNode.LocalName == "objectDefaults")465ctObj.objectDefaults = CT_ObjectStyleDefaults.Parse(childNode, namespaceManager);466else if (childNode.LocalName == "extLst")467ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);468else if (childNode.LocalName == "extraClrSchemeLst")469{470if(ctObj.extraClrSchemeLst==null)471ctObj.extraClrSchemeLst= new List<CT_ColorSchemeAndMapping>();472ctObj.extraClrSchemeLst.Add(CT_ColorSchemeAndMapping.Parse(childNode, namespaceManager));473}474else if (childNode.LocalName == "custClrLst")475ctObj.custClrLst.Add(CT_CustomColor.Parse(childNode, namespaceManager));476}477return ctObj;478}479
480
481
482internal void Write(StreamWriter sw)483{484sw.Write("<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"");485XmlHelper.WriteAttribute(sw, "name", this.name);486sw.Write(">");487if (this.themeElements != null)488this.themeElements.Write(sw, "themeElements");489if (this.objectDefaults != null)490this.objectDefaults.Write(sw, "objectDefaults");491if (this.extraClrSchemeLst != null)492{493foreach (CT_ColorSchemeAndMapping x in this.extraClrSchemeLst)494{495x.Write(sw, "extraClrSchemeLst");496}497}498if (this.extLst != null)499this.extLst.Write(sw, "extLst");500if (this.custClrLst != null)501{502foreach (CT_CustomColor x in this.custClrLst)503{504x.Write(sw, "custClrLst");505}506}507sw.Write(string.Format("</a:theme>"));508}509
510public void AddNewThemeElements()511{512this.themeElementsField = new CT_BaseStyles();513//return this.themeElementsField;514}515
516[XmlElement]517public CT_BaseStyles themeElements518{519get520{521return this.themeElementsField;522}523set524{525this.themeElementsField = value;526}527}528
529[XmlElement]530public CT_ObjectStyleDefaults objectDefaults531{532get533{534return this.objectDefaultsField;535}536set537{538this.objectDefaultsField = value;539}540}541
542[XmlElement]543public List<CT_ColorSchemeAndMapping> extraClrSchemeLst544{545get546{547return this.extraClrSchemeLstField;548}549set550{551this.extraClrSchemeLstField = value;552}553}554
555[XmlElement]556public List<CT_CustomColor> custClrLst557{558get559{560return this.custClrLstField;561}562set563{564this.custClrLstField = value;565}566}567
568[XmlElement]569public CT_OfficeArtExtensionList extLst570{571get572{573return this.extLstField;574}575set576{577this.extLstField = value;578}579}580
581[XmlAttribute]582[DefaultValue("")]583public string name584{585get586{587return this.nameField;588}589set590{591this.nameField = value;592}593}594}595
596
597[Serializable]598[DebuggerStepThrough]599[System.ComponentModel.DesignerCategoryAttribute("code")]600[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]601[XmlRoot("themeOverride", Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = false)]602public partial class CT_BaseStylesOverride603{604
605private CT_ColorScheme clrSchemeField;606
607private CT_FontScheme fontSchemeField;608
609private CT_StyleMatrix fmtSchemeField;610
611public CT_BaseStylesOverride()612{613this.fmtSchemeField = new CT_StyleMatrix();614this.fontSchemeField = new CT_FontScheme();615this.clrSchemeField = new CT_ColorScheme();616}617
618[XmlElement(Order = 0)]619public CT_ColorScheme clrScheme620{621get622{623return this.clrSchemeField;624}625set626{627this.clrSchemeField = value;628}629}630
631[XmlElement(Order = 1)]632public CT_FontScheme fontScheme633{634get635{636return this.fontSchemeField;637}638set639{640this.fontSchemeField = value;641}642}643
644[XmlElement(Order = 2)]645public CT_StyleMatrix fmtScheme646{647get648{649return this.fmtSchemeField;650}651set652{653this.fmtSchemeField = value;654}655}656}657
658
659[Serializable]660[DebuggerStepThrough]661[System.ComponentModel.DesignerCategoryAttribute("code")]662[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]663[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]664public partial class CT_ClipboardStyleSheet665{666
667private CT_BaseStyles themeElementsField;668
669private CT_ColorMapping clrMapField;670
671public CT_ClipboardStyleSheet()672{673this.clrMapField = new CT_ColorMapping();674this.themeElementsField = new CT_BaseStyles();675}676
677[XmlElement(Order = 0)]678public CT_BaseStyles themeElements679{680get681{682return this.themeElementsField;683}684set685{686this.themeElementsField = value;687}688}689
690[XmlElement(Order = 1)]691public CT_ColorMapping clrMap692{693get694{695return this.clrMapField;696}697set698{699this.clrMapField = value;700}701}702}703}
704