npoi
264 строки · 9.2 Кб
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.Dml
8{
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;
18
19
20[Serializable]
21
22[System.ComponentModel.DesignerCategoryAttribute("code")]
23[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
24[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
25public class CT_DefaultShapeDefinition
26{
27
28private CT_ShapeProperties spPrField;
29
30private CT_TextBodyProperties bodyPrField;
31
32private CT_TextListStyle lstStyleField;
33
34private CT_ShapeStyle styleField;
35
36private CT_OfficeArtExtensionList extLstField;
37public static CT_DefaultShapeDefinition Parse(XmlNode node, XmlNamespaceManager namespaceManager)
38{
39if (node == null)
40return null;
41CT_DefaultShapeDefinition ctObj = new CT_DefaultShapeDefinition();
42foreach (XmlNode childNode in node.ChildNodes)
43{
44if (childNode.LocalName == "spPr")
45ctObj.spPr = CT_ShapeProperties.Parse(childNode, namespaceManager);
46else if (childNode.LocalName == "bodyPr")
47ctObj.bodyPr = CT_TextBodyProperties.Parse(childNode, namespaceManager);
48else if (childNode.LocalName == "lstStyle")
49ctObj.lstStyle = CT_TextListStyle.Parse(childNode, namespaceManager);
50else if (childNode.LocalName == "style")
51ctObj.style = CT_ShapeStyle.Parse(childNode, namespaceManager);
52else if (childNode.LocalName == "extLst")
53ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
54}
55return ctObj;
56}
57
58
59
60internal void Write(StreamWriter sw, string nodeName)
61{
62sw.Write(string.Format("<a:{0}", nodeName));
63sw.Write(">");
64if (this.spPr != null)
65this.spPr.Write(sw, "a:spPr");
66if (this.bodyPr != null)
67this.bodyPr.Write(sw, "bodyPr");
68if (this.lstStyle != null)
69this.lstStyle.Write(sw, "lstStyle");
70if (this.style != null)
71this.style.Write(sw, "style");
72if (this.extLst != null)
73this.extLst.Write(sw, "extLst");
74sw.Write(string.Format("</a:{0}>", nodeName));
75}
76
77public CT_DefaultShapeDefinition()
78{
79//this.extLstField = new CT_OfficeArtExtensionList();
80//this.styleField = new CT_ShapeStyle();
81//this.lstStyleField = new CT_TextListStyle();
82//this.bodyPrField = new CT_TextBodyProperties();
83//this.spPrField = new CT_ShapeProperties();
84}
85
86[XmlElement(Order = 0)]
87public CT_ShapeProperties spPr
88{
89get
90{
91return this.spPrField;
92}
93set
94{
95this.spPrField = value;
96}
97}
98
99[XmlElement(Order = 1)]
100public CT_TextBodyProperties bodyPr
101{
102get
103{
104return this.bodyPrField;
105}
106set
107{
108this.bodyPrField = value;
109}
110}
111
112[XmlElement(Order = 2)]
113public CT_TextListStyle lstStyle
114{
115get
116{
117return this.lstStyleField;
118}
119set
120{
121this.lstStyleField = value;
122}
123}
124
125[XmlElement(Order = 3)]
126public CT_ShapeStyle style
127{
128get
129{
130return this.styleField;
131}
132set
133{
134this.styleField = value;
135}
136}
137
138[XmlElement(Order = 4)]
139public CT_OfficeArtExtensionList extLst
140{
141get
142{
143return this.extLstField;
144}
145set
146{
147this.extLstField = value;
148}
149}
150}
151
152
153[Serializable]
154
155[System.ComponentModel.DesignerCategoryAttribute("code")]
156[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
157[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
158public class CT_ObjectStyleDefaults
159{
160
161private CT_DefaultShapeDefinition spDefField;
162
163private CT_DefaultShapeDefinition lnDefField;
164
165private CT_DefaultShapeDefinition txDefField;
166
167private CT_OfficeArtExtensionList extLstField;
168
169public CT_ObjectStyleDefaults()
170{
171//this.extLstField = new CT_OfficeArtExtensionList();
172//this.txDefField = new CT_DefaultShapeDefinition();
173//this.lnDefField = new CT_DefaultShapeDefinition();
174//this.spDefField = new CT_DefaultShapeDefinition();
175}
176public static CT_ObjectStyleDefaults Parse(XmlNode node, XmlNamespaceManager namespaceManager)
177{
178if (node == null)
179return null;
180CT_ObjectStyleDefaults ctObj = new CT_ObjectStyleDefaults();
181foreach (XmlNode childNode in node.ChildNodes)
182{
183if (childNode.LocalName == "spDef")
184ctObj.spDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
185else if (childNode.LocalName == "lnDef")
186ctObj.lnDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
187else if (childNode.LocalName == "txDef")
188ctObj.txDef = CT_DefaultShapeDefinition.Parse(childNode, namespaceManager);
189else if (childNode.LocalName == "extLst")
190ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
191}
192return ctObj;
193}
194
195
196
197internal void Write(StreamWriter sw, string nodeName)
198{
199sw.Write(string.Format("<a:{0}", nodeName));
200sw.Write(">");
201if (this.spDef != null)
202this.spDef.Write(sw, "spDef");
203if (this.lnDef != null)
204this.lnDef.Write(sw, "lnDef");
205if (this.txDef != null)
206this.txDef.Write(sw, "txDef");
207if (this.extLst != null)
208this.extLst.Write(sw, "extLst");
209sw.Write(string.Format("</a:{0}>", nodeName));
210}
211
212[XmlElement(Order = 0)]
213public CT_DefaultShapeDefinition spDef
214{
215get
216{
217return this.spDefField;
218}
219set
220{
221this.spDefField = value;
222}
223}
224
225[XmlElement(Order = 1)]
226public CT_DefaultShapeDefinition lnDef
227{
228get
229{
230return this.lnDefField;
231}
232set
233{
234this.lnDefField = value;
235}
236}
237
238[XmlElement(Order = 2)]
239public CT_DefaultShapeDefinition txDef
240{
241get
242{
243return this.txDefField;
244}
245set
246{
247this.txDefField = value;
248}
249}
250
251[XmlElement(Order = 3)]
252public CT_OfficeArtExtensionList extLst
253{
254get
255{
256return this.extLstField;
257}
258set
259{
260this.extLstField = value;
261}
262}
263}
264}
265