npoi
895 строк · 24.1 Кб
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 NPOI.OpenXml4Net.Util;
18using System.IO;
19
20
21
22[Serializable]
23[DebuggerStepThrough]
24[System.ComponentModel.DesignerCategoryAttribute("code")]
25[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
26[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
27public class CT_LineEndProperties
28{
29
30private ST_LineEndType typeField= ST_LineEndType.none;
31
32private ST_LineEndWidth wField= ST_LineEndWidth.sm;
33
34private ST_LineEndLength lenField= ST_LineEndLength.sm;
35
36public static CT_LineEndProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
37{
38if (node == null)
39return null;
40CT_LineEndProperties ctObj = new CT_LineEndProperties();
41if (node.Attributes["type"] != null)
42ctObj.type = (ST_LineEndType)Enum.Parse(typeof(ST_LineEndType), node.Attributes["type"].Value);
43if (node.Attributes["w"] != null)
44ctObj.w = (ST_LineEndWidth)Enum.Parse(typeof(ST_LineEndWidth), node.Attributes["w"].Value);
45if (node.Attributes["len"] != null)
46ctObj.len = (ST_LineEndLength)Enum.Parse(typeof(ST_LineEndLength), node.Attributes["len"].Value);
47return ctObj;
48}
49
50
51
52internal void Write(StreamWriter sw, string nodeName)
53{
54sw.Write(string.Format("<a:{0}", nodeName));
55if(this.type!= ST_LineEndType.none)
56XmlHelper.WriteAttribute(sw, "type", this.type.ToString());
57if (this.w != ST_LineEndWidth.sm)
58XmlHelper.WriteAttribute(sw, "w", this.w.ToString());
59if (this.len != ST_LineEndLength.sm)
60XmlHelper.WriteAttribute(sw, "len", this.len.ToString());
61sw.Write("/>");
62}
63
64[XmlAttribute]
65public ST_LineEndType type
66{
67get
68{
69return this.typeField;
70}
71set
72{
73this.typeField = value;
74}
75}
76
77
78[XmlAttribute]
79public ST_LineEndWidth w
80{
81get
82{
83return this.wField;
84}
85set
86{
87this.wField = value;
88}
89}
90
91[XmlAttribute]
92public ST_LineEndLength len
93{
94get
95{
96return this.lenField;
97}
98set
99{
100this.lenField = value;
101}
102}
103
104}
105
106
107[Serializable]
108[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
109public enum ST_LineEndType
110{
111
112/// <remarks/>
113none,
114
115/// <remarks/>
116triangle,
117
118/// <remarks/>
119stealth,
120
121/// <remarks/>
122diamond,
123
124/// <remarks/>
125oval,
126
127/// <remarks/>
128arrow,
129}
130
131
132[Serializable]
133[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
134public enum ST_LineEndWidth
135{
136
137/// <remarks/>
138sm,
139
140/// <remarks/>
141med,
142
143/// <remarks/>
144lg,
145}
146
147
148[Serializable]
149[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
150public enum ST_LineEndLength
151{
152
153/// <remarks/>
154sm,
155
156/// <remarks/>
157med,
158
159/// <remarks/>
160lg,
161}
162
163
164[Serializable]
165[DebuggerStepThrough]
166[System.ComponentModel.DesignerCategoryAttribute("code")]
167[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
168[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
169public class CT_LineJoinBevel
170{
171}
172
173
174[Serializable]
175[DebuggerStepThrough]
176[System.ComponentModel.DesignerCategoryAttribute("code")]
177[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
178[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
179public class CT_LineJoinRound
180{
181}
182
183
184[Serializable]
185[DebuggerStepThrough]
186[System.ComponentModel.DesignerCategoryAttribute("code")]
187[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
188[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
189public class CT_LineJoinMiterProperties
190{
191public static CT_LineJoinMiterProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
192{
193if (node == null)
194return null;
195CT_LineJoinMiterProperties ctObj = new CT_LineJoinMiterProperties();
196ctObj.lim = XmlHelper.ReadInt(node.Attributes["lim"]);
197return ctObj;
198}
199
200
201
202internal void Write(StreamWriter sw, string nodeName)
203{
204sw.Write(string.Format("<a:{0}", nodeName));
205XmlHelper.WriteAttribute(sw, "lim", this.lim);
206sw.Write("/>");
207}
208
209private int limField;
210
211private bool limFieldSpecified;
212
213[XmlAttribute]
214public int lim
215{
216get
217{
218return this.limField;
219}
220set
221{
222this.limField = value;
223}
224}
225
226[XmlIgnore]
227public bool limSpecified
228{
229get
230{
231return this.limFieldSpecified;
232}
233set
234{
235this.limFieldSpecified = value;
236}
237}
238}
239
240
241[Serializable]
242[DebuggerStepThrough]
243[System.ComponentModel.DesignerCategoryAttribute("code")]
244[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
245[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
246public class CT_PresetLineDashProperties
247{
248public static CT_PresetLineDashProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
249{
250if (node == null)
251return null;
252CT_PresetLineDashProperties ctObj = new CT_PresetLineDashProperties();
253if (node.Attributes["val"] != null)
254ctObj.val = (ST_PresetLineDashVal)Enum.Parse(typeof(ST_PresetLineDashVal), node.Attributes["val"].Value);
255return ctObj;
256}
257
258
259
260internal void Write(StreamWriter sw, string nodeName)
261{
262sw.Write(string.Format("<a:{0}", nodeName));
263XmlHelper.WriteAttribute(sw, "val", this.val.ToString());
264sw.Write("/>");
265}
266
267private ST_PresetLineDashVal valField;
268
269private bool valFieldSpecified;
270
271[XmlAttribute]
272public ST_PresetLineDashVal val
273{
274get
275{
276return this.valField;
277}
278set
279{
280this.valField = value;
281}
282}
283
284[XmlIgnore]
285public bool valSpecified
286{
287get
288{
289return this.valFieldSpecified;
290}
291set
292{
293this.valFieldSpecified = value;
294}
295}
296}
297
298
299[Serializable]
300[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
301public enum ST_PresetLineDashVal
302{
303
304/// <remarks/>
305solid,
306
307/// <remarks/>
308dot,
309
310/// <remarks/>
311dash,
312
313/// <remarks/>
314lgDash,
315
316/// <remarks/>
317dashDot,
318
319/// <remarks/>
320lgDashDot,
321
322/// <remarks/>
323lgDashDotDot,
324
325/// <remarks/>
326sysDash,
327
328/// <remarks/>
329sysDot,
330
331/// <remarks/>
332sysDashDot,
333
334/// <remarks/>
335sysDashDotDot,
336}
337
338
339[Serializable]
340[DebuggerStepThrough]
341[System.ComponentModel.DesignerCategoryAttribute("code")]
342[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
343[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
344public class CT_DashStop
345{
346public static CT_DashStop Parse(XmlNode node, XmlNamespaceManager namespaceManager)
347{
348if (node == null)
349return null;
350CT_DashStop ctObj = new CT_DashStop();
351ctObj.d = XmlHelper.ReadInt(node.Attributes["d"]);
352ctObj.sp = XmlHelper.ReadInt(node.Attributes["sp"]);
353return ctObj;
354}
355
356
357
358internal void Write(StreamWriter sw, string nodeName)
359{
360sw.Write(string.Format("<a:{0}", nodeName));
361XmlHelper.WriteAttribute(sw, "d", this.d);
362XmlHelper.WriteAttribute(sw, "sp", this.sp);
363sw.Write(">");
364sw.Write(string.Format("</a:{0}>", nodeName));
365}
366
367private int dField;
368
369private int spField;
370
371[XmlAttribute]
372public int d
373{
374get
375{
376return this.dField;
377}
378set
379{
380this.dField = value;
381}
382}
383
384[XmlAttribute]
385public int sp
386{
387get
388{
389return this.spField;
390}
391set
392{
393this.spField = value;
394}
395}
396}
397
398
399[Serializable]
400[DebuggerStepThrough]
401[System.ComponentModel.DesignerCategoryAttribute("code")]
402[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
403[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
404public class CT_DashStopList
405{
406
407private List<CT_DashStop> dsField;
408
409public CT_DashStopList()
410{
411//this.dsField = new List<CT_DashStop>();
412}
413
414[XmlElement("ds", Order = 0)]
415public List<CT_DashStop> ds
416{
417get
418{
419return this.dsField;
420}
421set
422{
423this.dsField = value;
424}
425}
426}
427
428
429[Serializable]
430[DebuggerStepThrough]
431[System.ComponentModel.DesignerCategoryAttribute("code")]
432[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
433[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
434public class CT_LineProperties
435{
436
437private CT_NoFillProperties noFillField;
438
439private CT_SolidColorFillProperties solidFillField;
440
441private CT_GradientFillProperties gradFillField;
442
443private CT_PatternFillProperties pattFillField;
444
445private CT_PresetLineDashProperties prstDashField;
446
447private List<CT_DashStop> custDashField;
448
449private CT_LineJoinRound roundField;
450
451private CT_LineJoinBevel bevelField;
452
453private CT_LineJoinMiterProperties miterField;
454
455private CT_LineEndProperties headEndField;
456
457private CT_LineEndProperties tailEndField;
458
459private CT_OfficeArtExtensionList extLstField;
460
461private int wField = 0;
462
463private bool wFieldSpecified;
464
465private ST_LineCap capField = ST_LineCap.NONE;
466
467private bool capFieldSpecified;
468
469private ST_CompoundLine cmpdField = ST_CompoundLine.NONE;
470
471private bool cmpdFieldSpecified;
472
473private ST_PenAlignment algnField = ST_PenAlignment.NONE;
474
475private bool algnFieldSpecified;
476public static CT_LineProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
477{
478if (node == null)
479return null;
480CT_LineProperties ctObj = new CT_LineProperties();
481ctObj.w = XmlHelper.ReadInt(node.Attributes["w"]);
482if (node.Attributes["cap"] != null)
483ctObj.cap = (ST_LineCap)Enum.Parse(typeof(ST_LineCap), node.Attributes["cap"].Value);
484if (node.Attributes["cmpd"] != null)
485ctObj.cmpd = (ST_CompoundLine)Enum.Parse(typeof(ST_CompoundLine), node.Attributes["cmpd"].Value);
486if (node.Attributes["algn"] != null)
487ctObj.algn = (ST_PenAlignment)Enum.Parse(typeof(ST_PenAlignment), node.Attributes["algn"].Value);
488ctObj.custDash = new List<CT_DashStop>();
489foreach (XmlNode childNode in node.ChildNodes)
490{
491if (childNode.LocalName == "noFill")
492ctObj.noFill = new CT_NoFillProperties();
493else if (childNode.LocalName == "solidFill")
494ctObj.solidFill = CT_SolidColorFillProperties.Parse(childNode, namespaceManager);
495else if (childNode.LocalName == "gradFill")
496ctObj.gradFill = CT_GradientFillProperties.Parse(childNode, namespaceManager);
497else if (childNode.LocalName == "pattFill")
498ctObj.pattFill = CT_PatternFillProperties.Parse(childNode, namespaceManager);
499else if (childNode.LocalName == "prstDash")
500ctObj.prstDash = CT_PresetLineDashProperties.Parse(childNode, namespaceManager);
501else if (childNode.LocalName == "round")
502ctObj.round = new CT_LineJoinRound();
503else if (childNode.LocalName == "bevel")
504ctObj.bevel = new CT_LineJoinBevel();
505else if (childNode.LocalName == "miter")
506ctObj.miter = CT_LineJoinMiterProperties.Parse(childNode, namespaceManager);
507else if (childNode.LocalName == "headEnd")
508ctObj.headEnd = CT_LineEndProperties.Parse(childNode, namespaceManager);
509else if (childNode.LocalName == "tailEnd")
510ctObj.tailEnd = CT_LineEndProperties.Parse(childNode, namespaceManager);
511else if (childNode.LocalName == "extLst")
512ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
513else if (childNode.LocalName == "custDash")
514ctObj.custDash.Add(CT_DashStop.Parse(childNode, namespaceManager));
515}
516return ctObj;
517}
518
519
520
521internal void Write(StreamWriter sw, string nodeName)
522{
523sw.Write(string.Format("<a:{0}", nodeName));
524XmlHelper.WriteAttribute(sw, "w", this.w);
525if(this.cap!= ST_LineCap.NONE)
526XmlHelper.WriteAttribute(sw, "cap", this.cap.ToString());
527if(this.cmpd != ST_CompoundLine.NONE)
528XmlHelper.WriteAttribute(sw, "cmpd", this.cmpd.ToString());
529if(this.algn!= ST_PenAlignment.NONE)
530XmlHelper.WriteAttribute(sw, "algn", this.algn.ToString());
531sw.Write(">");
532if (this.noFill != null)
533sw.Write("<a:noFill/>");
534if (this.solidFill != null)
535this.solidFill.Write(sw, "solidFill");
536if (this.gradFill != null)
537this.gradFill.Write(sw, "gradFill");
538if (this.pattFill != null)
539this.pattFill.Write(sw, "pattFill");
540if (this.prstDash != null)
541this.prstDash.Write(sw, "prstDash");
542if (this.custDash != null)
543{
544foreach (CT_DashStop x in this.custDash)
545{
546x.Write(sw, "custDash");
547}
548}
549if (this.round != null)
550sw.Write("<a:round/>");
551if (this.bevel != null)
552sw.Write("<a:bevel/>");
553if (this.miter != null)
554this.miter.Write(sw, "miter");
555if (this.headEnd != null)
556this.headEnd.Write(sw, "headEnd");
557if (this.tailEnd != null)
558this.tailEnd.Write(sw, "tailEnd");
559if (this.extLst != null)
560this.extLst.Write(sw, "extLst");
561
562sw.Write(string.Format("</a:{0}>", nodeName));
563}
564
565public CT_LineProperties()
566{
567
568}
569
570[XmlElement(Order = 0)]
571public CT_NoFillProperties noFill
572{
573get
574{
575return this.noFillField;
576}
577set
578{
579this.noFillField = value;
580}
581}
582
583[XmlElement(Order = 1)]
584public CT_SolidColorFillProperties solidFill
585{
586get
587{
588return this.solidFillField;
589}
590set
591{
592this.solidFillField = value;
593}
594}
595
596[XmlElement(Order = 2)]
597public CT_GradientFillProperties gradFill
598{
599get
600{
601return this.gradFillField;
602}
603set
604{
605this.gradFillField = value;
606}
607}
608
609[XmlElement(Order = 3)]
610public CT_PatternFillProperties pattFill
611{
612get
613{
614return this.pattFillField;
615}
616set
617{
618this.pattFillField = value;
619}
620}
621
622[XmlElement(Order = 4)]
623public CT_PresetLineDashProperties prstDash
624{
625get
626{
627return this.prstDashField;
628}
629set
630{
631this.prstDashField = value;
632}
633}
634
635[XmlElement(Order = 5)]
636public List<CT_DashStop> custDash
637{
638get
639{
640return this.custDashField;
641}
642set
643{
644this.custDashField = value;
645}
646}
647
648[XmlElement(Order = 6)]
649public CT_LineJoinRound round
650{
651get
652{
653return this.roundField;
654}
655set
656{
657this.roundField = value;
658}
659}
660
661[XmlElement(Order = 7)]
662public CT_LineJoinBevel bevel
663{
664get
665{
666return this.bevelField;
667}
668set
669{
670this.bevelField = value;
671}
672}
673
674[XmlElement(Order = 8)]
675public CT_LineJoinMiterProperties miter
676{
677get
678{
679return this.miterField;
680}
681set
682{
683this.miterField = value;
684}
685}
686
687[XmlElement(Order = 9)]
688public CT_LineEndProperties headEnd
689{
690get
691{
692return this.headEndField;
693}
694set
695{
696this.headEndField = value;
697}
698}
699
700[XmlElement(Order = 10)]
701public CT_LineEndProperties tailEnd
702{
703get
704{
705return this.tailEndField;
706}
707set
708{
709this.tailEndField = value;
710}
711}
712
713[XmlElement(Order = 11)]
714public CT_OfficeArtExtensionList extLst
715{
716get
717{
718return this.extLstField;
719}
720set
721{
722this.extLstField = value;
723}
724}
725
726[XmlAttribute]
727public int w
728{
729get
730{
731return this.wField;
732}
733set
734{
735this.wField = value;
736}
737}
738
739[XmlIgnore]
740public bool wSpecified
741{
742get
743{
744return this.wFieldSpecified;
745}
746set
747{
748this.wFieldSpecified = value;
749}
750}
751
752[XmlAttribute]
753public ST_LineCap cap
754{
755get
756{
757return this.capField;
758}
759set
760{
761this.capField = value;
762}
763}
764
765[XmlIgnore]
766public bool capSpecified
767{
768get
769{
770return ST_LineCap.NONE != capField;
771//return this.capFieldSpecified;
772}
773set
774{
775this.capFieldSpecified = value;
776}
777}
778
779[XmlAttribute]
780public ST_CompoundLine cmpd
781{
782get
783{
784return this.cmpdField;
785}
786set
787{
788this.cmpdField = value;
789}
790}
791
792[XmlIgnore]
793public bool cmpdSpecified
794{
795get
796{
797return ST_CompoundLine.NONE != this.cmpdField;
798//return this.cmpdFieldSpecified;
799}
800set
801{
802this.cmpdFieldSpecified = value;
803}
804}
805
806[XmlAttribute]
807public ST_PenAlignment algn
808{
809get
810{
811return this.algnField;
812}
813set
814{
815this.algnField = value;
816}
817}
818
819[XmlIgnore]
820public bool algnSpecified
821{
822get
823{
824return ST_PenAlignment.NONE != this.algnField;
825//return this.algnFieldSpecified;
826}
827set
828{
829this.algnFieldSpecified = value;
830}
831}
832
833public CT_SolidColorFillProperties AddNewSolidFill()
834{
835this.solidFillField = new CT_SolidColorFillProperties();
836return this.solidFillField;
837}
838public bool IsSetSolidFill()
839{
840return this.solidFillField != null;
841}
842
843}
844
845
846[Serializable]
847[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
848public enum ST_LineCap
849{
850NONE,
851/// <remarks/>
852rnd,
853
854/// <remarks/>
855sq,
856
857/// <remarks/>
858flat,
859}
860
861
862[Serializable]
863[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
864public enum ST_CompoundLine
865{
866NONE,
867/// <remarks/>
868sng,
869
870/// <remarks/>
871dbl,
872
873/// <remarks/>
874thickThin,
875
876/// <remarks/>
877thinThick,
878
879/// <remarks/>
880tri,
881}
882
883
884[Serializable]
885[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
886public enum ST_PenAlignment
887{
888NONE,
889/// <remarks/>
890ctr,
891
892/// <remarks/>
893@in,
894}
895}
896