npoi
1788 строк · 47.9 Кб
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.IO;
17using System.Xml;
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(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
26public class CT_TextSpacingPercent
27{
28public static CT_TextSpacingPercent Parse(XmlNode node, XmlNamespaceManager namespaceManager)
29{
30if (node == null)
31return null;
32CT_TextSpacingPercent ctObj = new CT_TextSpacingPercent();
33ctObj.val = XmlHelper.ReadInt(node.Attributes["val"]);
34return ctObj;
35}
36
37
38
39internal void Write(StreamWriter sw, string nodeName)
40{
41sw.Write(string.Format("<a:{0}", nodeName));
42XmlHelper.WriteAttribute(sw, "val", this.val, true);
43sw.Write("/>");
44}
45
46private int valField;
47/*<xsd:restriction base="ST_Percentage">
48<xsd:minInclusive value="0" />
49<xsd:maxInclusive value="13200000" />
50</xsd:restriction>*/
51[XmlAttribute]
52public int val
53{
54get
55{
56return this.valField;
57}
58set
59{
60this.valField = value;
61}
62}
63}
64
65
66[Serializable]
67[DebuggerStepThrough]
68[System.ComponentModel.DesignerCategoryAttribute("code")]
69[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
70[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
71public class CT_TextSpacingPoint
72{
73public static CT_TextSpacingPoint Parse(XmlNode node, XmlNamespaceManager namespaceManager)
74{
75if (node == null)
76return null;
77CT_TextSpacingPoint ctObj = new CT_TextSpacingPoint();
78ctObj.val = XmlHelper.ReadInt(node.Attributes["val"]);
79return ctObj;
80}
81
82
83
84internal void Write(StreamWriter sw, string nodeName)
85{
86sw.Write(string.Format("<a:{0}", nodeName));
87XmlHelper.WriteAttribute(sw, "val", this.val, true);
88sw.Write("/>");
89}
90
91private int valField;
92/*<xsd:restriction base="xsd:int">
93<xsd:minInclusive value="0" />
94<xsd:maxInclusive value="158400" />
95</xsd:restriction>*/
96[XmlAttribute]
97public int val
98{
99get
100{
101return this.valField;
102}
103set
104{
105this.valField = value;
106}
107}
108}
109
110
111[Serializable]
112[DebuggerStepThrough]
113[System.ComponentModel.DesignerCategoryAttribute("code")]
114[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
115[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
116public class CT_TextTabStop
117{
118
119private int posField;
120
121private bool posFieldSpecified;
122
123private ST_TextTabAlignType algnField;
124
125private bool algnFieldSpecified;
126public static CT_TextTabStop Parse(XmlNode node, XmlNamespaceManager namespaceManager)
127{
128if (node == null)
129return null;
130CT_TextTabStop ctObj = new CT_TextTabStop();
131ctObj.pos = XmlHelper.ReadInt(node.Attributes["pos"]);
132if (node.Attributes["algn"] != null)
133ctObj.algn = (ST_TextTabAlignType)Enum.Parse(typeof(ST_TextTabAlignType), node.Attributes["algn"].Value);
134return ctObj;
135}
136
137
138
139internal void Write(StreamWriter sw, string nodeName)
140{
141sw.Write(string.Format("<a:{0}", nodeName));
142XmlHelper.WriteAttribute(sw, "pos", this.pos);
143XmlHelper.WriteAttribute(sw, "algn", this.algn.ToString());
144sw.Write("/>");
145}
146
147[XmlAttribute]
148public int pos
149{
150get
151{
152return this.posField;
153}
154set
155{
156this.posField = value;
157}
158}
159
160[XmlIgnore]
161public bool posSpecified
162{
163get
164{
165return this.posFieldSpecified;
166}
167set
168{
169this.posFieldSpecified = value;
170}
171}
172
173[XmlAttribute]
174public ST_TextTabAlignType algn
175{
176get
177{
178return this.algnField;
179}
180set
181{
182this.algnField = value;
183}
184}
185
186[XmlIgnore]
187public bool algnSpecified
188{
189get
190{
191return this.algnFieldSpecified;
192}
193set
194{
195this.algnFieldSpecified = value;
196}
197}
198}
199
200
201[Serializable]
202[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
203public enum ST_TextTabAlignType
204{
205
206/// <remarks/>
207l,
208
209/// <remarks/>
210ctr,
211
212/// <remarks/>
213r,
214
215/// <remarks/>
216dec,
217}
218
219
220[Serializable]
221[DebuggerStepThrough]
222[System.ComponentModel.DesignerCategoryAttribute("code")]
223[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
224[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
225public class CT_TextTabStopList
226{
227
228private List<CT_TextTabStop> tabField;
229
230public CT_TextTabStopList()
231{
232this.tabField = new List<CT_TextTabStop>();
233}
234
235[XmlElement("tab", Order = 0)]
236public List<CT_TextTabStop> tab
237{
238get
239{
240return this.tabField;
241}
242set
243{
244this.tabField = value;
245}
246}
247
248internal void Write(StreamWriter sw, string p)
249{
250sw.Write("<a:{0}>", p);
251if (this.tab != null)
252{
253foreach (CT_TextTabStop tts in tab)
254{
255tts.Write(sw, "tab");
256}
257}
258sw.Write("</a:{0}>", p);
259}
260
261internal static CT_TextTabStopList Parse(XmlNode node, XmlNamespaceManager namespaceManager)
262{
263CT_TextTabStopList ttsl = new CT_TextTabStopList();
264ttsl.tab = new List<CT_TextTabStop>();
265foreach (XmlNode childNode in node)
266{
267if(childNode.LocalName=="tab")
268ttsl.tab.Add(CT_TextTabStop.Parse(childNode, namespaceManager));
269}
270return ttsl;
271}
272
273public CT_TextTabStop AddNewTab()
274{
275this.tabField.Add(new CT_TextTabStop());
276return this.tabField[this.tabField.Count - 1];
277}
278
279public int SizeOfTabArray()
280{
281return tabField.Count;
282}
283
284public CT_TextTabStop GetTabArray(int idx)
285{
286return tabField[idx];
287}
288}
289
290
291[Serializable]
292[DebuggerStepThrough]
293[System.ComponentModel.DesignerCategoryAttribute("code")]
294[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
295[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
296public class CT_TextLineBreak
297{
298
299private CT_TextCharacterProperties rPrField;
300
301public CT_TextLineBreak()
302{
303//this.rPrField = new CT_TextCharacterProperties();
304}
305
306public static CT_TextLineBreak Parse(XmlNode node, XmlNamespaceManager namespaceManager)
307{
308if (node == null)
309return null;
310CT_TextLineBreak ctObj = new CT_TextLineBreak();
311foreach (XmlNode childNode in node.ChildNodes)
312{
313if (childNode.LocalName == "rPr")
314ctObj.rPr = CT_TextCharacterProperties.Parse(childNode, namespaceManager);
315}
316return ctObj;
317}
318
319
320
321internal void Write(StreamWriter sw, string nodeName)
322{
323sw.Write(string.Format("<a:{0}>", nodeName));
324if (this.rPr != null)
325this.rPr.Write(sw, "rPr");
326sw.Write(string.Format("</a:{0}>", nodeName));
327}
328
329[XmlElement(Order = 0)]
330public CT_TextCharacterProperties rPr
331{
332get
333{
334return this.rPrField;
335}
336set
337{
338this.rPrField = value;
339}
340}
341
342public CT_TextCharacterProperties AddNewRPr()
343{
344this.rPr = new CT_TextCharacterProperties();
345return rPr;
346}
347}
348
349[Serializable]
350[DebuggerStepThrough]
351[System.ComponentModel.DesignerCategoryAttribute("code")]
352[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
353[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
354public class CT_TextSpacing
355{
356private CT_TextSpacingPercent spcPctField;
357private CT_TextSpacingPoint spcPtsField;
358public static CT_TextSpacing Parse(XmlNode node, XmlNamespaceManager namespaceManager)
359{
360if (node == null)
361return null;
362CT_TextSpacing ctObj = new CT_TextSpacing();
363foreach (XmlNode childNode in node.ChildNodes)
364{
365if (childNode.LocalName == "spcPct")
366ctObj.spcPct = CT_TextSpacingPercent.Parse(childNode, namespaceManager);
367else if (childNode.LocalName == "spcPts")
368ctObj.spcPts = CT_TextSpacingPoint.Parse(childNode, namespaceManager);
369}
370return ctObj;
371}
372
373
374
375internal void Write(StreamWriter sw, string nodeName)
376{
377sw.Write(string.Format("<a:{0}>", nodeName));
378if (this.spcPct != null)
379this.spcPct.Write(sw, "spcPct");
380if (this.spcPts != null)
381this.spcPts.Write(sw, "spcPts");
382sw.Write(string.Format("</a:{0}>", nodeName));
383}
384public CT_TextSpacingPercent spcPct
385{
386get { return this.spcPctField; }
387set { this.spcPctField = value; }
388}
389public CT_TextSpacingPoint spcPts
390{
391get { return this.spcPtsField; }
392set { this.spcPtsField = value; }
393}
394
395public CT_TextSpacingPercent AddNewSpcPct()
396{
397this.spcPctField = new CT_TextSpacingPercent();
398return this.spcPctField;
399}
400
401public CT_TextSpacingPoint AddNewSpcPts()
402{
403this.spcPtsField = new CT_TextSpacingPoint();
404return this.spcPtsField;
405}
406
407public bool IsSetSpcPct()
408{
409return this.spcPctField != null;
410}
411
412public bool IsSetSpcPts()
413{
414return this.spcPtsField != null;
415}
416}
417
418
419[Serializable]
420[System.Diagnostics.DebuggerStepThrough]
421[System.ComponentModel.DesignerCategory("code")]
422[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
423[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
424public class CT_TextParagraph
425{
426public static CT_TextParagraph Parse(XmlNode node, XmlNamespaceManager namespaceManager)
427{
428if (node == null)
429return null;
430CT_TextParagraph ctObj = new CT_TextParagraph();
431ctObj.r = new List<CT_RegularTextRun>();
432ctObj.br = new List<CT_TextLineBreak>();
433ctObj.fld = new List<CT_TextField>();
434ctObj.items = new List<object>();
435foreach (XmlNode childNode in node.ChildNodes)
436{
437if (childNode.LocalName == "pPr")
438{
439ctObj.pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);
440ctObj.items.Add(ctObj.pPr);
441}
442else if (childNode.LocalName == "endParaRPr")
443{
444ctObj.endParaRPr = CT_TextCharacterProperties.Parse(childNode, namespaceManager);
445ctObj.items.Add(ctObj.endParaRPr);
446}
447else if (childNode.LocalName == "r")
448{
449CT_RegularTextRun r = CT_RegularTextRun.Parse(childNode, namespaceManager);
450ctObj.r.Add(r);
451ctObj.items.Add(r);
452}
453else if (childNode.LocalName == "br")
454{
455CT_TextLineBreak br = CT_TextLineBreak.Parse(childNode, namespaceManager);
456ctObj.br.Add(br);
457ctObj.items.Add(br);
458}
459else if (childNode.LocalName == "fld")
460{
461CT_TextField fld = CT_TextField.Parse(childNode, namespaceManager);
462ctObj.fld.Add(fld);
463ctObj.items.Add(fld);
464}
465}
466return ctObj;
467}
468
469
470
471internal void Write(StreamWriter sw, string nodeName)
472{
473sw.Write(string.Format("<a:{0}", nodeName));
474sw.Write(">");
475if (this.pPr != null)
476this.pPr.Write(sw, "pPr");
477//if (this.r != null)
478//{
479// foreach (CT_RegularTextRun x in this.r)
480// {
481// x.Write(sw, "r");
482// }
483//}
484//if (this.br != null)
485//{
486// foreach (CT_TextLineBreak x in this.br)
487// {
488// x.Write(sw, "br");
489// }
490//}
491//if (this.fld != null)
492//{
493// foreach (CT_TextField x in this.fld)
494// {
495// x.Write(sw, "fld");
496// }
497//}
498foreach (object o in items)
499{
500if (o is CT_RegularTextRun)
501{
502(o as CT_RegularTextRun).Write(sw, "r");
503}
504else if (o is CT_TextLineBreak)
505{
506(o as CT_TextLineBreak).Write(sw, "br");
507}
508else if (o is CT_TextField)
509{
510(o as CT_TextField).Write(sw, "fld");
511}
512}
513if (this.endParaRPr != null)
514this.endParaRPr.Write(sw, "endParaRPr");
515sw.Write(string.Format("</a:{0}>", nodeName));
516}
517
518private CT_TextParagraphProperties pPrField;
519
520private List<CT_RegularTextRun> rField = new List<CT_RegularTextRun>();
521
522private List<CT_TextLineBreak> brField = new List<CT_TextLineBreak>();
523
524private List<CT_TextField> fldField = new List<CT_TextField>();
525
526private List<object> itemsField = new List<object>();
527[XmlIgnore]
528public List<object> items
529{
530get { return itemsField; }
531set { itemsField = value; }
532}
533private CT_TextCharacterProperties endParaRPrField;
534
535public CT_RegularTextRun AddNewR()
536{
537if (this.rField == null)
538this.rField = new List<CT_RegularTextRun>();
539CT_RegularTextRun rtr = new CT_RegularTextRun();
540this.rField.Add(rtr);
541this.itemsField.Add(rtr);
542return rtr;
543}
544public CT_TextParagraphProperties AddNewPPr()
545{
546this.pPrField = new CT_TextParagraphProperties();
547return this.pPrField;
548}
549public CT_TextCharacterProperties AddNewEndParaRPr()
550{
551this.endParaRPrField = new CT_TextCharacterProperties();
552return this.endParaRPrField;
553}
554
555public CT_TextParagraphProperties pPr
556{
557get
558{
559return this.pPrField;
560}
561set
562{
563this.pPrField = value;
564}
565}
566
567
568[XmlElement("r")]
569public List<CT_RegularTextRun> r
570{
571get
572{
573return this.rField;
574}
575set
576{
577this.rField = value;
578}
579}
580
581
582[XmlElement("br")]
583public List<CT_TextLineBreak> br
584{
585get
586{
587return this.brField;
588}
589set
590{
591this.brField = value;
592}
593}
594
595
596[XmlElement("fld")]
597public List<CT_TextField> fld
598{
599get
600{
601return this.fldField;
602}
603set
604{
605this.fldField = value;
606}
607}
608
609
610public CT_TextCharacterProperties endParaRPr
611{
612get
613{
614return this.endParaRPrField;
615}
616set
617{
618this.endParaRPrField = value;
619}
620}
621
622public int SizeOfRArray()
623{
624return rField.Count;
625}
626
627public bool IsSetPPr()
628{
629return this.pPrField != null;
630}
631
632public CT_TextLineBreak AddNewBr()
633{
634CT_TextLineBreak br = new CT_TextLineBreak();
635this.brField.Add(br);
636this.itemsField.Add(br);
637return br;
638}
639
640public CT_RegularTextRun GetRArray(int v)
641{
642return rField[v];
643}
644
645public int SizeOfFldArray()
646{
647return this.fldField.Count;
648}
649
650public CT_TextField GetFldArray(int v)
651{
652return fldField[v];
653}
654}
655
656[Serializable]
657[DebuggerStepThrough]
658[System.ComponentModel.DesignerCategoryAttribute("code")]
659[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
660[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
661public class CT_TextParagraphProperties
662{
663
664private CT_TextSpacing lnSpcField;
665
666private CT_TextSpacing spcBefField;
667
668private CT_TextSpacing spcAftField;
669
670private CT_TextBulletColorFollowText buClrTxField;
671
672private CT_Color buClrField;
673
674private CT_TextBulletSizeFollowText buSzTxField;
675
676private CT_TextBulletSizePercent buSzPctField;
677
678private CT_TextBulletSizePoint buSzPtsField;
679
680private CT_TextBulletTypefaceFollowText buFontTxField;
681
682private CT_TextFont buFontField;
683
684private CT_TextNoBullet buNoneField;
685
686private CT_TextAutonumberBullet buAutoNumField;
687
688private CT_TextCharBullet buCharField;
689
690private CT_TextBlipBullet buBlipField;
691
692private CT_TextTabStopList tabLstField;
693
694private CT_TextCharacterProperties defRPrField;
695
696private CT_OfficeArtExtensionList extLstField;
697
698private int marLField;
699
700private bool marLFieldSpecified;
701
702private int marRField;
703
704private bool marRFieldSpecified;
705
706private int lvlField;
707
708private bool lvlFieldSpecified;
709
710private int indentField;
711
712private bool indentFieldSpecified;
713
714private ST_TextAlignType algnField;
715
716private bool algnFieldSpecified;
717
718private int defTabSzField;
719
720private bool defTabSzFieldSpecified;
721
722private bool rtlField;
723
724private bool rtlFieldSpecified;
725
726private bool eaLnBrkField;
727
728private bool eaLnBrkFieldSpecified;
729
730private ST_TextFontAlignType fontAlgnField;
731
732private bool fontAlgnFieldSpecified;
733
734private bool latinLnBrkField;
735
736private bool latinLnBrkFieldSpecified;
737
738private bool hangingPunctField;
739
740private bool hangingPunctFieldSpecified;
741
742public CT_TextParagraphProperties()
743{
744this.algn = ST_TextAlignType.l;
745}
746
747public static CT_TextParagraphProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
748{
749if (node == null)
750return null;
751CT_TextParagraphProperties ctObj = new CT_TextParagraphProperties();
752ctObj.marL = XmlHelper.ReadInt(node.Attributes["marL"]);
753ctObj.marR = XmlHelper.ReadInt(node.Attributes["marR"]);
754ctObj.lvlFieldSpecified = node.Attributes["lvl"] != null;
755ctObj.lvlField = XmlHelper.ReadInt(node.Attributes["lvl"]);
756ctObj.indent = XmlHelper.ReadInt(node.Attributes["indent"]);
757ctObj.algnFieldSpecified = node.Attributes["algn"] != null;
758if (node.Attributes["algn"] != null)
759ctObj.algnField = (ST_TextAlignType)Enum.Parse(typeof(ST_TextAlignType), node.Attributes["algn"].Value);
760else
761ctObj.algnField = ST_TextAlignType.l;
762ctObj.defTabSz = XmlHelper.ReadInt(node.Attributes["defTabSz"]);
763ctObj.rtlFieldSpecified = node.Attributes["rtl"] != null;
764ctObj.rtlField = XmlHelper.ReadBool(node.Attributes["rtl"]);
765ctObj.eaLnBrk = XmlHelper.ReadBool(node.Attributes["eaLnBrk"]);
766ctObj.fontAlgnFieldSpecified = node.Attributes["fontAlgn"] != null;
767if (node.Attributes["fontAlgn"] != null)
768ctObj.fontAlgnField = (ST_TextFontAlignType)Enum.Parse(typeof(ST_TextFontAlignType), node.Attributes["fontAlgn"].Value);
769ctObj.latinLnBrkFieldSpecified = node.Attributes["latinLnBrk"]!=null;
770ctObj.latinLnBrkField = XmlHelper.ReadBool(node.Attributes["latinLnBrk"]);
771ctObj.hangingPunct = XmlHelper.ReadBool(node.Attributes["hangingPunct"]);
772
773foreach (XmlNode childNode in node.ChildNodes)
774{
775if (childNode.LocalName == "lnSpc")
776ctObj.lnSpc = CT_TextSpacing.Parse(childNode, namespaceManager);
777else if (childNode.LocalName == "spcBef")
778ctObj.spcBef = CT_TextSpacing.Parse(childNode, namespaceManager);
779else if (childNode.LocalName == "spcAft")
780ctObj.spcAft = CT_TextSpacing.Parse(childNode, namespaceManager);
781else if (childNode.LocalName == "buClrTx")
782ctObj.buClrTx = new CT_TextBulletColorFollowText();
783else if (childNode.LocalName == "buClr")
784ctObj.buClr = CT_Color.Parse(childNode, namespaceManager);
785else if (childNode.LocalName == "buSzTx")
786ctObj.buSzTx = new CT_TextBulletSizeFollowText();
787else if (childNode.LocalName == "buSzPct")
788ctObj.buSzPct = CT_TextBulletSizePercent.Parse(childNode, namespaceManager);
789else if (childNode.LocalName == "buSzPts")
790ctObj.buSzPts = CT_TextBulletSizePoint.Parse(childNode, namespaceManager);
791else if (childNode.LocalName == "buFontTx")
792ctObj.buFontTx = new CT_TextBulletTypefaceFollowText();
793else if (childNode.LocalName == "buFont")
794ctObj.buFont = CT_TextFont.Parse(childNode, namespaceManager);
795else if (childNode.LocalName == "buNone")
796ctObj.buNone = new CT_TextNoBullet();
797else if (childNode.LocalName == "buAutoNum")
798ctObj.buAutoNum = CT_TextAutonumberBullet.Parse(childNode, namespaceManager);
799else if (childNode.LocalName == "buChar")
800ctObj.buChar = CT_TextCharBullet.Parse(childNode, namespaceManager);
801else if (childNode.LocalName == "buBlip")
802ctObj.buBlip = CT_TextBlipBullet.Parse(childNode, namespaceManager);
803else if (childNode.LocalName == "defRPr")
804ctObj.defRPr = CT_TextCharacterProperties.Parse(childNode, namespaceManager);
805else if (childNode.LocalName == "extLst")
806ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
807else if (childNode.LocalName == "tabLst")
808ctObj.tabLst = CT_TextTabStopList.Parse(childNode, namespaceManager);
809}
810return ctObj;
811}
812
813
814
815internal void Write(StreamWriter sw, string nodeName)
816{
817sw.Write(string.Format("<a:{0}", nodeName));
818XmlHelper.WriteAttribute(sw, "marL", this.marL);
819XmlHelper.WriteAttribute(sw, "marR", this.marR);
820if(this.lvlFieldSpecified)
821XmlHelper.WriteAttribute(sw, "lvl", this.lvlField, true);
822XmlHelper.WriteAttribute(sw, "indent", this.indent);
823if(this.algnFieldSpecified)
824XmlHelper.WriteAttribute(sw, "algn", this.algnField.ToString());
825XmlHelper.WriteAttribute(sw, "defTabSz", this.defTabSz);
826if(this.rtlFieldSpecified)
827XmlHelper.WriteAttribute(sw, "rtl", this.rtlField);
828XmlHelper.WriteAttribute(sw, "eaLnBrk", this.eaLnBrk, false);
829if(this.fontAlgnFieldSpecified&& this.fontAlgn!= ST_TextFontAlignType.auto)
830XmlHelper.WriteAttribute(sw, "fontAlgn", this.fontAlgnField.ToString());
831if(this.latinLnBrkFieldSpecified)
832XmlHelper.WriteAttribute(sw, "latinLnBrk", this.latinLnBrk, true);
833XmlHelper.WriteAttribute(sw, "hangingPunct", this.hangingPunct, false);
834sw.Write(">");
835if (this.lnSpc != null)
836this.lnSpc.Write(sw, "lnSpc");
837if (this.spcBef != null)
838this.spcBef.Write(sw, "spcBef");
839if (this.spcAft != null)
840this.spcAft.Write(sw, "spcAft");
841if (this.buClrTx != null)
842sw.Write("<a:buClrTx/>");
843if (this.buClr != null)
844this.buClr.Write(sw, "buClr");
845if (this.buSzTx != null)
846sw.Write("<a:buSzTx/>");
847if (this.buSzPct != null)
848this.buSzPct.Write(sw, "buSzPct");
849if (this.buSzPts != null)
850this.buSzPts.Write(sw, "buSzPts");
851if (this.buFontTx != null)
852sw.Write("<a:buFontTx/>");
853if (this.buFont != null)
854this.buFont.Write(sw, "buFont");
855if (this.buNone != null)
856sw.Write("<a:buNone/>");
857if (this.buAutoNum != null)
858this.buAutoNum.Write(sw, "buAutoNum");
859if (this.buChar != null)
860this.buChar.Write(sw, "buChar");
861if (this.buBlip != null)
862this.buBlip.Write(sw, "buBlip");
863if (this.tabLstField != null)
864{
865this.tabLstField.Write(sw, "tabLst");
866}
867if (this.defRPr != null)
868this.defRPr.Write(sw, "defRPr");
869if (this.extLst != null)
870this.extLst.Write(sw, "extLst");
871sw.Write(string.Format("</a:{0}>", nodeName));
872}
873
874[XmlElement(Order = 0)]
875public CT_TextSpacing lnSpc
876{
877get
878{
879return this.lnSpcField;
880}
881set
882{
883this.lnSpcField = value;
884}
885}
886
887[XmlElement(Order = 1)]
888public CT_TextSpacing spcBef
889{
890get
891{
892return this.spcBefField;
893}
894set
895{
896this.spcBefField = value;
897}
898}
899
900[XmlElement(Order = 2)]
901public CT_TextSpacing spcAft
902{
903get
904{
905return this.spcAftField;
906}
907set
908{
909this.spcAftField = value;
910}
911}
912
913[XmlElement(Order = 3)]
914public CT_TextBulletColorFollowText buClrTx
915{
916get
917{
918return this.buClrTxField;
919}
920set
921{
922this.buClrTxField = value;
923}
924}
925
926[XmlElement(Order = 4)]
927public CT_Color buClr
928{
929get
930{
931return this.buClrField;
932}
933set
934{
935this.buClrField = value;
936}
937}
938
939[XmlElement(Order = 5)]
940public CT_TextBulletSizeFollowText buSzTx
941{
942get
943{
944return this.buSzTxField;
945}
946set
947{
948this.buSzTxField = value;
949}
950}
951
952[XmlElement(Order = 6)]
953public CT_TextBulletSizePercent buSzPct
954{
955get
956{
957return this.buSzPctField;
958}
959set
960{
961this.buSzPctField = value;
962}
963}
964
965[XmlElement(Order = 7)]
966public CT_TextBulletSizePoint buSzPts
967{
968get
969{
970return this.buSzPtsField;
971}
972set
973{
974this.buSzPtsField = value;
975}
976}
977
978[XmlElement(Order = 8)]
979public CT_TextBulletTypefaceFollowText buFontTx
980{
981get
982{
983return this.buFontTxField;
984}
985set
986{
987this.buFontTxField = value;
988}
989}
990
991[XmlElement(Order = 9)]
992public CT_TextFont buFont
993{
994get
995{
996return this.buFontField;
997}
998set
999{
1000this.buFontField = value;
1001}
1002}
1003
1004[XmlElement(Order = 10)]
1005public CT_TextNoBullet buNone
1006{
1007get
1008{
1009return this.buNoneField;
1010}
1011set
1012{
1013this.buNoneField = value;
1014}
1015}
1016
1017[XmlElement(Order = 11)]
1018public CT_TextAutonumberBullet buAutoNum
1019{
1020get
1021{
1022return this.buAutoNumField;
1023}
1024set
1025{
1026this.buAutoNumField = value;
1027}
1028}
1029
1030[XmlElement(Order = 12)]
1031public CT_TextCharBullet buChar
1032{
1033get
1034{
1035return this.buCharField;
1036}
1037set
1038{
1039this.buCharField = value;
1040}
1041}
1042
1043[XmlElement(Order = 13)]
1044public CT_TextBlipBullet buBlip
1045{
1046get
1047{
1048return this.buBlipField;
1049}
1050set
1051{
1052this.buBlipField = value;
1053}
1054}
1055
1056[XmlElement(Order = 14)]
1057public CT_TextTabStopList tabLst
1058{
1059get
1060{
1061return this.tabLstField;
1062}
1063set
1064{
1065this.tabLstField = value;
1066}
1067}
1068
1069[XmlElement(Order = 15)]
1070public CT_TextCharacterProperties defRPr
1071{
1072get
1073{
1074return this.defRPrField;
1075}
1076set
1077{
1078this.defRPrField = value;
1079}
1080}
1081
1082[XmlElement(Order = 16)]
1083public CT_OfficeArtExtensionList extLst
1084{
1085get
1086{
1087return this.extLstField;
1088}
1089set
1090{
1091this.extLstField = value;
1092}
1093}
1094
1095[XmlAttribute]
1096public int marL
1097{
1098get
1099{
1100return this.marLField;
1101}
1102set
1103{
1104this.marLField = value;
1105this.marLFieldSpecified = true;
1106}
1107}
1108
1109[XmlIgnore]
1110public bool marLSpecified
1111{
1112get
1113{
1114return this.marLFieldSpecified;
1115}
1116set
1117{
1118this.marLFieldSpecified = value;
1119}
1120}
1121
1122[XmlAttribute]
1123public int marR
1124{
1125get
1126{
1127return this.marRField;
1128}
1129set
1130{
1131this.marRField = value;
1132this.marRFieldSpecified = true;
1133}
1134}
1135
1136[XmlIgnore]
1137public bool marRSpecified
1138{
1139get
1140{
1141return this.marRFieldSpecified;
1142}
1143set
1144{
1145this.marRFieldSpecified = value;
1146}
1147}
1148/*<xsd:restriction base="xsd:int">
1149<xsd:minInclusive value="0" />
1150<xsd:maxInclusive value="8" />
1151</xsd:restriction>*/
1152[XmlAttribute]
1153public int lvl
1154{
1155get
1156{
1157return this.lvlField;
1158}
1159set
1160{
1161this.lvlField = value;
1162this.lvlFieldSpecified = true;
1163}
1164}
1165
1166[XmlAttribute]
1167public int indent
1168{
1169get
1170{
1171return this.indentField;
1172}
1173set
1174{
1175this.indentField = value;
1176this.indentFieldSpecified = true;
1177}
1178}
1179
1180[XmlIgnore]
1181public bool indentSpecified
1182{
1183get
1184{
1185return this.indentFieldSpecified;
1186}
1187set
1188{
1189this.indentFieldSpecified = value;
1190}
1191}
1192
1193[XmlAttribute]
1194public ST_TextAlignType algn
1195{
1196get
1197{
1198return this.algnField;
1199}
1200set
1201{
1202this.algnField = value;
1203this.algnFieldSpecified = true;
1204}
1205}
1206
1207[XmlIgnore]
1208public bool algnSpecified
1209{
1210get
1211{
1212return this.algnFieldSpecified;
1213}
1214set
1215{
1216this.algnFieldSpecified = value;
1217}
1218}
1219
1220[XmlAttribute]
1221public int defTabSz
1222{
1223get
1224{
1225return this.defTabSzField;
1226}
1227set
1228{
1229this.defTabSzField = value;
1230this.defTabSzFieldSpecified = true;
1231}
1232}
1233
1234[XmlIgnore]
1235public bool defTabSzSpecified
1236{
1237get
1238{
1239return this.defTabSzFieldSpecified;
1240}
1241set
1242{
1243this.defTabSzFieldSpecified = value;
1244}
1245}
1246
1247[XmlAttribute]
1248public bool rtl
1249{
1250get
1251{
1252return this.rtlField;
1253}
1254set
1255{
1256this.rtlField = value;
1257this.rtlFieldSpecified = value;
1258}
1259}
1260
1261[XmlIgnore]
1262public bool rtlSpecified
1263{
1264get
1265{
1266return this.rtlFieldSpecified;
1267}
1268set
1269{
1270this.rtlFieldSpecified = value;
1271}
1272}
1273
1274[XmlAttribute]
1275public bool eaLnBrk
1276{
1277get
1278{
1279return this.eaLnBrkField;
1280}
1281set
1282{
1283this.eaLnBrkField = value;
1284this.eaLnBrkFieldSpecified = value;
1285}
1286}
1287
1288[XmlIgnore]
1289public bool eaLnBrkSpecified
1290{
1291get
1292{
1293return this.eaLnBrkFieldSpecified;
1294}
1295set
1296{
1297this.eaLnBrkFieldSpecified = value;
1298}
1299}
1300
1301[XmlAttribute]
1302public ST_TextFontAlignType fontAlgn
1303{
1304get
1305{
1306return this.fontAlgnField;
1307}
1308set
1309{
1310this.fontAlgnField = value;
1311this.fontAlgnFieldSpecified = true;
1312}
1313}
1314
1315[XmlIgnore]
1316public bool fontAlgnSpecified
1317{
1318get
1319{
1320return this.fontAlgnFieldSpecified;
1321}
1322set
1323{
1324this.fontAlgnFieldSpecified = value;
1325}
1326}
1327
1328[XmlAttribute]
1329public bool latinLnBrk
1330{
1331get
1332{
1333return this.latinLnBrkField;
1334}
1335set
1336{
1337this.latinLnBrkField = value;
1338this.latinLnBrkFieldSpecified = value;
1339}
1340}
1341
1342[XmlIgnore]
1343public bool latinLnBrkSpecified
1344{
1345get
1346{
1347return this.latinLnBrkFieldSpecified;
1348}
1349set
1350{
1351this.latinLnBrkFieldSpecified = value;
1352}
1353}
1354
1355[XmlAttribute]
1356public bool hangingPunct
1357{
1358get
1359{
1360return this.hangingPunctField;
1361}
1362set
1363{
1364this.hangingPunctField = value;
1365this.hangingPunctFieldSpecified = value;
1366}
1367}
1368
1369[XmlIgnore]
1370public bool hangingPunctSpecified
1371{
1372get
1373{
1374return this.hangingPunctFieldSpecified;
1375}
1376set
1377{
1378this.hangingPunctFieldSpecified = value;
1379}
1380}
1381
1382public bool IsSetAlgn()
1383{
1384return this.algnFieldSpecified;
1385}
1386
1387public bool IsSetBuNone()
1388{
1389return this.buNoneField != null;
1390}
1391
1392public bool IsSetBuFont()
1393{
1394return this.buFontField != null;
1395}
1396
1397public bool IsSetBuChar()
1398{
1399return this.buCharField != null;
1400}
1401
1402public bool IsSetBuAutoNum()
1403{
1404return this.buAutoNumField != null;
1405}
1406
1407public void AddNewBuNone()
1408{
1409this.buNoneField = new CT_TextNoBullet();
1410}
1411
1412public bool IsSetBuBlip()
1413{
1414return this.buBlipField != null;
1415}
1416
1417public bool IsSetBuClr()
1418{
1419return this.buClrField != null;
1420}
1421
1422public bool IsSetBuClrTx()
1423{
1424return this.buClrTxField != null;
1425}
1426
1427public bool IsSetBuFontTx()
1428{
1429return this.buFontTxField != null;
1430}
1431
1432public bool IsSetBuSzPct()
1433{
1434return this.buSzPctField != null;
1435}
1436
1437public bool IsSetBuSzPts()
1438{
1439return this.buSzPtsField != null;
1440}
1441
1442public bool IsSetBuSzTx()
1443{
1444return this.buSzTxField != null;
1445}
1446
1447public CT_TextCharBullet AddNewBuChar()
1448{
1449this.buCharField = new CT_TextCharBullet();
1450return this.buCharField;
1451}
1452
1453public CT_TextFont AddNewBuFont()
1454{
1455this.buFontField = new CT_TextFont();
1456return this.buFontField;
1457}
1458
1459public void UnsetBuNone()
1460{
1461this.buNoneField = null;
1462}
1463
1464public void UnsetBuSzTx()
1465{
1466this.buSzTxField = null;
1467}
1468
1469public void UnsetBuSzPts()
1470{
1471this.buSzPtsField = null;
1472}
1473
1474public void UnsetBuAutoNum()
1475{
1476this.buAutoNumField = null;
1477}
1478
1479public void UnsetBuBlip()
1480{
1481this.buBlipField = null;
1482}
1483
1484public void UnsetBuChar()
1485{
1486this.buCharField = null;
1487}
1488
1489public void UnsetBuClr()
1490{
1491this.buClrField = null;
1492}
1493
1494public void UnsetBuClrTx()
1495{
1496this.buClrTxField = null;
1497}
1498
1499public void UnsetBuFont()
1500{
1501this.buFontField = null;
1502}
1503
1504public void UnsetBuFontTx()
1505{
1506this.buFontTxField = null;
1507}
1508
1509public void UnsetBuSzPct()
1510{
1511this.buSzPctField = null;
1512}
1513
1514public void UnsetAlgn()
1515{
1516this.algnFieldSpecified = false;
1517}
1518
1519public bool IsSetFontAlgn()
1520{
1521return this.fontAlgnFieldSpecified;
1522}
1523
1524public void UnsetFontAlgn()
1525{
1526this.fontAlgnFieldSpecified = false;
1527}
1528
1529public CT_Color AddNewBuClr()
1530{
1531this.buClrField = new CT_Color();
1532return this.buClrField;
1533}
1534
1535public CT_TextBulletSizePercent AddNewBuSzPct()
1536{
1537this.buSzPctField = new CT_TextBulletSizePercent();
1538return this.buSzPctField;
1539}
1540
1541public CT_TextBulletSizePoint AddNewBuSzPts()
1542{
1543this.buSzPtsField = new CT_TextBulletSizePoint();
1544return this.buSzPtsField;
1545}
1546
1547public bool IsSetIndent()
1548{
1549return this.indentFieldSpecified;
1550}
1551
1552public void UnsetIndent()
1553{
1554this.indentFieldSpecified = false;
1555}
1556
1557public bool IsSetMarL()
1558{
1559return this.marLFieldSpecified;
1560}
1561
1562public void UnsetMarL()
1563{
1564this.marLFieldSpecified = false;
1565}
1566
1567public bool IsSetMarR()
1568{
1569return this.marRFieldSpecified;
1570}
1571
1572public void UnsetMarR()
1573{
1574this.marRFieldSpecified = false;
1575}
1576
1577public bool IsSetDefTabSz()
1578{
1579return this.defTabSzFieldSpecified;
1580}
1581
1582public bool IsSetTabLst()
1583{
1584return this.tabLstField != null;
1585}
1586
1587public CT_TextTabStopList AddNewTabLst()
1588{
1589this.tabLstField = new CT_TextTabStopList();
1590return this.tabLstField;
1591}
1592
1593public bool IsSetLnSpc()
1594{
1595return this.lnSpcField != null;
1596}
1597
1598public bool IsSetSpcBef()
1599{
1600return this.spcBefField != null;
1601}
1602
1603public bool IsSetSpcAft()
1604{
1605return this.spcAftField != null;
1606}
1607
1608public CT_TextAutonumberBullet AddNewBuAutoNum()
1609{
1610this.buAutoNumField = new CT_TextAutonumberBullet();
1611return this.buAutoNumField;
1612}
1613}
1614
1615
1616[Serializable]
1617[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1618public enum ST_TextAlignType
1619{
1620
1621/// <remarks/>
1622l,
1623
1624/// <remarks/>
1625ctr,
1626
1627/// <remarks/>
1628r,
1629
1630/// <remarks/>
1631just,
1632
1633/// <remarks/>
1634justLow,
1635
1636/// <remarks/>
1637dist,
1638
1639/// <remarks/>
1640thaiDist,
1641}
1642
1643
1644[Serializable]
1645[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1646public enum ST_TextFontAlignType
1647{
1648
1649/// <remarks/>
1650auto,
1651
1652/// <remarks/>
1653t,
1654
1655/// <remarks/>
1656ctr,
1657
1658/// <remarks/>
1659@base,
1660
1661/// <remarks/>
1662b,
1663}
1664
1665
1666[Serializable]
1667[DebuggerStepThrough]
1668[System.ComponentModel.DesignerCategoryAttribute("code")]
1669[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1670[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1671public class CT_TextField
1672{
1673
1674private CT_TextCharacterProperties rPrField;
1675
1676private CT_TextParagraphProperties pPrField;
1677
1678private string tField;
1679
1680private string idField;
1681
1682private string typeField;
1683public static CT_TextField Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1684{
1685if (node == null)
1686return null;
1687CT_TextField ctObj = new CT_TextField();
1688ctObj.t = XmlHelper.ReadString(node.Attributes["t"]);
1689ctObj.id = XmlHelper.ReadString(node.Attributes["id"]);
1690ctObj.type = XmlHelper.ReadString(node.Attributes["type"]);
1691foreach (XmlNode childNode in node.ChildNodes)
1692{
1693if (childNode.LocalName == "rPr")
1694ctObj.rPr = CT_TextCharacterProperties.Parse(childNode, namespaceManager);
1695else if (childNode.LocalName == "pPr")
1696ctObj.pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);
1697}
1698return ctObj;
1699}
1700
1701
1702
1703internal void Write(StreamWriter sw, string nodeName)
1704{
1705sw.Write(string.Format("<a:{0}", nodeName));
1706XmlHelper.WriteAttribute(sw, "t", this.t);
1707XmlHelper.WriteAttribute(sw, "id", this.id);
1708XmlHelper.WriteAttribute(sw, "type", this.type);
1709sw.Write(">");
1710if (this.rPr != null)
1711this.rPr.Write(sw, "rPr");
1712if (this.pPr != null)
1713this.pPr.Write(sw, "pPr");
1714sw.Write(string.Format("</a:{0}>", nodeName));
1715}
1716
1717public CT_TextField()
1718{
1719//this.pPrField = new CT_TextParagraphProperties();
1720//this.rPrField = new CT_TextCharacterProperties();
1721}
1722
1723[XmlElement(Order = 0)]
1724public CT_TextCharacterProperties rPr
1725{
1726get
1727{
1728return this.rPrField;
1729}
1730set
1731{
1732this.rPrField = value;
1733}
1734}
1735
1736[XmlElement(Order = 1)]
1737public CT_TextParagraphProperties pPr
1738{
1739get
1740{
1741return this.pPrField;
1742}
1743set
1744{
1745this.pPrField = value;
1746}
1747}
1748
1749[XmlElement(Order = 2)]
1750public string t
1751{
1752get
1753{
1754return this.tField;
1755}
1756set
1757{
1758this.tField = value;
1759}
1760}
1761
1762[System.Xml.Serialization.XmlAttributeAttribute(DataType = "token")]
1763public string id
1764{
1765get
1766{
1767return this.idField;
1768}
1769set
1770{
1771this.idField = value;
1772}
1773}
1774
1775[XmlAttribute]
1776public string type
1777{
1778get
1779{
1780return this.typeField;
1781}
1782set
1783{
1784this.typeField = value;
1785}
1786}
1787}
1788}
1789