npoi
6168 строк · 208.6 Кб
1using System;
2using System.Collections.Generic;
3using System.Xml.Serialization;
4using NPOI.OpenXmlFormats.Shared;
5using System.IO;
6using System.Xml;
7using System.Collections;
8using NPOI.OpenXml4Net.Util;
9using System.Linq;
10using NPOI.Util;
11
12namespace NPOI.OpenXmlFormats.Wordprocessing
13{
14
15
16[Serializable]
17[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
18[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
19public class CT_Tbl
20{
21//EG_RangeMarkupElements
22private ArrayList itemsField;
23
24private List<ItemsChoiceType30> itemsElementNameField;
25
26private CT_TblPr tblPrField;
27
28private CT_TblGrid tblGridField;
29
30private ArrayList items1Field;
31
32private List<Items1ChoiceType> items1ElementNameField;
33
34public CT_Tbl()
35{
36this.items1ElementNameField = new List<Items1ChoiceType>();
37this.items1Field = new ArrayList();
38//this.tblGridField = new CT_TblGrid();
39//this.tblPrField = new CT_TblPr();
40this.itemsElementNameField = new List<ItemsChoiceType30>();
41this.itemsField = new ArrayList();
42}
43public static CT_Tbl Parse(XmlNode node, XmlNamespaceManager namespaceManager)
44{
45if (node == null)
46return null;
47CT_Tbl ctObj = new CT_Tbl();
48foreach (XmlNode childNode in node.ChildNodes)
49{
50if (childNode.LocalName == "customXmlMoveToRangeEnd")
51{
52ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
53ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlMoveToRangeEnd);
54}
55else if (childNode.LocalName == "tblPr")
56ctObj.tblPr = CT_TblPr.Parse(childNode, namespaceManager);
57else if (childNode.LocalName == "tblGrid")
58ctObj.tblGrid = CT_TblGrid.Parse(childNode, namespaceManager);
59
60else if (childNode.LocalName == "moveToRangeEnd")
61{
62ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
63ctObj.ItemsElementName.Add(ItemsChoiceType30.moveToRangeEnd);
64}
65else if (childNode.LocalName == "moveToRangeStart")
66{
67ctObj.Items.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
68ctObj.ItemsElementName.Add(ItemsChoiceType30.moveToRangeStart);
69}
70else if (childNode.LocalName == "customXmlDelRangeEnd")
71{
72ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
73ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlDelRangeEnd);
74}
75else if (childNode.LocalName == "moveFromRangeStart")
76{
77ctObj.Items.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
78ctObj.ItemsElementName.Add(ItemsChoiceType30.moveFromRangeStart);
79}
80else if (childNode.LocalName == "bookmarkEnd")
81{
82ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
83ctObj.ItemsElementName.Add(ItemsChoiceType30.bookmarkEnd);
84}
85else if (childNode.LocalName == "bookmarkStart")
86{
87ctObj.Items.Add(CT_Bookmark.Parse(childNode, namespaceManager));
88ctObj.ItemsElementName.Add(ItemsChoiceType30.bookmarkStart);
89}
90else if (childNode.LocalName == "commentRangeEnd")
91{
92ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
93ctObj.ItemsElementName.Add(ItemsChoiceType30.commentRangeEnd);
94}
95else if (childNode.LocalName == "commentRangeStart")
96{
97ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
98ctObj.ItemsElementName.Add(ItemsChoiceType30.commentRangeStart);
99}
100else if (childNode.LocalName == "customXmlMoveToRangeStart")
101{
102ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
103ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlMoveToRangeStart);
104}
105else if (childNode.LocalName == "customXmlInsRangeEnd")
106{
107ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
108ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlInsRangeEnd);
109}
110else if (childNode.LocalName == "customXmlInsRangeStart")
111{
112ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
113ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlInsRangeStart);
114}
115else if (childNode.LocalName == "customXmlDelRangeStart")
116{
117ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
118ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlDelRangeStart);
119}
120else if (childNode.LocalName == "customXmlMoveFromRangeEnd")
121{
122ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
123ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlMoveFromRangeEnd);
124}
125else if (childNode.LocalName == "customXmlMoveFromRangeStart")
126{
127ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
128ctObj.ItemsElementName.Add(ItemsChoiceType30.customXmlMoveFromRangeStart);
129}
130else if (childNode.LocalName == "moveFromRangeEnd")
131{
132ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
133ctObj.ItemsElementName.Add(ItemsChoiceType30.moveFromRangeEnd);
134}
135else if (childNode.LocalName == "sdt")
136{
137ctObj.Items1.Add(CT_SdtRow.Parse(childNode, namespaceManager));
138ctObj.Items1ElementName.Add(Items1ChoiceType.sdt);
139}
140else if (childNode.LocalName == "customXml")
141{
142ctObj.Items1.Add(CT_CustomXmlRow.Parse(childNode, namespaceManager));
143ctObj.Items1ElementName.Add(Items1ChoiceType.customXml);
144}
145else if (childNode.LocalName == "customXmlInsRangeEnd")
146{
147ctObj.Items1.Add(CT_Markup.Parse(childNode, namespaceManager));
148ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlInsRangeEnd);
149}
150else if (childNode.LocalName == "customXmlInsRangeStart")
151{
152ctObj.Items1.Add(CT_TrackChange.Parse(childNode, namespaceManager));
153ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlInsRangeStart);
154}
155else if (childNode.LocalName == "customXmlMoveFromRangeEnd")
156{
157ctObj.Items1.Add(CT_Markup.Parse(childNode, namespaceManager));
158ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlMoveFromRangeEnd);
159}
160else if (childNode.LocalName == "customXmlMoveFromRangeStart")
161{
162ctObj.Items1.Add(CT_TrackChange.Parse(childNode, namespaceManager));
163ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlMoveFromRangeStart);
164}
165else if (childNode.LocalName == "customXmlMoveToRangeEnd")
166{
167ctObj.Items1.Add(CT_Markup.Parse(childNode, namespaceManager));
168ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlMoveToRangeEnd);
169}
170else if (childNode.LocalName == "customXmlMoveToRangeStart")
171{
172ctObj.Items1.Add(CT_TrackChange.Parse(childNode, namespaceManager));
173ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlMoveToRangeStart);
174}
175else if (childNode.LocalName == "del")
176{
177ctObj.Items1.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
178ctObj.Items1ElementName.Add(Items1ChoiceType.del);
179}
180else if (childNode.LocalName == "ins")
181{
182ctObj.Items1.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
183ctObj.Items1ElementName.Add(Items1ChoiceType.ins);
184}
185else if (childNode.LocalName == "moveFrom")
186{
187ctObj.Items1.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
188ctObj.Items1ElementName.Add(Items1ChoiceType.moveFrom);
189}
190else if (childNode.LocalName == "moveFromRangeEnd")
191{
192ctObj.Items1.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
193ctObj.Items1ElementName.Add(Items1ChoiceType.moveFromRangeEnd);
194}
195else if (childNode.LocalName == "commentRangeStart")
196{
197ctObj.Items1.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
198ctObj.Items1ElementName.Add(Items1ChoiceType.commentRangeStart);
199}
200else if (childNode.LocalName == "moveTo")
201{
202ctObj.Items1.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
203ctObj.Items1ElementName.Add(Items1ChoiceType.moveTo);
204}
205else if (childNode.LocalName == "moveToRangeEnd")
206{
207ctObj.Items1.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
208ctObj.Items1ElementName.Add(Items1ChoiceType.moveToRangeEnd);
209}
210else if (childNode.LocalName == "moveToRangeStart")
211{
212ctObj.Items1.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
213ctObj.Items1ElementName.Add(Items1ChoiceType.moveToRangeStart);
214}
215else if (childNode.LocalName == "permEnd")
216{
217ctObj.Items1.Add(CT_Perm.Parse(childNode, namespaceManager));
218ctObj.Items1ElementName.Add(Items1ChoiceType.permEnd);
219}
220else if (childNode.LocalName == "permStart")
221{
222ctObj.Items1.Add(CT_PermStart.Parse(childNode, namespaceManager));
223ctObj.Items1ElementName.Add(Items1ChoiceType.permStart);
224}
225else if (childNode.LocalName == "proofErr")
226{
227ctObj.Items1.Add(CT_ProofErr.Parse(childNode, namespaceManager));
228ctObj.Items1ElementName.Add(Items1ChoiceType.proofErr);
229}
230else if (childNode.LocalName == "oMath")
231{
232ctObj.Items1.Add(CT_OMath.Parse(childNode, namespaceManager));
233ctObj.Items1ElementName.Add(Items1ChoiceType.oMath);
234}
235else if (childNode.LocalName == "tr")
236{
237ctObj.Items1.Add(CT_Row.Parse(childNode, namespaceManager, ctObj));
238ctObj.Items1ElementName.Add(Items1ChoiceType.tr);
239}
240else if (childNode.LocalName == "moveFromRangeStart")
241{
242ctObj.Items1.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
243ctObj.Items1ElementName.Add(Items1ChoiceType.moveFromRangeStart);
244}
245else if (childNode.LocalName == "customXmlDelRangeEnd")
246{
247ctObj.Items1.Add(CT_Markup.Parse(childNode, namespaceManager));
248ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlDelRangeEnd);
249}
250else if (childNode.LocalName == "customXmlDelRangeStart")
251{
252ctObj.Items1.Add(CT_TrackChange.Parse(childNode, namespaceManager));
253ctObj.Items1ElementName.Add(Items1ChoiceType.customXmlDelRangeStart);
254}
255else if (childNode.LocalName == "oMathPara")
256{
257ctObj.Items1.Add(CT_OMathPara.Parse(childNode, namespaceManager));
258ctObj.Items1ElementName.Add(Items1ChoiceType.oMathPara);
259}
260else if (childNode.LocalName == "bookmarkEnd")
261{
262ctObj.Items1.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
263ctObj.Items1ElementName.Add(Items1ChoiceType.bookmarkEnd);
264}
265else if (childNode.LocalName == "bookmarkStart")
266{
267ctObj.Items1.Add(CT_Bookmark.Parse(childNode, namespaceManager));
268ctObj.Items1ElementName.Add(Items1ChoiceType.bookmarkStart);
269}
270else if (childNode.LocalName == "commentRangeEnd")
271{
272ctObj.Items1.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
273ctObj.Items1ElementName.Add(Items1ChoiceType.commentRangeEnd);
274}
275
276}
277return ctObj;
278}
279internal void Write(StreamWriter sw, string nodeName)
280{
281sw.Write(string.Format("<w:{0}", nodeName));
282sw.Write(">");
283foreach (object o in this.Items)
284{
285if (o is CT_Markup)
286((CT_Markup)o).Write(sw, "customXmlMoveToRangeEnd");
287
288else if (o is CT_MarkupRange)
289((CT_MarkupRange)o).Write(sw, "moveToRangeEnd");
290else if (o is CT_MoveBookmark)
291((CT_MoveBookmark)o).Write(sw, "moveToRangeStart");
292else if (o is CT_Markup)
293((CT_Markup)o).Write(sw, "customXmlDelRangeEnd");
294else if (o is CT_MoveBookmark)
295((CT_MoveBookmark)o).Write(sw, "moveFromRangeStart");
296else if (o is CT_MarkupRange)
297((CT_MarkupRange)o).Write(sw, "bookmarkEnd");
298else if (o is CT_Bookmark)
299((CT_Bookmark)o).Write(sw, "bookmarkStart");
300else if (o is CT_MarkupRange)
301((CT_MarkupRange)o).Write(sw, "commentRangeEnd");
302else if (o is CT_MarkupRange)
303((CT_MarkupRange)o).Write(sw, "commentRangeStart");
304else if (o is CT_TrackChange)
305((CT_TrackChange)o).Write(sw, "customXmlMoveToRangeStart");
306else if (o is CT_Markup)
307((CT_Markup)o).Write(sw, "customXmlInsRangeEnd");
308else if (o is CT_TrackChange)
309((CT_TrackChange)o).Write(sw, "customXmlInsRangeStart");
310else if (o is CT_TrackChange)
311((CT_TrackChange)o).Write(sw, "customXmlDelRangeStart");
312else if (o is CT_Markup)
313((CT_Markup)o).Write(sw, "customXmlMoveFromRangeEnd");
314else if (o is CT_TrackChange)
315((CT_TrackChange)o).Write(sw, "customXmlMoveFromRangeStart");
316else if (o is CT_MarkupRange)
317((CT_MarkupRange)o).Write(sw, "moveFromRangeEnd");
318}
319if (this.tblPr != null)
320this.tblPr.Write(sw, "tblPr");
321if (this.tblGrid != null)
322this.tblGrid.Write(sw, "tblGrid");
323foreach (object o in this.Items1)
324{
325if (o is CT_SdtRow)
326((CT_SdtRow)o).Write(sw, "sdt");
327else if (o is CT_CustomXmlRow)
328((CT_CustomXmlRow)o).Write(sw, "customXml");
329else if (o is CT_Markup)
330((CT_Markup)o).Write(sw, "customXmlInsRangeEnd");
331else if (o is CT_TrackChange)
332((CT_TrackChange)o).Write(sw, "customXmlInsRangeStart");
333else if (o is CT_Markup)
334((CT_Markup)o).Write(sw, "customXmlMoveFromRangeEnd");
335else if (o is CT_TrackChange)
336((CT_TrackChange)o).Write(sw, "customXmlMoveFromRangeStart");
337else if (o is CT_Markup)
338((CT_Markup)o).Write(sw, "customXmlMoveToRangeEnd");
339else if (o is CT_TrackChange)
340((CT_TrackChange)o).Write(sw, "customXmlMoveToRangeStart");
341else if (o is CT_RunTrackChange)
342((CT_RunTrackChange)o).Write(sw, "del");
343else if (o is CT_RunTrackChange)
344((CT_RunTrackChange)o).Write(sw, "ins");
345else if (o is CT_RunTrackChange)
346((CT_RunTrackChange)o).Write(sw, "moveFrom");
347else if (o is CT_MarkupRange)
348((CT_MarkupRange)o).Write(sw, "moveFromRangeEnd");
349else if (o is CT_MarkupRange)
350((CT_MarkupRange)o).Write(sw, "commentRangeStart");
351else if (o is CT_RunTrackChange)
352((CT_RunTrackChange)o).Write(sw, "moveTo");
353else if (o is CT_MarkupRange)
354((CT_MarkupRange)o).Write(sw, "moveToRangeEnd");
355else if (o is CT_MoveBookmark)
356((CT_MoveBookmark)o).Write(sw, "moveToRangeStart");
357else if (o is CT_Perm)
358((CT_Perm)o).Write(sw, "permEnd");
359else if (o is CT_PermStart)
360((CT_PermStart)o).Write(sw, "permStart");
361else if (o is CT_ProofErr)
362((CT_ProofErr)o).Write(sw, "proofErr");
363else if (o is CT_OMath)
364((CT_OMath)o).Write(sw, "oMath");
365else if (o is CT_Row)
366((CT_Row)o).Write(sw, "tr");
367else if (o is CT_MoveBookmark)
368((CT_MoveBookmark)o).Write(sw, "moveFromRangeStart");
369else if (o is CT_Markup)
370((CT_Markup)o).Write(sw, "customXmlDelRangeEnd");
371else if (o is CT_TrackChange)
372((CT_TrackChange)o).Write(sw, "customXmlDelRangeStart");
373else if (o is CT_OMathPara)
374((CT_OMathPara)o).Write(sw, "oMathPara");
375else if (o is CT_MarkupRange)
376((CT_MarkupRange)o).Write(sw, "bookmarkEnd");
377else if (o is CT_Bookmark)
378((CT_Bookmark)o).Write(sw, "bookmarkStart");
379else if (o is CT_MarkupRange)
380((CT_MarkupRange)o).Write(sw, "commentRangeEnd");
381}
382sw.WriteEndW(nodeName);
383}
384
385[XmlElement("bookmarkEnd", typeof(CT_MarkupRange), Order = 0)]
386[XmlElement("bookmarkStart", typeof(CT_Bookmark), Order = 0)]
387[XmlElement("commentRangeEnd", typeof(CT_MarkupRange), Order = 0)]
388[XmlElement("commentRangeStart", typeof(CT_MarkupRange), Order = 0)]
389[XmlElement("customXmlDelRangeEnd", typeof(CT_Markup), Order = 0)]
390[XmlElement("customXmlDelRangeStart", typeof(CT_TrackChange), Order = 0)]
391[XmlElement("customXmlInsRangeEnd", typeof(CT_Markup), Order = 0)]
392[XmlElement("customXmlInsRangeStart", typeof(CT_TrackChange), Order = 0)]
393[XmlElement("customXmlMoveFromRangeEnd", typeof(CT_Markup), Order = 0)]
394[XmlElement("customXmlMoveFromRangeStart", typeof(CT_TrackChange), Order = 0)]
395[XmlElement("customXmlMoveToRangeEnd", typeof(CT_Markup), Order = 0)]
396[XmlElement("customXmlMoveToRangeStart", typeof(CT_TrackChange), Order = 0)]
397[XmlElement("moveFromRangeEnd", typeof(CT_MarkupRange), Order = 0)]
398[XmlElement("moveFromRangeStart", typeof(CT_MoveBookmark), Order = 0)]
399[XmlElement("moveToRangeEnd", typeof(CT_MarkupRange), Order = 0)]
400[XmlElement("moveToRangeStart", typeof(CT_MoveBookmark), Order = 0)]
401[XmlChoiceIdentifier("ItemsElementName")]
402public ArrayList Items
403{
404get
405{
406return this.itemsField;
407}
408set
409{
410this.itemsField = value;
411}
412}
413
414[XmlElement("ItemsElementName", Order = 1)]
415[XmlIgnore]
416public List<ItemsChoiceType30> ItemsElementName
417{
418get
419{
420return this.itemsElementNameField;
421}
422set
423{
424this.itemsElementNameField = value;
425}
426
427}
428
429[XmlElement(Order = 2)]
430public CT_TblPr tblPr
431{
432get
433{
434return this.tblPrField;
435}
436set
437{
438this.tblPrField = value;
439}
440}
441
442[XmlElement(Order = 3)]
443public CT_TblGrid tblGrid
444{
445get
446{
447return this.tblGridField;
448}
449set
450{
451this.tblGridField = value;
452}
453}
454
455//EG_ContentRowContent
456
457[XmlElement("oMath", typeof(CT_OMath), Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", Order = 4)]
458[XmlElement("oMathPara", typeof(CT_OMathPara), Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", Order = 4)]
459[XmlElement("bookmarkEnd", typeof(CT_MarkupRange), Order = 4)]
460[XmlElement("bookmarkStart", typeof(CT_Bookmark), Order = 4)]
461[XmlElement("commentRangeEnd", typeof(CT_MarkupRange), Order = 4)]
462[XmlElement("commentRangeStart", typeof(CT_MarkupRange), Order = 4)]
463[XmlElement("customXml", typeof(CT_CustomXmlRow), Order = 4)]
464[XmlElement("customXmlDelRangeEnd", typeof(CT_Markup), Order = 4)]
465[XmlElement("customXmlDelRangeStart", typeof(CT_TrackChange), Order = 4)]
466[XmlElement("customXmlInsRangeEnd", typeof(CT_Markup), Order = 4)]
467[XmlElement("customXmlInsRangeStart", typeof(CT_TrackChange), Order = 4)]
468[XmlElement("customXmlMoveFromRangeEnd", typeof(CT_Markup), Order = 4)]
469[XmlElement("customXmlMoveFromRangeStart", typeof(CT_TrackChange), Order = 4)]
470[XmlElement("customXmlMoveToRangeEnd", typeof(CT_Markup), Order = 4)]
471[XmlElement("customXmlMoveToRangeStart", typeof(CT_TrackChange), Order = 4)]
472[XmlElement("del", typeof(CT_RunTrackChange), Order = 4)]
473[XmlElement("ins", typeof(CT_RunTrackChange), Order = 4)]
474[XmlElement("moveFrom", typeof(CT_RunTrackChange), Order = 4)]
475[XmlElement("moveFromRangeEnd", typeof(CT_MarkupRange), Order = 4)]
476[XmlElement("moveFromRangeStart", typeof(CT_MoveBookmark), Order = 4)]
477[XmlElement("moveTo", typeof(CT_RunTrackChange), Order = 4)]
478[XmlElement("moveToRangeEnd", typeof(CT_MarkupRange), Order = 4)]
479[XmlElement("moveToRangeStart", typeof(CT_MoveBookmark), Order = 4)]
480[XmlElement("permEnd", typeof(CT_Perm), Order = 4)]
481[XmlElement("permStart", typeof(CT_PermStart), Order = 4)]
482[XmlElement("proofErr", typeof(CT_ProofErr), Order = 4)]
483[XmlElement("sdt", typeof(CT_SdtRow), Order = 4)]
484[XmlElement("tr", typeof(CT_Row), Order = 4)]
485[XmlChoiceIdentifier("Items1ElementName")]
486public ArrayList Items1
487{
488get
489{
490return this.items1Field;
491}
492set
493{
494this.items1Field = value;
495}
496}
497
498[XmlElement("Items1ElementName", Order = 5)]
499[XmlIgnore]
500public List<Items1ChoiceType> Items1ElementName
501{
502get
503{
504return this.items1ElementNameField;
505}
506set
507{
508this.items1ElementNameField = value;
509}
510}
511
512public void Set(CT_Tbl table)
513{
514this.items1ElementNameField = new List<Items1ChoiceType>(table.Items1ElementName);
515this.items1Field = new ArrayList(table.items1Field);
516this.itemsElementNameField = new List<ItemsChoiceType30>(table.itemsElementNameField);
517this.itemsField = new ArrayList(table.itemsField);
518this.tblGridField = table.tblGridField;
519this.tblPrField = table.tblPrField;
520}
521
522public void RemoveTr(int pos)
523{
524RemoveItems1(Items1ChoiceType.tr, pos);
525}
526
527public CT_Row InsertNewTr(int pos)
528{
529return InsertNewItems1<CT_Row>(Items1ChoiceType.tr, pos);
530}
531
532public void SetTrArray(int pos, CT_Row cT_Row)
533{
534SetItems1Array<CT_Row>(Items1ChoiceType.tr, pos, cT_Row);
535}
536
537public CT_Row AddNewTr()
538{
539return AddNewItems1<CT_Row>(Items1ChoiceType.tr);
540}
541
542public CT_TblPr AddNewTblPr()
543{
544if (this.tblPrField == null)
545this.tblPrField = new CT_TblPr();
546return this.tblPrField;
547}
548
549public int SizeOfTrArray()
550{
551return SizeOfItems1Array(Items1ChoiceType.tr);
552}
553
554public CT_Row GetTrArray(int p)
555{
556return GetItems1Array<CT_Row>(p, Items1ChoiceType.tr);
557}
558
559public List<CT_Row> GetTrList()
560{
561return GetItems1List<CT_Row>(Items1ChoiceType.tr);
562}
563#region Generic methods for object operation
564
565private List<T> GetItems1List<T>(Items1ChoiceType type) where T : class
566{
567lock (this)
568{
569List<T> list = new List<T>();
570for (int i = 0; i < items1ElementNameField.Count; i++)
571{
572if (items1ElementNameField[i] == type)
573list.Add(items1Field[i] as T);
574}
575return list;
576}
577}
578private int SizeOfItems1Array(Items1ChoiceType type)
579{
580lock (this)
581{
582int size = 0;
583for (int i = 0; i < items1ElementNameField.Count; i++)
584{
585if (items1ElementNameField[i] == type)
586size++;
587}
588return size;
589}
590}
591private T GetItems1Array<T>(int p, Items1ChoiceType type) where T : class
592{
593lock (this)
594{
595int pos = GetItems1Index(type, p);
596if (pos < 0 || pos >= this.items1Field.Count)
597return null;
598return items1Field[pos] as T;
599}
600}
601private T InsertNewItems1<T>(Items1ChoiceType type, int p) where T : class, new()
602{
603T t = new T();
604lock (this)
605{
606int pos = GetItems1Index(type, p);
607this.items1ElementNameField.Insert(pos, type);
608this.items1Field.Insert(pos, t);
609}
610return t;
611}
612private T AddNewItems1<T>(Items1ChoiceType type) where T : class, new()
613{
614T t = new T();
615lock (this)
616{
617this.items1ElementNameField.Add(type);
618this.items1Field.Add(t);
619}
620return t;
621}
622private void SetItems1Array<T>(Items1ChoiceType type, int p, T obj) where T : class
623{
624lock (this)
625{
626int pos = GetItems1Index(type, p);
627if (pos < 0 || pos >= this.items1Field.Count)
628return;
629if (this.items1Field[pos] is T)
630this.items1Field[pos] = obj;
631else
632throw new Exception(string.Format(@"object types are difference, itemsField[{0}] is {1}, and parameter obj is {2}",
633pos, this.items1Field[pos].GetType().Name, typeof(T).Name));
634}
635}
636private int GetItems1Index(Items1ChoiceType type, int p)
637{
638int index = -1;
639int pos = 0;
640for (int i = 0; i < items1ElementNameField.Count; i++)
641{
642if (items1ElementNameField[i] == type)
643{
644if (pos == p)
645{
646//return itemsField[p] as T;
647index = i;
648break;
649}
650else
651pos++;
652}
653}
654// Check if the position should be the last position when index cannot be find in for loop
655if( index == -1&&pos == p)
656index = items1Field.Count;
657return index;
658}
659private void RemoveItems1(Items1ChoiceType type, int p)
660{
661lock (this)
662{
663int pos = GetItems1Index(type, p);
664if (pos < 0 || pos >= this.items1Field.Count)
665return;
666items1ElementNameField.RemoveAt(pos);
667items1Field.RemoveAt(pos);
668}
669}
670#endregion
671
672public CT_TblGrid AddNewTblGrid()
673{
674this.tblGrid = new CT_TblGrid();
675return this.tblGrid;
676}
677}
678
679
680[Serializable]
681[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IncludeInSchema = false)]
682public enum ItemsChoiceType30
683{
684
685
686bookmarkEnd,
687
688
689bookmarkStart,
690
691
692commentRangeEnd,
693
694
695commentRangeStart,
696
697
698customXmlDelRangeEnd,
699
700
701customXmlDelRangeStart,
702
703
704customXmlInsRangeEnd,
705
706
707customXmlInsRangeStart,
708
709
710customXmlMoveFromRangeEnd,
711
712
713customXmlMoveFromRangeStart,
714
715
716customXmlMoveToRangeEnd,
717
718
719customXmlMoveToRangeStart,
720
721
722moveFromRangeEnd,
723
724
725moveFromRangeStart,
726
727
728moveToRangeEnd,
729
730
731moveToRangeStart,
732}
733[Serializable]
734[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
735[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
736public class CT_TblGridChange : CT_Markup
737{
738
739private List<CT_TblGridCol> tblGridField;
740
741public CT_TblGridChange()
742{
743//this.tblGridField = new List<CT_TblGridCol>();
744}
745public static new CT_TblGridChange Parse(XmlNode node, XmlNamespaceManager namespaceManager)
746{
747if (node == null)
748return null;
749CT_TblGridChange ctObj = new CT_TblGridChange();
750ctObj.id = XmlHelper.ReadString(node.Attributes["r:id"]);
751ctObj.tblGrid = new List<CT_TblGridCol>();
752foreach (XmlNode childNode in node.ChildNodes)
753{
754if (childNode.LocalName == "tblGrid")
755ctObj.tblGrid.Add(CT_TblGridCol.Parse(childNode, namespaceManager));
756}
757return ctObj;
758}
759
760
761
762internal new void Write(StreamWriter sw, string nodeName)
763{
764sw.Write(string.Format("<w:{0}", nodeName));
765XmlHelper.WriteAttribute(sw, "r:id", this.id);
766sw.Write(">");
767if (this.tblGrid != null)
768{
769foreach (CT_TblGridCol x in this.tblGrid)
770{
771x.Write(sw, "tblGrid");
772}
773}
774sw.WriteEndW(nodeName);
775}
776
777[XmlArray(Order = 0)]
778[XmlArrayItem("gridCol", IsNullable = false)]
779public List<CT_TblGridCol> tblGrid
780{
781get
782{
783return this.tblGridField;
784}
785set
786{
787this.tblGridField = value;
788}
789}
790}
791
792
793[Serializable]
794[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
795[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
796public class CT_TblGridCol
797{
798
799private ulong wField;
800
801private bool wFieldSpecified;
802public static CT_TblGridCol Parse(XmlNode node, XmlNamespaceManager namespaceManager)
803{
804if (node == null)
805return null;
806CT_TblGridCol ctObj = new CT_TblGridCol();
807ctObj.w = XmlHelper.ReadULong(node.Attributes["w:w"]);
808return ctObj;
809}
810
811
812
813internal void Write(StreamWriter sw, string nodeName)
814{
815sw.Write(string.Format("<w:{0}", nodeName));
816XmlHelper.WriteAttribute(sw, "w:w", this.w);
817sw.Write("/>");
818}
819
820[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
821public ulong w
822{
823get
824{
825return this.wField;
826}
827set
828{
829this.wField = value;
830}
831}
832public bool wSpecified
833{
834get { return this.wFieldSpecified; }
835set { this.wFieldSpecified = value; }
836}
837}
838[XmlInclude(typeof(CT_TblGrid))]
839[Serializable]
840[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
841[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
842public class CT_TblGridBase
843{
844
845private List<CT_TblGridCol> gridColField;
846
847public CT_TblGridBase()
848{
849this.gridColField = new List<CT_TblGridCol>();
850}
851
852[XmlElement("gridCol", Order = 0)]
853public List<CT_TblGridCol> gridCol
854{
855get
856{
857return this.gridColField;
858}
859set
860{
861this.gridColField = value;
862}
863}
864}
865
866
867[Serializable]
868
869[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
870[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
871public class CT_TblGrid : CT_TblGridBase
872{
873
874private CT_TblGridChange tblGridChangeField;
875
876public CT_TblGrid()
877{
878//this.tblGridChangeField = new CT_TblGridChange();
879}
880public static CT_TblGrid Parse(XmlNode node, XmlNamespaceManager namespaceManager)
881{
882if (node == null)
883return null;
884CT_TblGrid ctObj = new CT_TblGrid();
885ctObj.gridCol = new List<CT_TblGridCol>();
886foreach (XmlNode childNode in node.ChildNodes)
887{
888if (childNode.LocalName == "tblGridChange")
889ctObj.tblGridChange = CT_TblGridChange.Parse(childNode, namespaceManager);
890else if (childNode.LocalName == "gridCol")
891ctObj.gridCol.Add(CT_TblGridCol.Parse(childNode, namespaceManager));
892}
893return ctObj;
894}
895
896
897
898internal void Write(StreamWriter sw, string nodeName)
899{
900sw.Write(string.Format("<w:{0}", nodeName));
901sw.Write(">");
902if (this.tblGridChange != null)
903this.tblGridChange.Write(sw, "tblGridChange");
904if (this.gridCol != null)
905{
906foreach (CT_TblGridCol x in this.gridCol)
907{
908x.Write(sw, "gridCol");
909}
910}
911sw.WriteEndW(nodeName);
912}
913
914[XmlElement(Order = 0)]
915public CT_TblGridChange tblGridChange
916{
917get
918{
919return this.tblGridChangeField;
920}
921set
922{
923this.tblGridChangeField = value;
924}
925}
926
927public CT_TblGridCol AddNewGridCol()
928{
929if (this.gridCol == null)
930gridCol = new List<CT_TblGridCol>();
931
932CT_TblGridCol col=new CT_TblGridCol();
933gridCol.Add(col);
934return col;
935}
936}
937
938[Serializable]
939
940[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
941[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
942public class CT_TblOverlap
943{
944public static CT_TblOverlap Parse(XmlNode node, XmlNamespaceManager namespaceManager)
945{
946if (node == null)
947return null;
948CT_TblOverlap ctObj = new CT_TblOverlap();
949if (node.Attributes["w:val"] != null)
950ctObj.val = (ST_TblOverlap)Enum.Parse(typeof(ST_TblOverlap), node.Attributes["w:val"].Value);
951return ctObj;
952}
953
954
955
956internal void Write(StreamWriter sw, string nodeName)
957{
958sw.Write(string.Format("<w:{0}", nodeName));
959XmlHelper.WriteAttribute(sw, "w:val", this.val.ToString());
960sw.Write(">");
961sw.WriteEndW(nodeName);
962}
963
964private ST_TblOverlap valField;
965
966[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
967public ST_TblOverlap val
968{
969get
970{
971return this.valField;
972}
973set
974{
975this.valField = value;
976}
977}
978}
979
980
981[Serializable]
982[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
983public enum ST_TblOverlap
984{
985
986
987never,
988
989
990overlap,
991}
992
993
994[Serializable]
995
996[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
997[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
998public class CT_TblWidth
999{
1000
1001private string wField;
1002
1003private ST_TblWidth typeField = ST_TblWidth.auto;
1004
1005private bool typeFieldSpecified = true;
1006public static CT_TblWidth Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1007{
1008if (node == null)
1009return null;
1010CT_TblWidth ctObj = new CT_TblWidth();
1011ctObj.w = XmlHelper.ReadString(node.Attributes["w:w"]);
1012if (node.Attributes["w:type"] != null)
1013ctObj.type = (ST_TblWidth)Enum.Parse(typeof(ST_TblWidth), node.Attributes["w:type"].Value);
1014return ctObj;
1015}
1016
1017
1018
1019internal void Write(StreamWriter sw, string nodeName)
1020{
1021sw.Write(string.Format("<w:{0}", nodeName));
1022XmlHelper.WriteAttribute(sw, "w:w", this.w);
1023XmlHelper.WriteAttribute(sw, "w:type", this.type.ToString());
1024sw.Write("/>");
1025}
1026
1027[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
1028public string w
1029{
1030get
1031{
1032return this.wField;
1033}
1034set
1035{
1036this.wField = value;
1037}
1038}
1039
1040[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1041public ST_TblWidth type
1042{
1043get
1044{
1045return this.typeField;
1046}
1047set
1048{
1049this.typeField = value;
1050}
1051}
1052
1053[XmlIgnore]
1054public bool typeSpecified
1055{
1056get
1057{
1058return this.typeFieldSpecified;
1059}
1060set
1061{
1062this.typeFieldSpecified = value;
1063}
1064}
1065}
1066
1067
1068[Serializable]
1069[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1070public enum ST_TblWidth
1071{
1072
1073
1074nil,
1075
1076
1077pct,
1078
1079
1080dxa,
1081
1082
1083auto,
1084}
1085
1086
1087[Serializable]
1088
1089[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1090[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1091public class CT_TblPrChange : CT_TrackChange
1092{
1093public static new CT_TblPrChange Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1094{
1095if (node == null)
1096return null;
1097CT_TblPrChange ctObj = new CT_TblPrChange();
1098ctObj.author = XmlHelper.ReadString(node.Attributes["w:author"]);
1099ctObj.date = XmlHelper.ReadString(node.Attributes["w:date"]);
1100ctObj.id = XmlHelper.ReadString(node.Attributes["r:id"]);
1101foreach (XmlNode childNode in node.ChildNodes)
1102{
1103if (childNode.LocalName == "tblPr")
1104ctObj.tblPr = CT_TblPrBase.Parse(childNode, namespaceManager);
1105}
1106return ctObj;
1107}
1108
1109
1110
1111internal new void Write(StreamWriter sw, string nodeName)
1112{
1113sw.Write(string.Format("<w:{0}", nodeName));
1114XmlHelper.WriteAttribute(sw, "w:author", this.author);
1115XmlHelper.WriteAttribute(sw, "w:date", this.date);
1116XmlHelper.WriteAttribute(sw, "r:id", this.id);
1117sw.Write(">");
1118if (this.tblPr != null)
1119this.tblPr.Write(sw, "tblPr");
1120sw.WriteEndW(nodeName);
1121}
1122
1123private CT_TblPrBase tblPrField;
1124
1125public CT_TblPrChange()
1126{
1127//this.tblPrField = new CT_TblPrBase();
1128}
1129
1130[XmlElement(Order = 0)]
1131public CT_TblPrBase tblPr
1132{
1133get
1134{
1135return this.tblPrField;
1136}
1137set
1138{
1139this.tblPrField = value;
1140}
1141}
1142}
1143
1144[XmlInclude(typeof(CT_TblPr))]
1145
1146[Serializable]
1147
1148[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1149[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1150public class CT_TblPrBase
1151{
1152
1153private CT_String tblStyleField;
1154
1155private CT_TblPPr tblpPrField;
1156
1157private CT_TblOverlap tblOverlapField;
1158
1159private CT_OnOff bidiVisualField;
1160
1161private CT_DecimalNumber tblStyleRowBandSizeField;
1162
1163private CT_DecimalNumber tblStyleColBandSizeField;
1164
1165private CT_TblWidth tblWField;
1166
1167private CT_Jc jcField;
1168
1169private CT_TblWidth tblCellSpacingField;
1170
1171private CT_TblWidth tblIndField;
1172
1173private CT_TblBorders tblBordersField;
1174
1175private CT_Shd shdField;
1176
1177private CT_TblLayoutType tblLayoutField;
1178
1179private CT_TblCellMar tblCellMarField;
1180
1181private CT_ShortHexNumber tblLookField;
1182
1183private CT_String tblCaptionField;
1184
1185private CT_String tblDescriptionField;
1186
1187public CT_TblPrBase()
1188{
1189}
1190public static CT_TblPrBase Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1191{
1192if (node == null)
1193return null;
1194CT_TblPrBase ctObj = new CT_TblPrBase();
1195foreach (XmlNode childNode in node.ChildNodes)
1196{
1197if (childNode.LocalName == "tblStyle")
1198ctObj.tblStyle = CT_String.Parse(childNode, namespaceManager);
1199else if (childNode.LocalName == "tblpPr")
1200ctObj.tblpPr = CT_TblPPr.Parse(childNode, namespaceManager);
1201else if (childNode.LocalName == "tblOverlap")
1202ctObj.tblOverlap = CT_TblOverlap.Parse(childNode, namespaceManager);
1203else if (childNode.LocalName == "bidiVisual")
1204ctObj.bidiVisual = CT_OnOff.Parse(childNode, namespaceManager);
1205else if (childNode.LocalName == "tblStyleRowBandSize")
1206ctObj.tblStyleRowBandSize = CT_DecimalNumber.Parse(childNode, namespaceManager);
1207else if (childNode.LocalName == "tblStyleColBandSize")
1208ctObj.tblStyleColBandSize = CT_DecimalNumber.Parse(childNode, namespaceManager);
1209else if (childNode.LocalName == "tblW")
1210ctObj.tblW = CT_TblWidth.Parse(childNode, namespaceManager);
1211else if (childNode.LocalName == "jc")
1212ctObj.jc = CT_Jc.Parse(childNode, namespaceManager);
1213else if (childNode.LocalName == "tblCellSpacing")
1214ctObj.tblCellSpacing = CT_TblWidth.Parse(childNode, namespaceManager);
1215else if (childNode.LocalName == "tblInd")
1216ctObj.tblInd = CT_TblWidth.Parse(childNode, namespaceManager);
1217else if (childNode.LocalName == "tblBorders")
1218ctObj.tblBorders = CT_TblBorders.Parse(childNode, namespaceManager);
1219else if (childNode.LocalName == "shd")
1220ctObj.shd = CT_Shd.Parse(childNode, namespaceManager);
1221else if (childNode.LocalName == "tblLayout")
1222ctObj.tblLayout = CT_TblLayoutType.Parse(childNode, namespaceManager);
1223else if (childNode.LocalName == "tblCellMar")
1224ctObj.tblCellMar = CT_TblCellMar.Parse(childNode, namespaceManager);
1225else if (childNode.LocalName == "tblLook")
1226ctObj.tblLook = CT_ShortHexNumber.Parse(childNode, namespaceManager);
1227else if (childNode.LocalName == "tblCaption")
1228ctObj.tblCaption = CT_String.Parse(childNode, namespaceManager);
1229else if (childNode.LocalName == "tblDescription")
1230ctObj.tblDescription = CT_String.Parse(childNode, namespaceManager);
1231}
1232return ctObj;
1233}
1234
1235
1236
1237internal void Write(StreamWriter sw, string nodeName)
1238{
1239sw.Write(string.Format("<w:{0}", nodeName));
1240sw.Write(">");
1241if (this.tblStyle != null)
1242this.tblStyle.Write(sw, "tblStyle");
1243if (this.tblpPr != null)
1244this.tblpPr.Write(sw, "tblpPr");
1245if (this.tblOverlap != null)
1246this.tblOverlap.Write(sw, "tblOverlap");
1247if (this.bidiVisual != null)
1248this.bidiVisual.Write(sw, "bidiVisual");
1249if (this.tblStyleRowBandSize != null)
1250this.tblStyleRowBandSize.Write(sw, "tblStyleRowBandSize");
1251if (this.tblStyleColBandSize != null)
1252this.tblStyleColBandSize.Write(sw, "tblStyleColBandSize");
1253if (this.tblW != null)
1254this.tblW.Write(sw, "tblW");
1255if (this.jc != null)
1256this.jc.Write(sw, "jc");
1257if (this.tblCellSpacing != null)
1258this.tblCellSpacing.Write(sw, "tblCellSpacing");
1259if (this.tblInd != null)
1260this.tblInd.Write(sw, "tblInd");
1261if (this.tblBorders != null)
1262this.tblBorders.Write(sw, "tblBorders");
1263if (this.shd != null)
1264this.shd.Write(sw, "shd");
1265if (this.tblLayout != null)
1266this.tblLayout.Write(sw, "tblLayout");
1267if (this.tblCellMar != null)
1268this.tblCellMar.Write(sw, "tblCellMar");
1269if (this.tblLook != null)
1270this.tblLook.Write(sw, "tblLook");
1271if (this.tblCaption != null)
1272this.tblCaption.Write(sw, "tblCaption");
1273if (this.tblDescription != null)
1274this.tblDescription.Write(sw, "tblDescription");
1275sw.WriteEndW(nodeName);
1276}
1277
1278[XmlElement(Order = 0)]
1279public CT_String tblStyle
1280{
1281get
1282{
1283return this.tblStyleField;
1284}
1285set
1286{
1287this.tblStyleField = value;
1288}
1289}
1290
1291[XmlElement(Order = 1)]
1292public CT_TblPPr tblpPr
1293{
1294get
1295{
1296return this.tblpPrField;
1297}
1298set
1299{
1300this.tblpPrField = value;
1301}
1302}
1303
1304[XmlElement(Order = 2)]
1305public CT_TblOverlap tblOverlap
1306{
1307get
1308{
1309return this.tblOverlapField;
1310}
1311set
1312{
1313this.tblOverlapField = value;
1314}
1315}
1316
1317[XmlElement(Order = 3)]
1318public CT_OnOff bidiVisual
1319{
1320get
1321{
1322return this.bidiVisualField;
1323}
1324set
1325{
1326this.bidiVisualField = value;
1327}
1328}
1329
1330[XmlElement(Order = 4)]
1331public CT_DecimalNumber tblStyleRowBandSize
1332{
1333get
1334{
1335return this.tblStyleRowBandSizeField;
1336}
1337set
1338{
1339this.tblStyleRowBandSizeField = value;
1340}
1341}
1342
1343[XmlElement(Order = 5)]
1344public CT_DecimalNumber tblStyleColBandSize
1345{
1346get
1347{
1348return this.tblStyleColBandSizeField;
1349}
1350set
1351{
1352this.tblStyleColBandSizeField = value;
1353}
1354}
1355
1356[XmlElement(Order = 6)]
1357public CT_TblWidth tblW
1358{
1359get
1360{
1361return this.tblWField;
1362}
1363set
1364{
1365this.tblWField = value;
1366}
1367}
1368
1369[XmlElement(Order = 7)]
1370public CT_Jc jc
1371{
1372get
1373{
1374return this.jcField;
1375}
1376set
1377{
1378this.jcField = value;
1379}
1380}
1381
1382[XmlElement(Order = 8)]
1383public CT_TblWidth tblCellSpacing
1384{
1385get
1386{
1387return this.tblCellSpacingField;
1388}
1389set
1390{
1391this.tblCellSpacingField = value;
1392}
1393}
1394
1395[XmlElement(Order = 9)]
1396public CT_TblWidth tblInd
1397{
1398get
1399{
1400return this.tblIndField;
1401}
1402set
1403{
1404this.tblIndField = value;
1405}
1406}
1407
1408[XmlElement(Order = 10)]
1409public CT_TblBorders tblBorders
1410{
1411get
1412{
1413return this.tblBordersField;
1414}
1415set
1416{
1417this.tblBordersField = value;
1418}
1419}
1420
1421[XmlElement(Order = 11)]
1422public CT_Shd shd
1423{
1424get
1425{
1426return this.shdField;
1427}
1428set
1429{
1430this.shdField = value;
1431}
1432}
1433
1434[XmlElement(Order = 12)]
1435public CT_TblLayoutType tblLayout
1436{
1437get
1438{
1439return this.tblLayoutField;
1440}
1441set
1442{
1443this.tblLayoutField = value;
1444}
1445}
1446
1447[XmlElement(Order = 13)]
1448public CT_TblCellMar tblCellMar
1449{
1450get
1451{
1452return this.tblCellMarField;
1453}
1454set
1455{
1456this.tblCellMarField = value;
1457}
1458}
1459
1460[XmlElement(Order = 14)]
1461public CT_ShortHexNumber tblLook
1462{
1463get
1464{
1465return this.tblLookField;
1466}
1467set
1468{
1469this.tblLookField = value;
1470}
1471}
1472
1473[XmlElement(Order = 15)]
1474public CT_String tblCaption
1475{
1476get
1477{
1478return this.tblCaptionField;
1479}
1480set
1481{
1482this.tblCaptionField = value;
1483}
1484}
1485
1486[XmlElement(Order = 16)]
1487public CT_String tblDescription
1488{
1489get
1490{
1491return this.tblDescriptionField;
1492}
1493set
1494{
1495this.tblDescriptionField = value;
1496}
1497}
1498
1499public bool IsSetTblW()
1500{
1501return this.tblW != null;
1502}
1503
1504public CT_TblWidth AddNewTblW()
1505{
1506if (this.tblWField == null)
1507this.tblWField = new CT_TblWidth();
1508return this.tblWField;
1509}
1510
1511public CT_TblBorders AddNewTblBorders()
1512{
1513if (tblBordersField == null)
1514this.tblBordersField = new CT_TblBorders();
1515return this.tblBordersField;
1516}
1517public CT_String AddNewTblStyle()
1518{
1519this.tblStyleField = new CT_String();
1520return this.tblStyleField;
1521}
1522
1523public bool IsSetTblBorders()
1524{
1525return this.tblBordersField != null;
1526}
1527
1528public bool IsSetTblStyleRowBandSize()
1529{
1530return this.tblStyleRowBandSizeField != null;
1531}
1532
1533public CT_DecimalNumber AddNewTblStyleRowBandSize()
1534{
1535this.tblStyleRowBandSizeField = new CT_DecimalNumber();
1536return this.tblStyleRowBandSizeField;
1537}
1538
1539public bool IsSetTblStyleColBandSize()
1540{
1541return this.tblStyleColBandSizeField != null;
1542}
1543
1544public CT_DecimalNumber AddNewTblStyleColBandSize()
1545{
1546this.tblStyleColBandSizeField = new CT_DecimalNumber();
1547return this.tblStyleColBandSizeField;
1548}
1549
1550public bool IsSetTblCellMar()
1551{
1552return this.tblCellMarField != null;
1553}
1554
1555public CT_TblCellMar AddNewTblCellMar()
1556{
1557this.tblCellMarField = new CT_TblCellMar();
1558return this.tblCellMarField;
1559}
1560}
1561
1562
1563[Serializable]
1564
1565[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1566[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1567public class CT_TblPPr
1568{
1569
1570private ulong leftFromTextField;
1571
1572private bool leftFromTextFieldSpecified;
1573
1574private ulong rightFromTextField;
1575
1576private bool rightFromTextFieldSpecified;
1577
1578private ulong topFromTextField;
1579
1580private bool topFromTextFieldSpecified;
1581
1582private ulong bottomFromTextField;
1583
1584private bool bottomFromTextFieldSpecified;
1585
1586private ST_VAnchor vertAnchorField;
1587
1588private bool vertAnchorFieldSpecified;
1589
1590private ST_HAnchor horzAnchorField;
1591
1592private bool horzAnchorFieldSpecified;
1593
1594private ST_XAlign tblpXSpecField;
1595
1596private bool tblpXSpecFieldSpecified;
1597
1598private string tblpXField;
1599
1600private ST_YAlign tblpYSpecField;
1601
1602private bool tblpYSpecFieldSpecified;
1603
1604private string tblpYField;
1605
1606public static CT_TblPPr Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1607{
1608if (node == null)
1609return null;
1610CT_TblPPr ctObj = new CT_TblPPr();
1611ctObj.leftFromText = XmlHelper.ReadULong(node.Attributes["w:leftFromText"]);
1612ctObj.rightFromText = XmlHelper.ReadULong(node.Attributes["w:rightFromText"]);
1613ctObj.topFromText = XmlHelper.ReadULong(node.Attributes["w:topFromText"]);
1614ctObj.bottomFromText = XmlHelper.ReadULong(node.Attributes["w:bottomFromText"]);
1615if (node.Attributes["w:vertAnchor"] != null)
1616ctObj.vertAnchor = (ST_VAnchor)Enum.Parse(typeof(ST_VAnchor), node.Attributes["w:vertAnchor"].Value);
1617if (node.Attributes["w:horzAnchor"] != null)
1618ctObj.horzAnchor = (ST_HAnchor)Enum.Parse(typeof(ST_HAnchor), node.Attributes["w:horzAnchor"].Value);
1619if (node.Attributes["w:tblpXSpec"] != null)
1620ctObj.tblpXSpec = (ST_XAlign)Enum.Parse(typeof(ST_XAlign), node.Attributes["w:tblpXSpec"].Value);
1621ctObj.tblpX = XmlHelper.ReadString(node.Attributes["w:tblpX"]);
1622if (node.Attributes["w:tblpYSpec"] != null)
1623ctObj.tblpYSpec = (ST_YAlign)Enum.Parse(typeof(ST_YAlign), node.Attributes["w:tblpYSpec"].Value);
1624ctObj.tblpY = XmlHelper.ReadString(node.Attributes["w:tblpY"]);
1625return ctObj;
1626}
1627
1628
1629
1630internal void Write(StreamWriter sw, string nodeName)
1631{
1632sw.Write(string.Format("<w:{0}", nodeName));
1633XmlHelper.WriteAttribute(sw, "w:leftFromText", this.leftFromText);
1634XmlHelper.WriteAttribute(sw, "w:rightFromText", this.rightFromText);
1635XmlHelper.WriteAttribute(sw, "w:topFromText", this.topFromText);
1636XmlHelper.WriteAttribute(sw, "w:bottomFromText", this.bottomFromText);
1637XmlHelper.WriteAttribute(sw, "w:vertAnchor", this.vertAnchor.ToString());
1638XmlHelper.WriteAttribute(sw, "w:horzAnchor", this.horzAnchor.ToString());
1639if (this.tblpXSpecFieldSpecified)
1640XmlHelper.WriteAttribute(sw, "w:tblpXSpec", this.tblpXSpec.ToString());
1641XmlHelper.WriteAttribute(sw, "w:tblpX", this.tblpX);
1642if (this.tblpYSpecFieldSpecified)
1643XmlHelper.WriteAttribute(sw, "w:tblpYSpec", this.tblpYSpec.ToString());
1644XmlHelper.WriteAttribute(sw, "w:tblpY", this.tblpY);
1645sw.Write(">");
1646sw.WriteEndW(nodeName);
1647}
1648
1649[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1650public ulong leftFromText
1651{
1652get
1653{
1654return this.leftFromTextField;
1655}
1656set
1657{
1658this.leftFromTextField = value;
1659}
1660}
1661
1662[XmlIgnore]
1663public bool leftFromTextSpecified
1664{
1665get
1666{
1667return this.leftFromTextFieldSpecified;
1668}
1669set
1670{
1671this.leftFromTextFieldSpecified = value;
1672}
1673}
1674
1675[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1676public ulong rightFromText
1677{
1678get
1679{
1680return this.rightFromTextField;
1681}
1682set
1683{
1684this.rightFromTextField = value;
1685}
1686}
1687
1688[XmlIgnore]
1689public bool rightFromTextSpecified
1690{
1691get
1692{
1693return this.rightFromTextFieldSpecified;
1694}
1695set
1696{
1697this.rightFromTextFieldSpecified = value;
1698}
1699}
1700
1701[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1702public ulong topFromText
1703{
1704get
1705{
1706return this.topFromTextField;
1707}
1708set
1709{
1710this.topFromTextField = value;
1711}
1712}
1713
1714[XmlIgnore]
1715public bool topFromTextSpecified
1716{
1717get
1718{
1719return this.topFromTextFieldSpecified;
1720}
1721set
1722{
1723this.topFromTextFieldSpecified = value;
1724}
1725}
1726
1727[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1728public ulong bottomFromText
1729{
1730get
1731{
1732return this.bottomFromTextField;
1733}
1734set
1735{
1736this.bottomFromTextField = value;
1737}
1738}
1739
1740[XmlIgnore]
1741public bool bottomFromTextSpecified
1742{
1743get
1744{
1745return this.bottomFromTextFieldSpecified;
1746}
1747set
1748{
1749this.bottomFromTextFieldSpecified = value;
1750}
1751}
1752
1753[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1754public ST_VAnchor vertAnchor
1755{
1756get
1757{
1758return this.vertAnchorField;
1759}
1760set
1761{
1762this.vertAnchorField = value;
1763}
1764}
1765
1766[XmlIgnore]
1767public bool vertAnchorSpecified
1768{
1769get
1770{
1771return this.vertAnchorFieldSpecified;
1772}
1773set
1774{
1775this.vertAnchorFieldSpecified = value;
1776}
1777}
1778
1779[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1780public ST_HAnchor horzAnchor
1781{
1782get
1783{
1784return this.horzAnchorField;
1785}
1786set
1787{
1788this.horzAnchorField = value;
1789}
1790}
1791
1792[XmlIgnore]
1793public bool horzAnchorSpecified
1794{
1795get
1796{
1797return this.horzAnchorFieldSpecified;
1798}
1799set
1800{
1801this.horzAnchorFieldSpecified = value;
1802}
1803}
1804
1805[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1806public ST_XAlign tblpXSpec
1807{
1808get
1809{
1810return this.tblpXSpecField;
1811}
1812set
1813{
1814this.tblpXSpecFieldSpecified = true;
1815this.tblpXSpecField = value;
1816}
1817}
1818
1819[XmlIgnore]
1820public bool tblpXSpecSpecified
1821{
1822get
1823{
1824return this.tblpXSpecFieldSpecified;
1825}
1826set
1827{
1828this.tblpXSpecFieldSpecified = value;
1829}
1830}
1831
1832[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
1833public string tblpX
1834{
1835get
1836{
1837return this.tblpXField;
1838}
1839set
1840{
1841this.tblpXField = value;
1842}
1843}
1844
1845[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1846public ST_YAlign tblpYSpec
1847{
1848get
1849{
1850return this.tblpYSpecField;
1851}
1852set
1853{
1854this.tblpYSpecFieldSpecified = true;
1855this.tblpYSpecField = value;
1856}
1857}
1858
1859[XmlIgnore]
1860public bool tblpYSpecSpecified
1861{
1862get
1863{
1864return this.tblpYSpecFieldSpecified;
1865}
1866set
1867{
1868this.tblpYSpecFieldSpecified = value;
1869}
1870}
1871
1872[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
1873public string tblpY
1874{
1875get
1876{
1877return this.tblpYField;
1878}
1879set
1880{
1881this.tblpYField = value;
1882}
1883}
1884}
1885
1886
1887[Serializable]
1888
1889[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1890[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1891public class CT_Height
1892{
1893
1894private ulong valField;
1895
1896
1897private ST_HeightRule hRuleField= ST_HeightRule.auto;
1898
1899public static CT_Height Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1900{
1901if (node == null)
1902return null;
1903CT_Height ctObj = new CT_Height();
1904ctObj.val = XmlHelper.ReadULong(node.Attributes["w:val"]);
1905if (node.Attributes["w:hRule"] != null)
1906ctObj.hRule = (ST_HeightRule)Enum.Parse(typeof(ST_HeightRule), node.Attributes["w:hRule"].Value);
1907return ctObj;
1908}
1909
1910
1911
1912internal void Write(StreamWriter sw, string nodeName)
1913{
1914sw.Write(string.Format("<w:{0}", nodeName));
1915if(this.hRule!= ST_HeightRule.auto)
1916XmlHelper.WriteAttribute(sw, "w:hRule", this.hRule.ToString());
1917XmlHelper.WriteAttribute(sw, "w:val", this.val);
1918sw.Write("/>");
1919}
1920
1921[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1922public ulong val
1923{
1924get
1925{
1926return this.valField;
1927}
1928set
1929{
1930this.valField = value;
1931}
1932}
1933
1934[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1935public ST_HeightRule hRule
1936{
1937get
1938{
1939return this.hRuleField;
1940}
1941set
1942{
1943this.hRuleField = value;
1944}
1945}
1946}
1947
1948
1949[Serializable]
1950[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IncludeInSchema = false)]
1951public enum ItemsChoiceType2
1952{
1953
1954
1955cantSplit,
1956
1957
1958cnfStyle,
1959
1960
1961divId,
1962
1963
1964gridAfter,
1965
1966
1967gridBefore,
1968
1969
1970hidden,
1971
1972
1973jc,
1974
1975
1976tblCellSpacing,
1977
1978
1979tblHeader,
1980
1981
1982trHeight,
1983
1984
1985wAfter,
1986
1987
1988wBefore,
1989}
1990
1991[Serializable]
1992
1993[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1994[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1995public class CT_TblPrExChange : CT_TrackChange
1996{
1997
1998private CT_TblPrExBase tblPrExField;
1999
2000public CT_TblPrExChange()
2001{
2002
2003}
2004public static new CT_TblPrExChange Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2005{
2006if (node == null)
2007return null;
2008CT_TblPrExChange ctObj = new CT_TblPrExChange();
2009ctObj.author = XmlHelper.ReadString(node.Attributes["w:author"]);
2010ctObj.date = XmlHelper.ReadString(node.Attributes["w:date"]);
2011ctObj.id = XmlHelper.ReadString(node.Attributes["w:id"]);
2012foreach (XmlNode childNode in node.ChildNodes)
2013{
2014if (childNode.LocalName == "tblPrEx")
2015ctObj.tblPrEx = CT_TblPrExBase.Parse(childNode, namespaceManager);
2016}
2017return ctObj;
2018}
2019
2020
2021
2022internal new void Write(StreamWriter sw, string nodeName)
2023{
2024sw.Write(string.Format("<w:{0}", nodeName));
2025XmlHelper.WriteAttribute(sw, "w:author", this.author);
2026XmlHelper.WriteAttribute(sw, "w:date", this.date);
2027XmlHelper.WriteAttribute(sw, "w:id", this.id);
2028sw.Write(">");
2029if (this.tblPrEx != null)
2030this.tblPrEx.Write(sw, "tblPrEx");
2031sw.WriteEndW(nodeName);
2032}
2033
2034[XmlElement(Order = 0)]
2035public CT_TblPrExBase tblPrEx
2036{
2037get
2038{
2039return this.tblPrExField;
2040}
2041set
2042{
2043this.tblPrExField = value;
2044}
2045}
2046}
2047
2048[XmlInclude(typeof(CT_TblPrEx))]
2049
2050[Serializable]
2051
2052[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2053[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2054public class CT_TblPrExBase
2055{
2056
2057private CT_TblWidth tblWField;
2058
2059private CT_Jc jcField;
2060
2061private CT_TblWidth tblCellSpacingField;
2062
2063private CT_TblWidth tblIndField;
2064
2065private CT_TblBorders tblBordersField;
2066
2067private CT_Shd shdField;
2068
2069private CT_TblLayoutType tblLayoutField;
2070
2071private CT_TblCellMar tblCellMarField;
2072
2073private CT_ShortHexNumber tblLookField;
2074public static CT_TblPrExBase Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2075{
2076if (node == null)
2077return null;
2078CT_TblPrExBase ctObj = new CT_TblPrExBase();
2079foreach (XmlNode childNode in node.ChildNodes)
2080{
2081if (childNode.LocalName == "tblW")
2082ctObj.tblW = CT_TblWidth.Parse(childNode, namespaceManager);
2083else if (childNode.LocalName == "jc")
2084ctObj.jc = CT_Jc.Parse(childNode, namespaceManager);
2085else if (childNode.LocalName == "tblCellSpacing")
2086ctObj.tblCellSpacing = CT_TblWidth.Parse(childNode, namespaceManager);
2087else if (childNode.LocalName == "tblInd")
2088ctObj.tblInd = CT_TblWidth.Parse(childNode, namespaceManager);
2089else if (childNode.LocalName == "tblBorders")
2090ctObj.tblBorders = CT_TblBorders.Parse(childNode, namespaceManager);
2091else if (childNode.LocalName == "shd")
2092ctObj.shd = CT_Shd.Parse(childNode, namespaceManager);
2093else if (childNode.LocalName == "tblLayout")
2094ctObj.tblLayout = CT_TblLayoutType.Parse(childNode, namespaceManager);
2095else if (childNode.LocalName == "tblCellMar")
2096ctObj.tblCellMar = CT_TblCellMar.Parse(childNode, namespaceManager);
2097else if (childNode.LocalName == "tblLook")
2098ctObj.tblLook = CT_ShortHexNumber.Parse(childNode, namespaceManager);
2099}
2100return ctObj;
2101}
2102
2103
2104
2105internal void Write(StreamWriter sw, string nodeName)
2106{
2107sw.Write(string.Format("<w:{0}", nodeName));
2108sw.Write(">");
2109if (this.tblW != null)
2110this.tblW.Write(sw, "tblW");
2111if (this.jc != null)
2112this.jc.Write(sw, "jc");
2113if (this.tblCellSpacing != null)
2114this.tblCellSpacing.Write(sw, "tblCellSpacing");
2115if (this.tblInd != null)
2116this.tblInd.Write(sw, "tblInd");
2117if (this.tblBorders != null)
2118this.tblBorders.Write(sw, "tblBorders");
2119if (this.shd != null)
2120this.shd.Write(sw, "shd");
2121if (this.tblLayout != null)
2122this.tblLayout.Write(sw, "tblLayout");
2123if (this.tblCellMar != null)
2124this.tblCellMar.Write(sw, "tblCellMar");
2125if (this.tblLook != null)
2126this.tblLook.Write(sw, "tblLook");
2127sw.WriteEndW(nodeName);
2128}
2129
2130public CT_TblPrExBase()
2131{
2132//this.tblLookField = new CT_ShortHexNumber();
2133//this.tblCellMarField = new CT_TblCellMar();
2134//this.tblLayoutField = new CT_TblLayoutType();
2135//this.shdField = new CT_Shd();
2136//this.tblBordersField = new CT_TblBorders();
2137//this.tblIndField = new CT_TblWidth();
2138//this.tblCellSpacingField = new CT_TblWidth();
2139//this.jcField = new CT_Jc();
2140//this.tblWField = new CT_TblWidth();
2141}
2142
2143[XmlElement(Order = 0)]
2144public CT_TblWidth tblW
2145{
2146get
2147{
2148return this.tblWField;
2149}
2150set
2151{
2152this.tblWField = value;
2153}
2154}
2155
2156[XmlElement(Order = 1)]
2157public CT_Jc jc
2158{
2159get
2160{
2161return this.jcField;
2162}
2163set
2164{
2165this.jcField = value;
2166}
2167}
2168
2169[XmlElement(Order = 2)]
2170public CT_TblWidth tblCellSpacing
2171{
2172get
2173{
2174return this.tblCellSpacingField;
2175}
2176set
2177{
2178this.tblCellSpacingField = value;
2179}
2180}
2181
2182[XmlElement(Order = 3)]
2183public CT_TblWidth tblInd
2184{
2185get
2186{
2187return this.tblIndField;
2188}
2189set
2190{
2191this.tblIndField = value;
2192}
2193}
2194
2195[XmlElement(Order = 4)]
2196public CT_TblBorders tblBorders
2197{
2198get
2199{
2200return this.tblBordersField;
2201}
2202set
2203{
2204this.tblBordersField = value;
2205}
2206}
2207
2208[XmlElement(Order = 5)]
2209public CT_Shd shd
2210{
2211get
2212{
2213return this.shdField;
2214}
2215set
2216{
2217this.shdField = value;
2218}
2219}
2220
2221[XmlElement(Order = 6)]
2222public CT_TblLayoutType tblLayout
2223{
2224get
2225{
2226return this.tblLayoutField;
2227}
2228set
2229{
2230this.tblLayoutField = value;
2231}
2232}
2233
2234[XmlElement(Order = 7)]
2235public CT_TblCellMar tblCellMar
2236{
2237get
2238{
2239return this.tblCellMarField;
2240}
2241set
2242{
2243this.tblCellMarField = value;
2244}
2245}
2246
2247[XmlElement(Order = 8)]
2248public CT_ShortHexNumber tblLook
2249{
2250get
2251{
2252return this.tblLookField;
2253}
2254set
2255{
2256this.tblLookField = value;
2257}
2258}
2259}
2260
2261
2262[Serializable]
2263
2264[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2265[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2266public class CT_TblPrEx : CT_TblPrExBase
2267{
2268
2269private CT_TblPrExChange tblPrExChangeField;
2270public static new CT_TblPrEx Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2271{
2272if (node == null)
2273return null;
2274CT_TblPrEx ctObj = new CT_TblPrEx();
2275foreach (XmlNode childNode in node.ChildNodes)
2276{
2277if (childNode.LocalName == "tblPrExChange")
2278ctObj.tblPrExChange = CT_TblPrExChange.Parse(childNode, namespaceManager);
2279else if (childNode.LocalName == "tblW")
2280ctObj.tblW = CT_TblWidth.Parse(childNode, namespaceManager);
2281else if (childNode.LocalName == "jc")
2282ctObj.jc = CT_Jc.Parse(childNode, namespaceManager);
2283else if (childNode.LocalName == "tblCellSpacing")
2284ctObj.tblCellSpacing = CT_TblWidth.Parse(childNode, namespaceManager);
2285else if (childNode.LocalName == "tblInd")
2286ctObj.tblInd = CT_TblWidth.Parse(childNode, namespaceManager);
2287else if (childNode.LocalName == "tblBorders")
2288ctObj.tblBorders = CT_TblBorders.Parse(childNode, namespaceManager);
2289else if (childNode.LocalName == "shd")
2290ctObj.shd = CT_Shd.Parse(childNode, namespaceManager);
2291else if (childNode.LocalName == "tblLayout")
2292ctObj.tblLayout = CT_TblLayoutType.Parse(childNode, namespaceManager);
2293else if (childNode.LocalName == "tblCellMar")
2294ctObj.tblCellMar = CT_TblCellMar.Parse(childNode, namespaceManager);
2295else if (childNode.LocalName == "tblLook")
2296ctObj.tblLook = CT_ShortHexNumber.Parse(childNode, namespaceManager);
2297}
2298return ctObj;
2299}
2300
2301
2302
2303internal new void Write(StreamWriter sw, string nodeName)
2304{
2305sw.Write(string.Format("<w:{0}", nodeName));
2306sw.Write(">");
2307if (this.tblPrExChange != null)
2308this.tblPrExChange.Write(sw, "tblPrExChange");
2309if (this.tblW != null)
2310this.tblW.Write(sw, "tblW");
2311if (this.jc != null)
2312this.jc.Write(sw, "jc");
2313if (this.tblCellSpacing != null)
2314this.tblCellSpacing.Write(sw, "tblCellSpacing");
2315if (this.tblInd != null)
2316this.tblInd.Write(sw, "tblInd");
2317if (this.tblBorders != null)
2318this.tblBorders.Write(sw, "tblBorders");
2319if (this.shd != null)
2320this.shd.Write(sw, "shd");
2321if (this.tblLayout != null)
2322this.tblLayout.Write(sw, "tblLayout");
2323if (this.tblCellMar != null)
2324this.tblCellMar.Write(sw, "tblCellMar");
2325if (this.tblLook != null)
2326this.tblLook.Write(sw, "tblLook");
2327sw.WriteEndW(nodeName);
2328}
2329
2330public CT_TblPrEx()
2331{
2332}
2333
2334[XmlElement(Order = 0)]
2335public CT_TblPrExChange tblPrExChange
2336{
2337get
2338{
2339return this.tblPrExChangeField;
2340}
2341set
2342{
2343this.tblPrExChangeField = value;
2344}
2345}
2346}
2347
2348[Serializable]
2349
2350[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2351[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2352public class CT_TblBorders
2353{
2354
2355private CT_Border topField;
2356
2357private CT_Border leftField;
2358
2359private CT_Border bottomField;
2360
2361private CT_Border rightField;
2362
2363private CT_Border insideHField;
2364
2365private CT_Border insideVField;
2366
2367public CT_TblBorders()
2368{
2369}
2370public static CT_TblBorders Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2371{
2372if (node == null)
2373return null;
2374CT_TblBorders ctObj = new CT_TblBorders();
2375foreach (XmlNode childNode in node.ChildNodes)
2376{
2377if (childNode.LocalName == "top")
2378ctObj.top = CT_Border.Parse(childNode, namespaceManager);
2379else if (childNode.LocalName == "left")
2380ctObj.left = CT_Border.Parse(childNode, namespaceManager);
2381else if (childNode.LocalName == "bottom")
2382ctObj.bottom = CT_Border.Parse(childNode, namespaceManager);
2383else if (childNode.LocalName == "right")
2384ctObj.right = CT_Border.Parse(childNode, namespaceManager);
2385else if (childNode.LocalName == "insideH")
2386ctObj.insideH = CT_Border.Parse(childNode, namespaceManager);
2387else if (childNode.LocalName == "insideV")
2388ctObj.insideV = CT_Border.Parse(childNode, namespaceManager);
2389}
2390return ctObj;
2391}
2392
2393
2394
2395internal void Write(StreamWriter sw, string nodeName)
2396{
2397sw.Write(string.Format("<w:{0}", nodeName));
2398sw.Write(">");
2399if (this.top != null)
2400this.top.Write(sw, "top");
2401if (this.left != null)
2402this.left.Write(sw, "left");
2403if (this.bottom != null)
2404this.bottom.Write(sw, "bottom");
2405if (this.right != null)
2406this.right.Write(sw, "right");
2407if (this.insideH != null)
2408this.insideH.Write(sw, "insideH");
2409if (this.insideV != null)
2410this.insideV.Write(sw, "insideV");
2411sw.WriteEndW(nodeName);
2412}
2413
2414[XmlElement(Order = 0)]
2415public CT_Border top
2416{
2417get
2418{
2419return this.topField;
2420}
2421set
2422{
2423this.topField = value;
2424}
2425}
2426
2427[XmlElement(Order = 1)]
2428public CT_Border left
2429{
2430get
2431{
2432return this.leftField;
2433}
2434set
2435{
2436this.leftField = value;
2437}
2438}
2439
2440[XmlElement(Order = 2)]
2441public CT_Border bottom
2442{
2443get
2444{
2445return this.bottomField;
2446}
2447set
2448{
2449this.bottomField = value;
2450}
2451}
2452
2453[XmlElement(Order = 3)]
2454public CT_Border right
2455{
2456get
2457{
2458return this.rightField;
2459}
2460set
2461{
2462this.rightField = value;
2463}
2464}
2465
2466[XmlElement(Order = 4)]
2467public CT_Border insideH
2468{
2469get
2470{
2471return this.insideHField;
2472}
2473set
2474{
2475this.insideHField = value;
2476}
2477}
2478
2479[XmlElement(Order = 5)]
2480public CT_Border insideV
2481{
2482get
2483{
2484return this.insideVField;
2485}
2486set
2487{
2488this.insideVField = value;
2489}
2490}
2491
2492public CT_Border AddNewBottom()
2493{
2494if (this.bottomField == null)
2495this.bottomField = new CT_Border();
2496return this.bottomField;
2497}
2498
2499public CT_Border AddNewLeft()
2500{
2501if (this.leftField == null)
2502this.leftField = new CT_Border();
2503return this.leftField;
2504}
2505
2506public CT_Border AddNewRight()
2507{
2508if (this.rightField == null)
2509this.rightField = new CT_Border();
2510return this.rightField;
2511}
2512
2513public CT_Border AddNewTop()
2514{
2515if (this.topField == null)
2516this.topField = new CT_Border();
2517return this.topField;
2518}
2519
2520public CT_Border AddNewInsideH()
2521{
2522if (this.insideHField == null)
2523this.insideHField = new CT_Border();
2524return this.insideHField;
2525}
2526
2527public CT_Border AddNewInsideV()
2528{
2529if (this.insideVField == null)
2530this.insideVField = new CT_Border();
2531return this.insideVField;
2532}
2533
2534public bool IsSetInsideH()
2535{
2536return this.insideH != null;
2537}
2538
2539public bool IsSetInsideV()
2540{
2541return this.insideV != null;
2542}
2543}
2544
2545
2546[Serializable]
2547
2548[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2549[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2550public class CT_TblLayoutType
2551{
2552
2553private ST_TblLayoutType typeField;
2554
2555private bool typeFieldSpecified;
2556public static CT_TblLayoutType Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2557{
2558if (node == null)
2559return null;
2560CT_TblLayoutType ctObj = new CT_TblLayoutType();
2561if (node.Attributes["w:type"] != null)
2562ctObj.type = (ST_TblLayoutType)Enum.Parse(typeof(ST_TblLayoutType), node.Attributes["w:type"].Value);
2563return ctObj;
2564}
2565
2566
2567
2568internal void Write(StreamWriter sw, string nodeName)
2569{
2570sw.Write(string.Format("<w:{0}", nodeName));
2571XmlHelper.WriteAttribute(sw, "w:type", this.type.ToString());
2572sw.Write("/>");
2573}
2574
2575[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
2576public ST_TblLayoutType type
2577{
2578get
2579{
2580return this.typeField;
2581}
2582set
2583{
2584this.typeField = value;
2585}
2586}
2587
2588[XmlIgnore]
2589public bool typeSpecified
2590{
2591get
2592{
2593return this.typeFieldSpecified;
2594}
2595set
2596{
2597this.typeFieldSpecified = value;
2598}
2599}
2600}
2601
2602
2603[Serializable]
2604[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2605public enum ST_TblLayoutType
2606{
2607
2608
2609@fixed,
2610
2611
2612autofit,
2613}
2614
2615
2616[Serializable]
2617
2618[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2619[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2620public class CT_TblCellMar
2621{
2622
2623private CT_TblWidth topField;
2624
2625private CT_TblWidth leftField;
2626
2627private CT_TblWidth bottomField;
2628
2629private CT_TblWidth rightField;
2630public static CT_TblCellMar Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2631{
2632if (node == null)
2633return null;
2634CT_TblCellMar ctObj = new CT_TblCellMar();
2635foreach (XmlNode childNode in node.ChildNodes)
2636{
2637if (childNode.LocalName == "top")
2638ctObj.top = CT_TblWidth.Parse(childNode, namespaceManager);
2639else if (childNode.LocalName == "left")
2640ctObj.left = CT_TblWidth.Parse(childNode, namespaceManager);
2641else if (childNode.LocalName == "bottom")
2642ctObj.bottom = CT_TblWidth.Parse(childNode, namespaceManager);
2643else if (childNode.LocalName == "right")
2644ctObj.right = CT_TblWidth.Parse(childNode, namespaceManager);
2645}
2646return ctObj;
2647}
2648
2649
2650
2651internal void Write(StreamWriter sw, string nodeName)
2652{
2653sw.Write(string.Format("<w:{0}", nodeName));
2654sw.Write(">");
2655if (this.top != null)
2656this.top.Write(sw, "top");
2657if (this.left != null)
2658this.left.Write(sw, "left");
2659if (this.bottom != null)
2660this.bottom.Write(sw, "bottom");
2661if (this.right != null)
2662this.right.Write(sw, "right");
2663sw.WriteEndW(nodeName);
2664}
2665
2666public CT_TblCellMar()
2667{
2668//this.rightField = new CT_TblWidth();
2669//this.bottomField = new CT_TblWidth();
2670//this.leftField = new CT_TblWidth();
2671//this.topField = new CT_TblWidth();
2672}
2673
2674[XmlElement(Order = 0)]
2675public CT_TblWidth top
2676{
2677get
2678{
2679return this.topField;
2680}
2681set
2682{
2683this.topField = value;
2684}
2685}
2686
2687[XmlElement(Order = 1)]
2688public CT_TblWidth left
2689{
2690get
2691{
2692return this.leftField;
2693}
2694set
2695{
2696this.leftField = value;
2697}
2698}
2699
2700[XmlElement(Order = 2)]
2701public CT_TblWidth bottom
2702{
2703get
2704{
2705return this.bottomField;
2706}
2707set
2708{
2709this.bottomField = value;
2710}
2711}
2712
2713[XmlElement(Order = 3)]
2714public CT_TblWidth right
2715{
2716get
2717{
2718return this.rightField;
2719}
2720set
2721{
2722this.rightField = value;
2723}
2724}
2725
2726public bool IsSetLeft()
2727{
2728return this.leftField != null;
2729}
2730
2731public bool IsSetTop()
2732{
2733return this.topField != null;
2734}
2735
2736public bool IsSetBottom()
2737{
2738return this.bottomField != null;
2739}
2740
2741public bool IsSetRight()
2742{
2743return this.rightField != null;
2744}
2745
2746public CT_TblWidth AddNewLeft()
2747{
2748this.leftField = new CT_TblWidth();
2749return this.leftField;
2750}
2751
2752public CT_TblWidth AddNewTop()
2753{
2754this.topField = new CT_TblWidth();
2755return this.topField;
2756}
2757
2758public CT_TblWidth AddNewBottom()
2759{
2760this.bottomField = new CT_TblWidth();
2761return this.bottomField;
2762}
2763
2764public CT_TblWidth AddNewRight()
2765{
2766this.rightField = new CT_TblWidth();
2767return this.rightField;
2768}
2769}
2770
2771
2772
2773
2774[Serializable]
2775
2776[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2777[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2778public class CT_TblPr : CT_TblPrBase
2779{
2780
2781private CT_TblPrChange tblPrChangeField;
2782public static new CT_TblPr Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2783{
2784if (node == null)
2785return null;
2786CT_TblPr ctObj = new CT_TblPr();
2787foreach (XmlNode childNode in node.ChildNodes)
2788{
2789if (childNode.LocalName == "tblPrChange")
2790ctObj.tblPrChange = CT_TblPrChange.Parse(childNode, namespaceManager);
2791else if (childNode.LocalName == "tblStyle")
2792ctObj.tblStyle = CT_String.Parse(childNode, namespaceManager);
2793else if (childNode.LocalName == "tblpPr")
2794ctObj.tblpPr = CT_TblPPr.Parse(childNode, namespaceManager);
2795else if (childNode.LocalName == "tblOverlap")
2796ctObj.tblOverlap = CT_TblOverlap.Parse(childNode, namespaceManager);
2797else if (childNode.LocalName == "bidiVisual")
2798ctObj.bidiVisual = CT_OnOff.Parse(childNode, namespaceManager);
2799else if (childNode.LocalName == "tblStyleRowBandSize")
2800ctObj.tblStyleRowBandSize = CT_DecimalNumber.Parse(childNode, namespaceManager);
2801else if (childNode.LocalName == "tblStyleColBandSize")
2802ctObj.tblStyleColBandSize = CT_DecimalNumber.Parse(childNode, namespaceManager);
2803else if (childNode.LocalName == "tblW")
2804ctObj.tblW = CT_TblWidth.Parse(childNode, namespaceManager);
2805else if (childNode.LocalName == "jc")
2806ctObj.jc = CT_Jc.Parse(childNode, namespaceManager);
2807else if (childNode.LocalName == "tblCellSpacing")
2808ctObj.tblCellSpacing = CT_TblWidth.Parse(childNode, namespaceManager);
2809else if (childNode.LocalName == "tblInd")
2810ctObj.tblInd = CT_TblWidth.Parse(childNode, namespaceManager);
2811else if (childNode.LocalName == "tblBorders")
2812ctObj.tblBorders = CT_TblBorders.Parse(childNode, namespaceManager);
2813else if (childNode.LocalName == "shd")
2814ctObj.shd = CT_Shd.Parse(childNode, namespaceManager);
2815else if (childNode.LocalName == "tblLayout")
2816ctObj.tblLayout = CT_TblLayoutType.Parse(childNode, namespaceManager);
2817else if (childNode.LocalName == "tblCellMar")
2818ctObj.tblCellMar = CT_TblCellMar.Parse(childNode, namespaceManager);
2819else if (childNode.LocalName == "tblLook")
2820ctObj.tblLook = CT_ShortHexNumber.Parse(childNode, namespaceManager);
2821else if (childNode.LocalName == "tblCaption")
2822ctObj.tblCaption = CT_String.Parse(childNode, namespaceManager);
2823else if (childNode.LocalName == "tblDescription")
2824ctObj.tblDescription = CT_String.Parse(childNode, namespaceManager);
2825}
2826return ctObj;
2827}
2828
2829
2830
2831internal new void Write(StreamWriter sw, string nodeName)
2832{
2833sw.Write(string.Format("<w:{0}", nodeName));
2834sw.Write(">");
2835if (this.tblPrChange != null)
2836this.tblPrChange.Write(sw, "tblPrChange");
2837if (this.tblStyle != null)
2838this.tblStyle.Write(sw, "tblStyle");
2839if (this.tblpPr != null)
2840this.tblpPr.Write(sw, "tblpPr");
2841if (this.tblOverlap != null)
2842this.tblOverlap.Write(sw, "tblOverlap");
2843if (this.bidiVisual != null)
2844this.bidiVisual.Write(sw, "bidiVisual");
2845if (this.tblStyleRowBandSize != null)
2846this.tblStyleRowBandSize.Write(sw, "tblStyleRowBandSize");
2847if (this.tblStyleColBandSize != null)
2848this.tblStyleColBandSize.Write(sw, "tblStyleColBandSize");
2849if (this.tblW != null)
2850this.tblW.Write(sw, "tblW");
2851if (this.jc != null)
2852this.jc.Write(sw, "jc");
2853if (this.tblCellSpacing != null)
2854this.tblCellSpacing.Write(sw, "tblCellSpacing");
2855if (this.tblInd != null)
2856this.tblInd.Write(sw, "tblInd");
2857if (this.tblBorders != null)
2858this.tblBorders.Write(sw, "tblBorders");
2859if (this.shd != null)
2860this.shd.Write(sw, "shd");
2861if (this.tblLayout != null)
2862this.tblLayout.Write(sw, "tblLayout");
2863if (this.tblCellMar != null)
2864this.tblCellMar.Write(sw, "tblCellMar");
2865if (this.tblLook != null)
2866this.tblLook.Write(sw, "tblLook");
2867if (this.tblCaption != null)
2868this.tblCaption.Write(sw, "tblCaption");
2869if (this.tblDescription != null)
2870this.tblDescription.Write(sw, "tblDescription");
2871sw.WriteEndW(nodeName);
2872}
2873
2874public CT_TblPr()
2875{
2876//this.tblPrChangeField = new CT_TblPrChange();
2877}
2878
2879[XmlElement(Order = 0)]
2880public CT_TblPrChange tblPrChange
2881{
2882get
2883{
2884return this.tblPrChangeField;
2885}
2886set
2887{
2888this.tblPrChangeField = value;
2889}
2890}
2891
2892public CT_TblLayoutType AddNewTblLayout()
2893{
2894this.tblLayout = new CT_TblLayoutType();
2895return this.tblLayout;
2896}
2897
2898public CT_TblPPr AddNewTblPPr()
2899{
2900this.tblpPr = new CT_TblPPr();
2901return this.tblpPr;
2902}
2903}
2904
2905
2906[Serializable]
2907
2908[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2909[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2910public class CT_TrPrChange : CT_TrackChange
2911{
2912
2913private CT_TrPrBase trPrField;
2914
2915public CT_TrPrChange()
2916{
2917
2918}
2919public static new CT_TrPrChange Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2920{
2921if (node == null)
2922return null;
2923CT_TrPrChange ctObj = new CT_TrPrChange();
2924ctObj.author = XmlHelper.ReadString(node.Attributes["w:author"]);
2925ctObj.date = XmlHelper.ReadString(node.Attributes["w:date"]);
2926ctObj.id = XmlHelper.ReadString(node.Attributes["r:id"]);
2927foreach (XmlNode childNode in node.ChildNodes)
2928{
2929if (childNode.LocalName == "trPr")
2930ctObj.trPr = CT_TrPrBase.Parse(childNode, namespaceManager);
2931}
2932return ctObj;
2933}
2934
2935
2936
2937internal new void Write(StreamWriter sw, string nodeName)
2938{
2939sw.Write(string.Format("<w:{0}", nodeName));
2940XmlHelper.WriteAttribute(sw, "w:author", this.author);
2941XmlHelper.WriteAttribute(sw, "w:date", this.date);
2942XmlHelper.WriteAttribute(sw, "r:id", this.id);
2943sw.Write(">");
2944if (this.trPr != null)
2945this.trPr.Write(sw, "trPr");
2946sw.WriteEndW(nodeName);
2947}
2948
2949[XmlElement(Order = 0)]
2950public CT_TrPrBase trPr
2951{
2952get
2953{
2954return this.trPrField;
2955}
2956set
2957{
2958this.trPrField = value;
2959}
2960}
2961}
2962
2963[XmlInclude(typeof(CT_TrPr))]
2964
2965[Serializable]
2966
2967[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2968[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2969public class CT_TrPrBase
2970{
2971
2972private ArrayList itemsField;
2973
2974private List<ItemsChoiceType2> itemsElementNameField;
2975
2976public CT_TrPrBase()
2977{
2978this.itemsElementNameField = new List<ItemsChoiceType2>();
2979this.itemsField = new ArrayList();
2980}
2981public static CT_TrPrBase Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2982{
2983if (node == null)
2984return null;
2985CT_TrPrBase ctObj = new CT_TrPrBase();
2986foreach (XmlNode childNode in node.ChildNodes)
2987{
2988if (childNode.LocalName == "gridBefore")
2989{
2990ctObj.Items.Add(CT_DecimalNumber.Parse(childNode, namespaceManager));
2991ctObj.ItemsElementName.Add(ItemsChoiceType2.gridBefore);
2992}
2993else if (childNode.LocalName == "cantSplit")
2994{
2995ctObj.Items.Add(CT_OnOff.Parse(childNode, namespaceManager));
2996ctObj.ItemsElementName.Add(ItemsChoiceType2.cantSplit);
2997}
2998else if (childNode.LocalName == "cnfStyle")
2999{
3000ctObj.Items.Add(CT_Cnf.Parse(childNode, namespaceManager));
3001ctObj.ItemsElementName.Add(ItemsChoiceType2.cnfStyle);
3002}
3003else if (childNode.LocalName == "divId")
3004{
3005ctObj.Items.Add(CT_DecimalNumber.Parse(childNode, namespaceManager));
3006ctObj.ItemsElementName.Add(ItemsChoiceType2.divId);
3007}
3008else if (childNode.LocalName == "gridAfter")
3009{
3010ctObj.Items.Add(CT_DecimalNumber.Parse(childNode, namespaceManager));
3011ctObj.ItemsElementName.Add(ItemsChoiceType2.gridAfter);
3012}
3013else if (childNode.LocalName == "trHeight")
3014{
3015ctObj.Items.Add(CT_Height.Parse(childNode, namespaceManager));
3016ctObj.ItemsElementName.Add(ItemsChoiceType2.trHeight);
3017}
3018else if (childNode.LocalName == "hidden")
3019{
3020ctObj.Items.Add(CT_OnOff.Parse(childNode, namespaceManager));
3021ctObj.ItemsElementName.Add(ItemsChoiceType2.hidden);
3022}
3023else if (childNode.LocalName == "tblCellSpacing")
3024{
3025ctObj.Items.Add(CT_TblWidth.Parse(childNode, namespaceManager));
3026ctObj.ItemsElementName.Add(ItemsChoiceType2.tblCellSpacing);
3027}
3028else if (childNode.LocalName == "tblHeader")
3029{
3030ctObj.Items.Add(CT_OnOff.Parse(childNode, namespaceManager));
3031ctObj.ItemsElementName.Add(ItemsChoiceType2.tblHeader);
3032}
3033else if (childNode.LocalName == "jc")
3034{
3035ctObj.Items.Add(CT_Jc.Parse(childNode, namespaceManager));
3036ctObj.ItemsElementName.Add(ItemsChoiceType2.jc);
3037}
3038else if (childNode.LocalName == "wAfter")
3039{
3040ctObj.Items.Add(CT_TblWidth.Parse(childNode, namespaceManager));
3041ctObj.ItemsElementName.Add(ItemsChoiceType2.wAfter);
3042}
3043else if (childNode.LocalName == "wBefore")
3044{
3045ctObj.Items.Add(CT_TblWidth.Parse(childNode, namespaceManager));
3046ctObj.ItemsElementName.Add(ItemsChoiceType2.wBefore);
3047}
3048}
3049return ctObj;
3050}
3051
3052internal void Write(StreamWriter sw, string nodeName)
3053{
3054sw.Write(string.Format("<w:{0}", nodeName));
3055sw.Write(">");
3056for (int i = 0; i < this.Items.Count; i++)
3057{
3058object o = this.Items[i];
3059if (o is CT_DecimalNumber
3060&& this.ItemsElementName[i] == ItemsChoiceType2.gridBefore)
3061((CT_DecimalNumber)o).Write(sw, "gridBefore");
3062else if (o is CT_OnOff
3063&& this.ItemsElementName[i] == ItemsChoiceType2.cantSplit)
3064((CT_OnOff)o).Write(sw, "cantSplit");
3065else if (o is CT_Cnf
3066&& this.ItemsElementName[i] == ItemsChoiceType2.cnfStyle)
3067((CT_Cnf)o).Write(sw, "cnfStyle");
3068else if (o is CT_DecimalNumber
3069&& this.ItemsElementName[i] == ItemsChoiceType2.divId)
3070((CT_DecimalNumber)o).Write(sw, "divId");
3071else if (o is CT_DecimalNumber
3072&& this.ItemsElementName[i] == ItemsChoiceType2.gridAfter)
3073((CT_DecimalNumber)o).Write(sw, "gridAfter");
3074else if (o is CT_Height
3075&& this.ItemsElementName[i] == ItemsChoiceType2.trHeight)
3076((CT_Height)o).Write(sw, "trHeight");
3077else if (o is CT_OnOff
3078&& this.ItemsElementName[i] == ItemsChoiceType2.hidden)
3079((CT_OnOff)o).Write(sw, "hidden");
3080else if (o is CT_TblWidth
3081&& this.ItemsElementName[i] == ItemsChoiceType2.tblCellSpacing)
3082((CT_TblWidth)o).Write(sw, "tblCellSpacing");
3083else if (o is CT_OnOff
3084&& this.ItemsElementName[i] == ItemsChoiceType2.tblHeader)
3085((CT_OnOff)o).Write(sw, "tblHeader");
3086else if (o is CT_Jc
3087&& this.ItemsElementName[i] == ItemsChoiceType2.jc)
3088((CT_Jc)o).Write(sw, "jc");
3089else if (o is CT_TblWidth
3090&& this.ItemsElementName[i] == ItemsChoiceType2.wAfter)
3091((CT_TblWidth)o).Write(sw, "wAfter");
3092else if (o is CT_TblWidth
3093&& this.ItemsElementName[i] == ItemsChoiceType2.wBefore)
3094((CT_TblWidth)o).Write(sw, "wBefore");
3095}
3096sw.WriteEndW(nodeName);
3097}
3098
3099[XmlElement("cantSplit", typeof(CT_OnOff), Order = 0)]
3100[XmlElement("cnfStyle", typeof(CT_Cnf), Order = 0)]
3101[XmlElement("divId", typeof(CT_DecimalNumber), Order = 0)]
3102[XmlElement("gridAfter", typeof(CT_DecimalNumber), Order = 0)]
3103[XmlElement("gridBefore", typeof(CT_DecimalNumber), Order = 0)]
3104[XmlElement("hidden", typeof(CT_OnOff), Order = 0)]
3105[XmlElement("jc", typeof(CT_Jc), Order = 0)]
3106[XmlElement("tblCellSpacing", typeof(CT_TblWidth), Order = 0)]
3107[XmlElement("tblHeader", typeof(CT_OnOff), Order = 0)]
3108[XmlElement("trHeight", typeof(CT_Height), Order = 0)]
3109[XmlElement("wAfter", typeof(CT_TblWidth), Order = 0)]
3110[XmlElement("wBefore", typeof(CT_TblWidth), Order = 0)]
3111[XmlChoiceIdentifier("ItemsElementName")]
3112public ArrayList Items
3113{
3114get
3115{
3116return this.itemsField;
3117}
3118set
3119{
3120this.itemsField = value;
3121}
3122}
3123
3124[XmlElement("ItemsElementName", Order = 1)]
3125[XmlIgnore]
3126public List<ItemsChoiceType2> ItemsElementName
3127{
3128get
3129{
3130return this.itemsElementNameField;
3131}
3132set
3133{
3134this.itemsElementNameField = value;
3135}
3136}
3137
3138public List<CT_OnOff > GetCantSplitList () { return GetObjectList<CT_OnOff >(ItemsChoiceType2.cantSplit ); }
3139public List<CT_Cnf > GetCnfStyleList () { return GetObjectList<CT_Cnf >(ItemsChoiceType2.cnfStyle ); }
3140public List<CT_DecimalNumber> GetDivIdList () { return GetObjectList<CT_DecimalNumber>(ItemsChoiceType2.divId ); }
3141public List<CT_DecimalNumber> GetGridAfterList () { return GetObjectList<CT_DecimalNumber>(ItemsChoiceType2.gridAfter ); }
3142public List<CT_DecimalNumber> GetGridBeforeList () { return GetObjectList<CT_DecimalNumber>(ItemsChoiceType2.gridBefore ); }
3143public List<CT_OnOff > GetHiddenList () { return GetObjectList<CT_OnOff >(ItemsChoiceType2.hidden ); }
3144public List<CT_Jc > GetJcList () { return GetObjectList<CT_Jc >(ItemsChoiceType2.jc ); }
3145public List<CT_TblWidth > GetTblCellSpacingList() { return GetObjectList<CT_TblWidth >(ItemsChoiceType2.tblCellSpacing); }
3146public List<CT_OnOff > GetTblHeaderList () { return GetObjectList<CT_OnOff >(ItemsChoiceType2.tblHeader ); }
3147public List<CT_Height > GetTrHeightList () { return GetObjectList<CT_Height >(ItemsChoiceType2.trHeight ); }
3148public List<CT_TblWidth > GetWAfterList () { return GetObjectList<CT_TblWidth >(ItemsChoiceType2.wAfter ); }
3149public List<CT_TblWidth > GetWBeforeList () { return GetObjectList<CT_TblWidth >(ItemsChoiceType2.wBefore ); }
3150
3151public int SizeOfCantSplitArray () { return SizeOfArray(ItemsChoiceType2.cantSplit ); }
3152public int SizeOfCnfStyleArray () { return SizeOfArray(ItemsChoiceType2.cnfStyle ); }
3153public int SizeOfDivIdArray () { return SizeOfArray(ItemsChoiceType2.divId ); }
3154public int SizeOfGridAfterArray () { return SizeOfArray(ItemsChoiceType2.gridAfter ); }
3155public int SizeOfGridBeforeArray () { return SizeOfArray(ItemsChoiceType2.gridBefore ); }
3156public int SizeOfHiddenArray () { return SizeOfArray(ItemsChoiceType2.hidden ); }
3157public int SizeOfJcArray () { return SizeOfArray(ItemsChoiceType2.jc ); }
3158public int SizeOfTblCellSpacingArray() { return SizeOfArray(ItemsChoiceType2.tblCellSpacing); }
3159public int SizeOfTblHeaderArray () { return SizeOfArray(ItemsChoiceType2.tblHeader ); }
3160public int SizeOfTrHeightArray () { return SizeOfArray(ItemsChoiceType2.trHeight ); }
3161public int SizeOfWAfterArray () { return SizeOfArray(ItemsChoiceType2.wAfter ); }
3162public int SizeOfWBeforeArray () { return SizeOfArray(ItemsChoiceType2.wBefore ); }
3163
3164public CT_OnOff GetCantSplitArray (int p) { return GetObjectArray<CT_OnOff >(p, ItemsChoiceType2.cantSplit ); }
3165public CT_Cnf GetCnfStyleArray (int p) { return GetObjectArray<CT_Cnf >(p, ItemsChoiceType2.cnfStyle ); }
3166public CT_DecimalNumber GetDivIdArray (int p) { return GetObjectArray<CT_DecimalNumber>(p, ItemsChoiceType2.divId ); }
3167public CT_DecimalNumber GetGridAfterArray (int p) { return GetObjectArray<CT_DecimalNumber>(p, ItemsChoiceType2.gridAfter ); }
3168public CT_DecimalNumber GetGridBeforeArray (int p) { return GetObjectArray<CT_DecimalNumber>(p, ItemsChoiceType2.gridBefore ); }
3169public CT_OnOff GetHiddenArray (int p) { return GetObjectArray<CT_OnOff >(p, ItemsChoiceType2.hidden ); }
3170public CT_Jc GetJcArray (int p) { return GetObjectArray<CT_Jc >(p, ItemsChoiceType2.jc ); }
3171public CT_TblWidth GetTblCellSpacingArray(int p) { return GetObjectArray<CT_TblWidth >(p, ItemsChoiceType2.tblCellSpacing); }
3172public CT_OnOff GetTblHeaderArray (int p) { return GetObjectArray<CT_OnOff >(p, ItemsChoiceType2.tblHeader ); }
3173public CT_Height GetTrHeightArray (int p) { return GetObjectArray<CT_Height >(p, ItemsChoiceType2.trHeight ); }
3174public CT_TblWidth GetWAfterArray (int p) { return GetObjectArray<CT_TblWidth >(p, ItemsChoiceType2.wAfter ); }
3175public CT_TblWidth GetWBeforeArray (int p) { return GetObjectArray<CT_TblWidth >(p, ItemsChoiceType2.wBefore ); }
3176
3177public CT_OnOff InsertNewNewCantSplit (int p) { return InsertNewObject<CT_OnOff >(ItemsChoiceType2.cantSplit , p); }
3178public CT_Cnf InsertNewNewCnfStyle (int p) { return InsertNewObject<CT_Cnf >(ItemsChoiceType2.cnfStyle , p); }
3179public CT_DecimalNumber InsertNewNewDivId (int p) { return InsertNewObject<CT_DecimalNumber>(ItemsChoiceType2.divId , p); }
3180public CT_DecimalNumber InsertNewNewGridAfter (int p) { return InsertNewObject<CT_DecimalNumber>(ItemsChoiceType2.gridAfter , p); }
3181public CT_DecimalNumber InsertNewNewGridBefore (int p) { return InsertNewObject<CT_DecimalNumber>(ItemsChoiceType2.gridBefore , p); }
3182public CT_OnOff InsertNewNewHidden (int p) { return InsertNewObject<CT_OnOff >(ItemsChoiceType2.hidden , p); }
3183public CT_Jc InsertNewNewJc (int p) { return InsertNewObject<CT_Jc >(ItemsChoiceType2.jc , p); }
3184public CT_TblWidth InsertNewNewTblCellSpacing(int p) { return InsertNewObject<CT_TblWidth >(ItemsChoiceType2.tblCellSpacing, p); }
3185public CT_OnOff InsertNewNewTblHeader (int p) { return InsertNewObject<CT_OnOff >(ItemsChoiceType2.tblHeader , p); }
3186public CT_Height InsertNewNewTrHeight (int p) { return InsertNewObject<CT_Height >(ItemsChoiceType2.trHeight , p); }
3187public CT_TblWidth InsertNewNewWAfter (int p) { return InsertNewObject<CT_TblWidth >(ItemsChoiceType2.wAfter , p); }
3188public CT_TblWidth InsertNewNewWBefore (int p) { return InsertNewObject<CT_TblWidth >(ItemsChoiceType2.wBefore , p); }
3189
3190public CT_OnOff AddNewCantSplit () { return AddNewObject<CT_OnOff >(ItemsChoiceType2.cantSplit ); }
3191public CT_Cnf AddNewCnfStyle () { return AddNewObject<CT_Cnf >(ItemsChoiceType2.cnfStyle ); }
3192public CT_DecimalNumber AddNewDivId () { return AddNewObject<CT_DecimalNumber>(ItemsChoiceType2.divId ); }
3193public CT_DecimalNumber AddNewGridAfter () { return AddNewObject<CT_DecimalNumber>(ItemsChoiceType2.gridAfter ); }
3194public CT_DecimalNumber AddNewGridBefore () { return AddNewObject<CT_DecimalNumber>(ItemsChoiceType2.gridBefore ); }
3195public CT_OnOff AddNewHidden () { return AddNewObject<CT_OnOff >(ItemsChoiceType2.hidden ); }
3196public CT_Jc AddNewJc () { return AddNewObject<CT_Jc >(ItemsChoiceType2.jc ); }
3197public CT_TblWidth AddNewTblCellSpacing() { return AddNewObject<CT_TblWidth >(ItemsChoiceType2.tblCellSpacing); }
3198public CT_OnOff AddNewTblHeader () { return AddNewObject<CT_OnOff >(ItemsChoiceType2.tblHeader ); }
3199public CT_Height AddNewTrHeight () { return AddNewObject<CT_Height >(ItemsChoiceType2.trHeight ); }
3200public CT_TblWidth AddNewWAfter () { return AddNewObject<CT_TblWidth >(ItemsChoiceType2.wAfter ); }
3201public CT_TblWidth AddNewWBefore () { return AddNewObject<CT_TblWidth >(ItemsChoiceType2.wBefore ); }
3202
3203public void SetCantSplit (int p, CT_OnOff obj) { SetObject(ItemsChoiceType2.cantSplit , p, obj); }
3204public void SetCnfStyle (int p, CT_Cnf obj) { SetObject(ItemsChoiceType2.cnfStyle , p, obj); }
3205public void SetDivId (int p, CT_DecimalNumber obj) { SetObject(ItemsChoiceType2.divId , p, obj); }
3206public void SetGridAfter (int p, CT_DecimalNumber obj) { SetObject(ItemsChoiceType2.gridAfter , p, obj); }
3207public void SetGridBefore (int p, CT_DecimalNumber obj) { SetObject(ItemsChoiceType2.gridBefore , p, obj); }
3208public void SetHidden (int p, CT_OnOff obj) { SetObject(ItemsChoiceType2.hidden , p, obj); }
3209public void SetJc (int p, CT_Jc obj) { SetObject(ItemsChoiceType2.jc , p, obj); }
3210public void SetTblCellSpacing(int p, CT_TblWidth obj) { SetObject(ItemsChoiceType2.tblCellSpacing, p, obj); }
3211public void SetTblHeader (int p, CT_OnOff obj) { SetObject(ItemsChoiceType2.tblHeader , p, obj); }
3212public void SetTrHeight (int p, CT_Height obj) { SetObject(ItemsChoiceType2.trHeight , p, obj); }
3213public void SetWAfter (int p, CT_TblWidth obj) { SetObject(ItemsChoiceType2.wAfter , p, obj); }
3214public void SetWBefore (int p, CT_TblWidth obj) { SetObject(ItemsChoiceType2.wBefore , p, obj); }
3215
3216public void RemoveCantSplit (int p) { RemoveObject(ItemsChoiceType2.cantSplit , p); }
3217public void RemoveCnfStyle (int p) { RemoveObject(ItemsChoiceType2.cnfStyle , p); }
3218public void RemoveDivId (int p) { RemoveObject(ItemsChoiceType2.divId , p); }
3219public void RemoveGridAfter (int p) { RemoveObject(ItemsChoiceType2.gridAfter , p); }
3220public void RemoveGridBefore (int p) { RemoveObject(ItemsChoiceType2.gridBefore , p); }
3221public void RemoveHidden (int p) { RemoveObject(ItemsChoiceType2.hidden , p); }
3222public void RemoveJc (int p) { RemoveObject(ItemsChoiceType2.jc , p); }
3223public void RemoveTblCellSpacing(int p) { RemoveObject(ItemsChoiceType2.tblCellSpacing, p); }
3224public void RemoveTblHeader (int p) { RemoveObject(ItemsChoiceType2.tblHeader , p); }
3225public void RemoveTrHeight (int p) { RemoveObject(ItemsChoiceType2.trHeight , p); }
3226public void RemoveWAfter (int p) { RemoveObject(ItemsChoiceType2.wAfter , p); }
3227public void RemoveWBefore (int p) { RemoveObject(ItemsChoiceType2.wBefore , p); }
3228
3229#region Generic methods for object operation
3230private List<T> GetObjectList<T>(ItemsChoiceType2 type) where T : class
3231{
3232lock (this)
3233{
3234List<T> list = new List<T>();
3235for (int i = 0; i < itemsElementNameField.Count; i++)
3236{
3237if (itemsElementNameField[i] == type)
3238list.Add(itemsField[i] as T);
3239}
3240return list;
3241}
3242}
3243private int SizeOfArray(ItemsChoiceType2 type)
3244{
3245lock (this)
3246{
3247int size = 0;
3248for (int i = 0; i < itemsElementNameField.Count; i++)
3249{
3250if (itemsElementNameField[i] == type)
3251size++;
3252}
3253return size;
3254}
3255}
3256private T GetObjectArray<T>(int p, ItemsChoiceType2 type) where T : class
3257{
3258lock (this)
3259{
3260int pos = GetObjectIndex(type, p);
3261if (pos < 0 || pos >= this.itemsField.Count)
3262return null;
3263return itemsField[pos] as T;
3264}
3265}
3266private T InsertNewObject<T>(ItemsChoiceType2 type, int p) where T : class, new()
3267{
3268T t = new T();
3269lock (this)
3270{
3271int pos = GetObjectIndex(type, p);
3272this.itemsElementNameField.Insert(pos, type);
3273this.itemsField.Insert(pos, t);
3274}
3275return t;
3276}
3277private T AddNewObject<T>(ItemsChoiceType2 type) where T : class, new()
3278{
3279T t = new T();
3280lock (this)
3281{
3282this.itemsElementNameField.Add(type);
3283this.itemsField.Add(t);
3284}
3285return t;
3286}
3287private void SetObject<T>(ItemsChoiceType2 type, int p, T obj) where T : class
3288{
3289lock (this)
3290{
3291int pos = GetObjectIndex(type, p);
3292if (pos < 0 || pos >= this.itemsField.Count)
3293return;
3294if (this.itemsField[pos] is T)
3295this.itemsField[pos] = obj;
3296else
3297throw new Exception(string.Format(@"object types are difference, itemsField[{0}] is {1}, and parameter obj is {2}",
3298pos, this.itemsField[pos].GetType().Name, typeof(T).Name));
3299}
3300}
3301private int GetObjectIndex(ItemsChoiceType2 type, int p)
3302{
3303int index = -1;
3304int pos = 0;
3305for (int i = 0; i < itemsElementNameField.Count; i++)
3306{
3307if (itemsElementNameField[i] == type)
3308{
3309if (pos == p)
3310{
3311index = i;
3312break;
3313}
3314else
3315pos++;
3316}
3317}
3318return index;
3319}
3320private void RemoveObject(ItemsChoiceType2 type, int p)
3321{
3322lock (this)
3323{
3324int pos = GetObjectIndex(type, p);
3325if (pos < 0 || pos >= this.itemsField.Count)
3326return;
3327itemsElementNameField.RemoveAt(pos);
3328itemsField.RemoveAt(pos);
3329}
3330}
3331#endregion
3332}
3333
3334
3335#region Table Cell
3336[Serializable]
3337
3338[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
3339[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
3340public class CT_Tc
3341{
3342
3343private CT_TcPr tcPrField;
3344
3345private ArrayList itemsField;
3346
3347private List<ItemsChoiceTableCellType> itemsElementNameField;
3348
3349public CT_Tc()
3350{
3351this.itemsElementNameField = new List<ItemsChoiceTableCellType>();
3352this.itemsField = new ArrayList();
3353//this.tcPrField = new CT_TcPr();
3354}
3355
3356[XmlElement(Order = 0)]
3357public CT_TcPr tcPr
3358{
3359get
3360{
3361return this.tcPrField;
3362}
3363set
3364{
3365this.tcPrField = value;
3366}
3367}
3368public static CT_Tc Parse(XmlNode node, XmlNamespaceManager namespaceManager, object parent)
3369{
3370if (node == null)
3371return null;
3372
3373CT_Tc ctObj = new CT_Tc();
3374if (parent != null)
3375{
3376ctObj.parent = parent;
3377}
3378foreach (XmlNode childNode in node.ChildNodes)
3379{
3380if (childNode.LocalName == "commentRangeEnd")
3381{
3382ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
3383ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.commentRangeEnd);
3384}
3385else if (childNode.LocalName == "tcPr")
3386{
3387ctObj.tcPr = CT_TcPr.Parse(childNode, namespaceManager);
3388}
3389else if (childNode.LocalName == "oMath")
3390{
3391ctObj.Items.Add(CT_OMath.Parse(childNode, namespaceManager));
3392ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.oMath);
3393}
3394else if (childNode.LocalName == "oMathPara")
3395{
3396ctObj.Items.Add(CT_OMathPara.Parse(childNode, namespaceManager));
3397ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.oMathPara);
3398}
3399else if (childNode.LocalName == "altChunk")
3400{
3401ctObj.Items.Add(CT_AltChunk.Parse(childNode, namespaceManager));
3402ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.altChunk);
3403}
3404else if (childNode.LocalName == "bookmarkEnd")
3405{
3406ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
3407ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.bookmarkEnd);
3408}
3409else if (childNode.LocalName == "bookmarkStart")
3410{
3411ctObj.Items.Add(CT_Bookmark.Parse(childNode, namespaceManager));
3412ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.bookmarkStart);
3413}
3414else if (childNode.LocalName == "moveFromRangeStart")
3415{
3416ctObj.Items.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
3417ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.moveFromRangeStart);
3418}
3419else if (childNode.LocalName == "commentRangeStart")
3420{
3421ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
3422ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.commentRangeStart);
3423}
3424else if (childNode.LocalName == "customXml")
3425{
3426ctObj.Items.Add(CT_CustomXmlBlock.Parse(childNode, namespaceManager));
3427ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXml);
3428}
3429else if (childNode.LocalName == "customXmlDelRangeEnd")
3430{
3431ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
3432ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlDelRangeEnd);
3433}
3434else if (childNode.LocalName == "customXmlDelRangeStart")
3435{
3436ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
3437ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlDelRangeStart);
3438}
3439else if (childNode.LocalName == "customXmlInsRangeEnd")
3440{
3441ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
3442ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlInsRangeEnd);
3443}
3444else if (childNode.LocalName == "customXmlInsRangeStart")
3445{
3446ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
3447ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlInsRangeStart);
3448}
3449else if (childNode.LocalName == "customXmlMoveFromRangeEnd")
3450{
3451ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
3452ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlMoveFromRangeEnd);
3453}
3454else if (childNode.LocalName == "customXmlMoveFromRangeStart")
3455{
3456ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
3457ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlMoveFromRangeStart);
3458}
3459else if (childNode.LocalName == "customXmlMoveToRangeEnd")
3460{
3461ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
3462ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlMoveToRangeEnd);
3463}
3464else if (childNode.LocalName == "customXmlMoveToRangeStart")
3465{
3466ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
3467ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.customXmlMoveToRangeStart);
3468}
3469else if (childNode.LocalName == "del")
3470{
3471ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
3472ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.del);
3473}
3474else if (childNode.LocalName == "ins")
3475{
3476ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
3477ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.ins);
3478}
3479else if (childNode.LocalName == "moveFrom")
3480{
3481ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
3482ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.moveFrom);
3483}
3484else if (childNode.LocalName == "moveFromRangeEnd")
3485{
3486ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
3487ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.moveFromRangeEnd);
3488}
3489else if (childNode.LocalName == "sdt")
3490{
3491ctObj.Items.Add(CT_SdtBlock.Parse(childNode, namespaceManager));
3492ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.sdt);
3493}
3494else if (childNode.LocalName == "moveTo")
3495{
3496ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
3497ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.moveTo);
3498}
3499else if (childNode.LocalName == "moveToRangeEnd")
3500{
3501ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
3502ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.moveToRangeEnd);
3503}
3504else if (childNode.LocalName == "moveToRangeStart")
3505{
3506ctObj.Items.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
3507ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.moveToRangeStart);
3508}
3509else if (childNode.LocalName == "p")
3510{
3511ctObj.Items.Add(CT_P.Parse(childNode, namespaceManager));
3512ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.p);
3513}
3514else if (childNode.LocalName == "permEnd")
3515{
3516ctObj.Items.Add(CT_Perm.Parse(childNode, namespaceManager));
3517ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.permEnd);
3518}
3519else if (childNode.LocalName == "proofErr")
3520{
3521ctObj.Items.Add(CT_ProofErr.Parse(childNode, namespaceManager));
3522ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.proofErr);
3523}
3524else if (childNode.LocalName == "permStart")
3525{
3526ctObj.Items.Add(CT_PermStart.Parse(childNode, namespaceManager));
3527ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.permStart);
3528}
3529else if (childNode.LocalName == "tbl")
3530{
3531ctObj.Items.Add(CT_Tbl.Parse(childNode, namespaceManager));
3532ctObj.ItemsElementName.Add(ItemsChoiceTableCellType.tbl);
3533}
3534}
3535return ctObj;
3536}
3537
3538internal void Write(StreamWriter sw, string nodeName)
3539{
3540sw.Write(string.Format("<w:{0}", nodeName));
3541sw.Write(">");
3542if(this.tcPr!=null)
3543this.tcPr.Write(sw, "tcPr");
3544foreach (object o in this.Items)
3545{
3546if (o is CT_MarkupRange)
3547((CT_MarkupRange)o).Write(sw, "commentRangeEnd");
3548else if (o is CT_OMath)
3549((CT_OMath)o).Write(sw, "oMath");
3550else if (o is CT_OMathPara)
3551((CT_OMathPara)o).Write(sw, "oMathPara");
3552else if (o is CT_AltChunk)
3553((CT_AltChunk)o).Write(sw, "altChunk");
3554else if (o is CT_MarkupRange)
3555((CT_MarkupRange)o).Write(sw, "bookmarkEnd");
3556else if (o is CT_Bookmark)
3557((CT_Bookmark)o).Write(sw, "bookmarkStart");
3558else if (o is CT_MoveBookmark)
3559((CT_MoveBookmark)o).Write(sw, "moveFromRangeStart");
3560else if (o is CT_MarkupRange)
3561((CT_MarkupRange)o).Write(sw, "commentRangeStart");
3562else if (o is CT_CustomXmlBlock)
3563((CT_CustomXmlBlock)o).Write(sw, "customXml");
3564else if (o is CT_Markup)
3565((CT_Markup)o).Write(sw, "customXmlDelRangeEnd");
3566else if (o is CT_TrackChange)
3567((CT_TrackChange)o).Write(sw, "customXmlDelRangeStart");
3568else if (o is CT_Markup)
3569((CT_Markup)o).Write(sw, "customXmlInsRangeEnd");
3570else if (o is CT_TrackChange)
3571((CT_TrackChange)o).Write(sw, "customXmlInsRangeStart");
3572else if (o is CT_Markup)
3573((CT_Markup)o).Write(sw, "customXmlMoveFromRangeEnd");
3574else if (o is CT_TrackChange)
3575((CT_TrackChange)o).Write(sw, "customXmlMoveFromRangeStart");
3576else if (o is CT_Markup)
3577((CT_Markup)o).Write(sw, "customXmlMoveToRangeEnd");
3578else if (o is CT_TrackChange)
3579((CT_TrackChange)o).Write(sw, "customXmlMoveToRangeStart");
3580else if (o is CT_RunTrackChange)
3581((CT_RunTrackChange)o).Write(sw, "del");
3582else if (o is CT_RunTrackChange)
3583((CT_RunTrackChange)o).Write(sw, "ins");
3584else if (o is CT_RunTrackChange)
3585((CT_RunTrackChange)o).Write(sw, "moveFrom");
3586else if (o is CT_MarkupRange)
3587((CT_MarkupRange)o).Write(sw, "moveFromRangeEnd");
3588else if (o is CT_SdtBlock)
3589((CT_SdtBlock)o).Write(sw, "sdt");
3590else if (o is CT_RunTrackChange)
3591((CT_RunTrackChange)o).Write(sw, "moveTo");
3592else if (o is CT_MarkupRange)
3593((CT_MarkupRange)o).Write(sw, "moveToRangeEnd");
3594else if (o is CT_MoveBookmark)
3595((CT_MoveBookmark)o).Write(sw, "moveToRangeStart");
3596else if (o is CT_P)
3597((CT_P)o).Write(sw, "p");
3598else if (o is CT_Perm)
3599((CT_Perm)o).Write(sw, "permEnd");
3600else if (o is CT_ProofErr)
3601((CT_ProofErr)o).Write(sw, "proofErr");
3602else if (o is CT_PermStart)
3603((CT_PermStart)o).Write(sw, "permStart");
3604else if (o is CT_Tbl)
3605((CT_Tbl)o).Write(sw, "tbl");
3606}
3607sw.WriteEndW(nodeName);
3608}
3609
3610[XmlElement("oMath", typeof(CT_OMath), Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", Order = 1)]
3611[XmlElement("oMathPara", typeof(CT_OMathPara), Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", Order = 1)]
3612[XmlElement("altChunk", typeof(CT_AltChunk), Order = 1)]
3613[XmlElement("bookmarkEnd", typeof(CT_MarkupRange), Order = 1)]
3614[XmlElement("bookmarkStart", typeof(CT_Bookmark), Order = 1)]
3615[XmlElement("commentRangeEnd", typeof(CT_MarkupRange), Order = 1)]
3616[XmlElement("commentRangeStart", typeof(CT_MarkupRange), Order = 1)]
3617[XmlElement("customXml", typeof(CT_CustomXmlBlock), Order = 1)]
3618[XmlElement("customXmlDelRangeEnd", typeof(CT_Markup), Order = 1)]
3619[XmlElement("customXmlDelRangeStart", typeof(CT_TrackChange), Order = 1)]
3620[XmlElement("customXmlInsRangeEnd", typeof(CT_Markup), Order = 1)]
3621[XmlElement("customXmlInsRangeStart", typeof(CT_TrackChange), Order = 1)]
3622[XmlElement("customXmlMoveFromRangeEnd", typeof(CT_Markup), Order = 1)]
3623[XmlElement("customXmlMoveFromRangeStart", typeof(CT_TrackChange), Order = 1)]
3624[XmlElement("customXmlMoveToRangeEnd", typeof(CT_Markup), Order = 1)]
3625[XmlElement("customXmlMoveToRangeStart", typeof(CT_TrackChange), Order = 1)]
3626[XmlElement("del", typeof(CT_RunTrackChange), Order = 1)]
3627[XmlElement("ins", typeof(CT_RunTrackChange), Order = 1)]
3628[XmlElement("moveFrom", typeof(CT_RunTrackChange), Order = 1)]
3629[XmlElement("moveFromRangeEnd", typeof(CT_MarkupRange), Order = 1)]
3630[XmlElement("moveFromRangeStart", typeof(CT_MoveBookmark), Order = 1)]
3631[XmlElement("moveTo", typeof(CT_RunTrackChange), Order = 1)]
3632[XmlElement("moveToRangeEnd", typeof(CT_MarkupRange), Order = 1)]
3633[XmlElement("moveToRangeStart", typeof(CT_MoveBookmark), Order = 1)]
3634[XmlElement("p", typeof(CT_P), Order = 1)]
3635[XmlElement("permEnd", typeof(CT_Perm), Order = 1)]
3636[XmlElement("permStart", typeof(CT_PermStart), Order = 1)]
3637[XmlElement("proofErr", typeof(CT_ProofErr), Order = 1)]
3638[XmlElement("sdt", typeof(CT_SdtBlock), Order = 1)]
3639[XmlElement("tbl", typeof(CT_Tbl), Order = 1)]
3640[XmlChoiceIdentifier("ItemsElementName")]
3641public ArrayList Items
3642{
3643get
3644{
3645return this.itemsField;
3646}
3647set
3648{
3649this.itemsField = value;
3650}
3651}
3652
3653[XmlElement("ItemsElementName", Order = 2)]
3654[XmlIgnore]
3655public List<ItemsChoiceTableCellType> ItemsElementName
3656{
3657get
3658{
3659return this.itemsElementNameField;
3660}
3661set
3662{
3663this.itemsElementNameField = value;
3664}
3665}
3666object parent;
3667[XmlIgnore]
3668public object Parent
3669{
3670get { return parent; }
3671}
3672#region Generic methods for object operation
3673private List<T> GetObjectList<T>(ItemsChoiceTableCellType type) where T : class
3674{
3675lock (this)
3676{
3677List<T> list = new List<T>();
3678for (int i = 0; i < itemsElementNameField.Count; i++)
3679{
3680if (itemsElementNameField[i] == type)
3681list.Add(itemsField[i] as T);
3682}
3683return list;
3684}
3685}
3686private int SizeOfArray(ItemsChoiceTableCellType type)
3687{
3688lock (this)
3689{
3690int size = 0;
3691for (int i = 0; i < itemsElementNameField.Count; i++)
3692{
3693if (itemsElementNameField[i] == type)
3694size++;
3695}
3696return size;
3697}
3698}
3699private T GetObjectArray<T>(int p, ItemsChoiceTableCellType type) where T : class
3700{
3701lock (this)
3702{
3703int pos = GetObjectIndex(type, p);
3704if (pos < 0 || pos >= this.itemsField.Count)
3705return null;
3706return itemsField[pos] as T;
3707}
3708}
3709private int GetObjectIndex(ItemsChoiceTableCellType type, int p)
3710{
3711int index = -1;
3712int pos = 0;
3713for (int i = 0; i < itemsElementNameField.Count; i++)
3714{
3715if (itemsElementNameField[i] == type)
3716{
3717if (pos == p)
3718{
3719index = i;
3720break;
3721}
3722else
3723pos++;
3724}
3725}
3726return index;
3727}
3728private void RemoveObject(ItemsChoiceTableCellType type, int p)
3729{
3730lock (this)
3731{
3732int pos = GetObjectIndex(type, p);
3733if (pos < 0 || pos >= this.itemsField.Count)
3734return;
3735itemsElementNameField.RemoveAt(pos);
3736itemsField.RemoveAt(pos);
3737}
3738}
3739private void SetObject<T>(ItemsChoiceTableCellType type, int p, T obj) where T : class
3740{
3741lock (this)
3742{
3743int pos = GetObjectIndex(type, p);
3744if (pos < 0 || pos >= this.itemsField.Count)
3745return;
3746if (this.itemsField[pos] is T)
3747this.itemsField[pos] = obj;
3748else
3749throw new Exception(string.Format(@"object types are difference, itemsField[{0}] is {1}, and parameter obj is {2}",
3750pos, this.itemsField[pos].GetType().Name, typeof(T).Name));
3751}
3752}
3753
3754private T AddNewObject<T>(ItemsChoiceTableCellType type) where T : class, new()
3755{
3756T t = new T();
3757lock (this)
3758{
3759this.itemsElementNameField.Add(type);
3760this.itemsField.Add(t);
3761}
3762return t;
3763}
3764#endregion
3765public CT_P AddNewP()
3766{
3767return AddNewObject<CT_P>(ItemsChoiceTableCellType.p);
3768}
3769
3770public IList<CT_P> GetPList()
3771{
3772return GetObjectList<CT_P>(ItemsChoiceTableCellType.p);
3773}
3774
3775public int SizeOfPArray()
3776{
3777return SizeOfArray(ItemsChoiceTableCellType.p);
3778}
3779
3780public void SetPArray(int p, CT_P cT_P)
3781{
3782SetObject<CT_P>(ItemsChoiceTableCellType.p, p, cT_P);
3783}
3784
3785public void RemoveP(int pos)
3786{
3787RemoveObject(ItemsChoiceTableCellType.p, pos);
3788}
3789
3790public CT_P GetPArray(int p)
3791{
3792return GetObjectArray<CT_P>(p, ItemsChoiceTableCellType.p);
3793}
3794
3795public IList<CT_Tbl> GetTblList()
3796{
3797return GetObjectList<CT_Tbl>(ItemsChoiceTableCellType.tbl);
3798}
3799
3800public CT_Tbl GetTblArray(int p)
3801{
3802return GetObjectArray<CT_Tbl>(p, ItemsChoiceTableCellType.tbl);
3803}
3804
3805public CT_TcPr AddNewTcPr()
3806{
3807this.tcPrField = new CT_TcPr();
3808return this.tcPrField;
3809}
3810
3811public bool IsSetTcPr()
3812{
3813return (this.tcPrField != null);
3814
3815}
3816
3817public CT_Tbl AddNewTbl()
3818{
3819return AddNewObject<CT_Tbl>(ItemsChoiceTableCellType.tbl);
3820}
3821}
3822
3823
3824[Serializable]
3825[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IncludeInSchema = false)]
3826public enum ItemsChoiceTableCellType
3827{
3828
3829
3830[XmlEnum("http://schemas.openxmlformats.org/officeDocument/2006/math:oMath")]
3831oMath,
3832
3833
3834[XmlEnum("http://schemas.openxmlformats.org/officeDocument/2006/math:oMathPara")]
3835oMathPara,
3836
3837
3838altChunk,
3839
3840
3841bookmarkEnd,
3842
3843
3844bookmarkStart,
3845
3846
3847commentRangeEnd,
3848
3849
3850commentRangeStart,
3851
3852
3853customXml,
3854
3855
3856customXmlDelRangeEnd,
3857
3858
3859customXmlDelRangeStart,
3860
3861
3862customXmlInsRangeEnd,
3863
3864
3865customXmlInsRangeStart,
3866
3867
3868customXmlMoveFromRangeEnd,
3869
3870
3871customXmlMoveFromRangeStart,
3872
3873
3874customXmlMoveToRangeEnd,
3875
3876
3877customXmlMoveToRangeStart,
3878
3879
3880del,
3881
3882
3883ins,
3884
3885
3886moveFrom,
3887
3888
3889moveFromRangeEnd,
3890
3891
3892moveFromRangeStart,
3893
3894
3895moveTo,
3896
3897
3898moveToRangeEnd,
3899
3900
3901moveToRangeStart,
3902
3903
3904p,
3905
3906
3907permEnd,
3908
3909
3910permStart,
3911
3912
3913proofErr,
3914
3915
3916sdt,
3917
3918
3919tbl,
3920}
3921
3922
3923[Serializable]
3924
3925[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
3926[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
3927public class CT_TrPr : CT_TrPrBase
3928{
3929
3930private CT_TrackChange insField;
3931
3932private CT_TrackChange delField;
3933
3934private CT_TrPrChange trPrChangeField;
3935
3936public CT_TrPr()
3937{
3938
3939}
3940public static new CT_TrPr Parse(XmlNode node, XmlNamespaceManager namespaceManager)
3941{
3942if (node == null)
3943return null;
3944CT_TrPr ctObj = new CT_TrPr();
3945foreach (XmlNode childNode in node.ChildNodes)
3946{
3947if (childNode.LocalName == "ins")
3948ctObj.ins = CT_TrackChange.Parse(childNode, namespaceManager);
3949else if (childNode.LocalName == "del")
3950ctObj.del = CT_TrackChange.Parse(childNode, namespaceManager);
3951else if (childNode.LocalName == "trPrChange")
3952ctObj.trPrChange = CT_TrPrChange.Parse(childNode, namespaceManager);
3953else if (childNode.LocalName == "gridBefore")
3954{
3955ctObj.Items.Add(CT_DecimalNumber.Parse(childNode, namespaceManager));
3956ctObj.ItemsElementName.Add(ItemsChoiceType2.gridBefore);
3957}
3958else if (childNode.LocalName == "cantSplit")
3959{
3960ctObj.Items.Add(CT_OnOff.Parse(childNode, namespaceManager));
3961ctObj.ItemsElementName.Add(ItemsChoiceType2.cantSplit);
3962}
3963else if (childNode.LocalName == "cnfStyle")
3964{
3965ctObj.Items.Add(CT_Cnf.Parse(childNode, namespaceManager));
3966ctObj.ItemsElementName.Add(ItemsChoiceType2.cnfStyle);
3967}
3968else if (childNode.LocalName == "divId")
3969{
3970ctObj.Items.Add(CT_DecimalNumber.Parse(childNode, namespaceManager));
3971ctObj.ItemsElementName.Add(ItemsChoiceType2.divId);
3972}
3973else if (childNode.LocalName == "gridAfter")
3974{
3975ctObj.Items.Add(CT_DecimalNumber.Parse(childNode, namespaceManager));
3976ctObj.ItemsElementName.Add(ItemsChoiceType2.gridAfter);
3977}
3978else if (childNode.LocalName == "trHeight")
3979{
3980ctObj.Items.Add(CT_Height.Parse(childNode, namespaceManager));
3981ctObj.ItemsElementName.Add(ItemsChoiceType2.trHeight);
3982}
3983else if (childNode.LocalName == "hidden")
3984{
3985ctObj.Items.Add(CT_OnOff.Parse(childNode, namespaceManager));
3986ctObj.ItemsElementName.Add(ItemsChoiceType2.hidden);
3987}
3988else if (childNode.LocalName == "tblCellSpacing")
3989{
3990ctObj.Items.Add(CT_TblWidth.Parse(childNode, namespaceManager));
3991ctObj.ItemsElementName.Add(ItemsChoiceType2.tblCellSpacing);
3992}
3993else if (childNode.LocalName == "tblHeader")
3994{
3995ctObj.Items.Add(CT_OnOff.Parse(childNode, namespaceManager));
3996ctObj.ItemsElementName.Add(ItemsChoiceType2.tblHeader);
3997}
3998else if (childNode.LocalName == "jc")
3999{
4000ctObj.Items.Add(CT_Jc.Parse(childNode, namespaceManager));
4001ctObj.ItemsElementName.Add(ItemsChoiceType2.jc);
4002}
4003else if (childNode.LocalName == "wAfter")
4004{
4005ctObj.Items.Add(CT_TblWidth.Parse(childNode, namespaceManager));
4006ctObj.ItemsElementName.Add(ItemsChoiceType2.wAfter);
4007}
4008else if (childNode.LocalName == "wBefore")
4009{
4010ctObj.Items.Add(CT_TblWidth.Parse(childNode, namespaceManager));
4011ctObj.ItemsElementName.Add(ItemsChoiceType2.wBefore);
4012}
4013}
4014return ctObj;
4015}
4016
4017
4018
4019internal new void Write(StreamWriter sw, string nodeName)
4020{
4021sw.Write(string.Format("<w:{0}", nodeName));
4022sw.Write(">");
4023if (this.ins != null)
4024this.ins.Write(sw, "ins");
4025if (this.del != null)
4026this.del.Write(sw, "del");
4027if (this.trPrChange != null)
4028this.trPrChange.Write(sw, "trPrChange");
4029for (int i=0;i<this.Items.Count;i++)
4030{
4031object o = this.Items[i];
4032if (o is CT_DecimalNumber
4033&&this.ItemsElementName[i]== ItemsChoiceType2.gridBefore)
4034((CT_DecimalNumber)o).Write(sw, "gridBefore");
4035else if (o is CT_OnOff
4036&& this.ItemsElementName[i] == ItemsChoiceType2.cantSplit)
4037((CT_OnOff)o).Write(sw, "cantSplit");
4038else if (o is CT_Cnf
4039&& this.ItemsElementName[i] == ItemsChoiceType2.cnfStyle)
4040((CT_Cnf)o).Write(sw, "cnfStyle");
4041else if (o is CT_DecimalNumber
4042&& this.ItemsElementName[i] == ItemsChoiceType2.divId)
4043((CT_DecimalNumber)o).Write(sw, "divId");
4044else if (o is CT_DecimalNumber
4045&& this.ItemsElementName[i] == ItemsChoiceType2.gridAfter)
4046((CT_DecimalNumber)o).Write(sw, "gridAfter");
4047else if (o is CT_Height
4048&& this.ItemsElementName[i] == ItemsChoiceType2.trHeight)
4049((CT_Height)o).Write(sw, "trHeight");
4050else if (o is CT_OnOff
4051&& this.ItemsElementName[i] == ItemsChoiceType2.hidden)
4052((CT_OnOff)o).Write(sw, "hidden");
4053else if (o is CT_TblWidth
4054&& this.ItemsElementName[i] == ItemsChoiceType2.tblCellSpacing)
4055((CT_TblWidth)o).Write(sw, "tblCellSpacing");
4056else if (o is CT_OnOff
4057&& this.ItemsElementName[i] == ItemsChoiceType2.tblHeader)
4058((CT_OnOff)o).Write(sw, "tblHeader");
4059else if (o is CT_Jc
4060&& this.ItemsElementName[i] == ItemsChoiceType2.jc)
4061((CT_Jc)o).Write(sw, "jc");
4062else if (o is CT_TblWidth
4063&& this.ItemsElementName[i] == ItemsChoiceType2.wAfter)
4064((CT_TblWidth)o).Write(sw, "wAfter");
4065else if (o is CT_TblWidth
4066&& this.ItemsElementName[i] == ItemsChoiceType2.wBefore)
4067((CT_TblWidth)o).Write(sw, "wBefore");
4068}
4069sw.WriteEndW(nodeName);
4070}
4071
4072[XmlElement(Order = 0)]
4073public CT_TrackChange ins
4074{
4075get
4076{
4077return this.insField;
4078}
4079set
4080{
4081this.insField = value;
4082}
4083}
4084
4085[XmlElement(Order = 1)]
4086public CT_TrackChange del
4087{
4088get
4089{
4090return this.delField;
4091}
4092set
4093{
4094this.delField = value;
4095}
4096}
4097
4098[XmlElement(Order = 2)]
4099public CT_TrPrChange trPrChange
4100{
4101get
4102{
4103return this.trPrChangeField;
4104}
4105set
4106{
4107this.trPrChangeField = value;
4108}
4109}
4110
4111}
4112
4113[Serializable]
4114
4115[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4116[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
4117public class CT_TcPrChange : CT_TrackChange
4118{
4119public static new CT_TcPrChange Parse(XmlNode node, XmlNamespaceManager namespaceManager)
4120{
4121if (node == null)
4122return null;
4123CT_TcPrChange ctObj = new CT_TcPrChange();
4124ctObj.author = XmlHelper.ReadString(node.Attributes["w:author"]);
4125ctObj.date = XmlHelper.ReadString(node.Attributes["w:date"]);
4126ctObj.id = XmlHelper.ReadString(node.Attributes["r:id"]);
4127foreach (XmlNode childNode in node.ChildNodes)
4128{
4129if (childNode.LocalName == "tcPr")
4130ctObj.tcPr = CT_TcPrInner.Parse(childNode, namespaceManager);
4131}
4132return ctObj;
4133}
4134
4135
4136
4137internal new void Write(StreamWriter sw, string nodeName)
4138{
4139sw.Write(string.Format("<w:{0}", nodeName));
4140XmlHelper.WriteAttribute(sw, "w:author", this.author);
4141XmlHelper.WriteAttribute(sw, "w:date", this.date);
4142XmlHelper.WriteAttribute(sw, "r:id", this.id);
4143sw.Write(">");
4144if (this.tcPr != null)
4145this.tcPr.Write(sw, "tcPr");
4146sw.WriteEndW(nodeName);
4147}
4148
4149private CT_TcPrInner tcPrField;
4150
4151public CT_TcPrChange()
4152{
4153
4154}
4155
4156[XmlElement(Order = 0)]
4157public CT_TcPrInner tcPr
4158{
4159get
4160{
4161return this.tcPrField;
4162}
4163set
4164{
4165this.tcPrField = value;
4166}
4167}
4168}
4169
4170[XmlInclude(typeof(CT_TcPr))]
4171[Serializable]
4172[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4173[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
4174public class CT_TcPrInner : CT_TcPrBase
4175{
4176
4177private CT_TrackChange cellInsField;
4178
4179private CT_TrackChange cellDelField;
4180
4181private CT_CellMergeTrackChange cellMergeField;
4182
4183public CT_TcPrInner()
4184{
4185//this.cellMergeField = new CT_CellMergeTrackChange();
4186//this.cellDelField = new CT_TrackChange();
4187//this.cellInsField = new CT_TrackChange();
4188}
4189public static CT_TcPrInner Parse(XmlNode node, XmlNamespaceManager namespaceManager)
4190{
4191if (node == null)
4192return null;
4193CT_TcPrInner ctObj = new CT_TcPrInner();
4194foreach (XmlNode childNode in node.ChildNodes)
4195{
4196if (childNode.LocalName == "cellIns")
4197ctObj.cellIns = CT_TrackChange.Parse(childNode, namespaceManager);
4198else if (childNode.LocalName == "cellDel")
4199ctObj.cellDel = CT_TrackChange.Parse(childNode, namespaceManager);
4200else if (childNode.LocalName == "cellMerge")
4201ctObj.cellMerge = CT_CellMergeTrackChange.Parse(childNode, namespaceManager);
4202else if (childNode.LocalName == "cnfStyle")
4203ctObj.cnfStyle = CT_Cnf.Parse(childNode, namespaceManager);
4204else if (childNode.LocalName == "tcW")
4205ctObj.tcW = CT_TblWidth.Parse(childNode, namespaceManager);
4206else if (childNode.LocalName == "gridSpan")
4207ctObj.gridSpan = CT_DecimalNumber.Parse(childNode, namespaceManager);
4208else if (childNode.LocalName == "hMerge")
4209ctObj.hMerge = CT_HMerge.Parse(childNode, namespaceManager);
4210else if (childNode.LocalName == "vMerge")
4211ctObj.vMerge = CT_VMerge.Parse(childNode, namespaceManager);
4212else if (childNode.LocalName == "tcBorders")
4213ctObj.tcBorders = CT_TcBorders.Parse(childNode, namespaceManager);
4214else if (childNode.LocalName == "shd")
4215ctObj.shd = CT_Shd.Parse(childNode, namespaceManager);
4216else if (childNode.LocalName == "noWrap")
4217ctObj.noWrap = CT_OnOff.Parse(childNode, namespaceManager);
4218else if (childNode.LocalName == "tcMar")
4219ctObj.tcMar = CT_TcMar.Parse(childNode, namespaceManager);
4220else if (childNode.LocalName == "textDirection")
4221ctObj.textDirection = CT_TextDirection.Parse(childNode, namespaceManager);
4222else if (childNode.LocalName == "tcFitText")
4223ctObj.tcFitText = CT_OnOff.Parse(childNode, namespaceManager);
4224else if (childNode.LocalName == "vAlign")
4225ctObj.vAlign = CT_VerticalJc.Parse(childNode, namespaceManager);
4226else if (childNode.LocalName == "hideMark")
4227ctObj.hideMark = CT_OnOff.Parse(childNode, namespaceManager);
4228}
4229return ctObj;
4230}
4231
4232
4233
4234internal void Write(StreamWriter sw, string nodeName)
4235{
4236sw.Write(string.Format("<w:{0}", nodeName));
4237sw.Write(">");
4238if (this.cellIns != null)
4239this.cellIns.Write(sw, "cellIns");
4240if (this.cellDel != null)
4241this.cellDel.Write(sw, "cellDel");
4242if (this.cellMerge != null)
4243this.cellMerge.Write(sw, "cellMerge");
4244if (this.cnfStyle != null)
4245this.cnfStyle.Write(sw, "cnfStyle");
4246if (this.tcW != null)
4247this.tcW.Write(sw, "tcW");
4248if (this.gridSpan != null)
4249this.gridSpan.Write(sw, "gridSpan");
4250if (this.hMerge != null)
4251this.hMerge.Write(sw, "hMerge");
4252if (this.vMerge != null)
4253this.vMerge.Write(sw, "vMerge");
4254if (this.tcBorders != null)
4255this.tcBorders.Write(sw, "tcBorders");
4256if (this.shd != null)
4257this.shd.Write(sw, "shd");
4258if (this.noWrap != null)
4259this.noWrap.Write(sw, "noWrap");
4260if (this.tcMar != null)
4261this.tcMar.Write(sw, "tcMar");
4262if (this.textDirection != null)
4263this.textDirection.Write(sw, "textDirection");
4264if (this.tcFitText != null)
4265this.tcFitText.Write(sw, "tcFitText");
4266if (this.vAlign != null)
4267this.vAlign.Write(sw, "vAlign");
4268if (this.hideMark != null)
4269this.hideMark.Write(sw, "hideMark");
4270sw.WriteEndW(nodeName);
4271}
4272
4273[XmlElement(Order = 0)]
4274public CT_TrackChange cellIns
4275{
4276get
4277{
4278return this.cellInsField;
4279}
4280set
4281{
4282this.cellInsField = value;
4283}
4284}
4285
4286[XmlElement(Order = 1)]
4287public CT_TrackChange cellDel
4288{
4289get
4290{
4291return this.cellDelField;
4292}
4293set
4294{
4295this.cellDelField = value;
4296}
4297}
4298
4299[XmlElement(Order = 2)]
4300public CT_CellMergeTrackChange cellMerge
4301{
4302get
4303{
4304return this.cellMergeField;
4305}
4306set
4307{
4308this.cellMergeField = value;
4309}
4310}
4311}
4312
4313
4314[Serializable]
4315
4316[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4317[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
4318public class CT_CellMergeTrackChange : CT_TrackChange
4319{
4320
4321private ST_AnnotationVMerge vMergeField;
4322
4323private bool vMergeFieldSpecified;
4324
4325private ST_AnnotationVMerge vMergeOrigField;
4326
4327private bool vMergeOrigFieldSpecified;
4328public static new CT_CellMergeTrackChange Parse(XmlNode node, XmlNamespaceManager namespaceManager)
4329{
4330if (node == null)
4331return null;
4332CT_CellMergeTrackChange ctObj = new CT_CellMergeTrackChange();
4333if (node.Attributes["w:vMerge"] != null)
4334ctObj.vMerge = (ST_AnnotationVMerge)Enum.Parse(typeof(ST_AnnotationVMerge), node.Attributes["w:vMerge"].Value);
4335if (node.Attributes["w:vMergeOrig"] != null)
4336ctObj.vMergeOrig = (ST_AnnotationVMerge)Enum.Parse(typeof(ST_AnnotationVMerge), node.Attributes["w:vMergeOrig"].Value);
4337ctObj.author = XmlHelper.ReadString(node.Attributes["w:author"]);
4338ctObj.date = XmlHelper.ReadString(node.Attributes["w:date"]);
4339ctObj.id = XmlHelper.ReadString(node.Attributes["r:id"]);
4340return ctObj;
4341}
4342
4343
4344
4345internal new void Write(StreamWriter sw, string nodeName)
4346{
4347sw.Write(string.Format("<w:{0}", nodeName));
4348XmlHelper.WriteAttribute(sw, "w:vMerge", this.vMerge.ToString());
4349XmlHelper.WriteAttribute(sw, "w:vMergeOrig", this.vMergeOrig.ToString());
4350XmlHelper.WriteAttribute(sw, "w:author", this.author);
4351XmlHelper.WriteAttribute(sw, "w:date", this.date);
4352XmlHelper.WriteAttribute(sw, "r:id", this.id);
4353sw.Write(">");
4354sw.WriteEndW(nodeName);
4355}
4356
4357[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
4358public ST_AnnotationVMerge vMerge
4359{
4360get
4361{
4362return this.vMergeField;
4363}
4364set
4365{
4366this.vMergeField = value;
4367}
4368}
4369
4370[XmlIgnore]
4371public bool vMergeSpecified
4372{
4373get
4374{
4375return this.vMergeFieldSpecified;
4376}
4377set
4378{
4379this.vMergeFieldSpecified = value;
4380}
4381}
4382
4383[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
4384public ST_AnnotationVMerge vMergeOrig
4385{
4386get
4387{
4388return this.vMergeOrigField;
4389}
4390set
4391{
4392this.vMergeOrigField = value;
4393}
4394}
4395
4396[XmlIgnore]
4397public bool vMergeOrigSpecified
4398{
4399get
4400{
4401return this.vMergeOrigFieldSpecified;
4402}
4403set
4404{
4405this.vMergeOrigFieldSpecified = value;
4406}
4407}
4408}
4409
4410
4411[Serializable]
4412[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4413public enum ST_AnnotationVMerge
4414{
4415
4416
4417cont,
4418
4419
4420rest,
4421}
4422
4423
4424
4425[Serializable]
4426
4427[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4428[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
4429public class CT_TcBorders
4430{
4431
4432private CT_Border topField;
4433
4434private CT_Border leftField;
4435
4436private CT_Border bottomField;
4437
4438private CT_Border rightField;
4439
4440private CT_Border insideHField;
4441
4442private CT_Border insideVField;
4443
4444private CT_Border tl2brField;
4445
4446private CT_Border tr2blField;
4447public static CT_TcBorders Parse(XmlNode node, XmlNamespaceManager namespaceManager)
4448{
4449if (node == null)
4450return null;
4451CT_TcBorders ctObj = new CT_TcBorders();
4452foreach (XmlNode childNode in node.ChildNodes)
4453{
4454if (childNode.LocalName == "top")
4455ctObj.top = CT_Border.Parse(childNode, namespaceManager);
4456else if (childNode.LocalName == "left")
4457ctObj.left = CT_Border.Parse(childNode, namespaceManager);
4458else if (childNode.LocalName == "bottom")
4459ctObj.bottom = CT_Border.Parse(childNode, namespaceManager);
4460else if (childNode.LocalName == "right")
4461ctObj.right = CT_Border.Parse(childNode, namespaceManager);
4462else if (childNode.LocalName == "insideH")
4463ctObj.insideH = CT_Border.Parse(childNode, namespaceManager);
4464else if (childNode.LocalName == "insideV")
4465ctObj.insideV = CT_Border.Parse(childNode, namespaceManager);
4466else if (childNode.LocalName == "tl2br")
4467ctObj.tl2br = CT_Border.Parse(childNode, namespaceManager);
4468else if (childNode.LocalName == "tr2bl")
4469ctObj.tr2bl = CT_Border.Parse(childNode, namespaceManager);
4470}
4471return ctObj;
4472}
4473
4474
4475
4476internal void Write(StreamWriter sw, string nodeName)
4477{
4478sw.Write(string.Format("<w:{0}", nodeName));
4479sw.Write(">");
4480if (this.top != null)
4481this.top.Write(sw, "top");
4482if (this.left != null)
4483this.left.Write(sw, "left");
4484if (this.bottom != null)
4485this.bottom.Write(sw, "bottom");
4486if (this.right != null)
4487this.right.Write(sw, "right");
4488if (this.insideH != null)
4489this.insideH.Write(sw, "insideH");
4490if (this.insideV != null)
4491this.insideV.Write(sw, "insideV");
4492if (this.tl2br != null)
4493this.tl2br.Write(sw, "tl2br");
4494if (this.tr2bl != null)
4495this.tr2bl.Write(sw, "tr2bl");
4496sw.WriteEndW(nodeName);
4497}
4498
4499public CT_TcBorders()
4500{
4501
4502}
4503
4504[XmlElement(Order = 0)]
4505public CT_Border top
4506{
4507get
4508{
4509return this.topField;
4510}
4511set
4512{
4513this.topField = value;
4514}
4515}
4516
4517[XmlElement(Order = 1)]
4518public CT_Border left
4519{
4520get
4521{
4522return this.leftField;
4523}
4524set
4525{
4526this.leftField = value;
4527}
4528}
4529
4530[XmlElement(Order = 2)]
4531public CT_Border bottom
4532{
4533get
4534{
4535return this.bottomField;
4536}
4537set
4538{
4539this.bottomField = value;
4540}
4541}
4542
4543[XmlElement(Order = 3)]
4544public CT_Border right
4545{
4546get
4547{
4548return this.rightField;
4549}
4550set
4551{
4552this.rightField = value;
4553}
4554}
4555
4556[XmlElement(Order = 4)]
4557public CT_Border insideH
4558{
4559get
4560{
4561return this.insideHField;
4562}
4563set
4564{
4565this.insideHField = value;
4566}
4567}
4568
4569[XmlElement(Order = 5)]
4570public CT_Border insideV
4571{
4572get
4573{
4574return this.insideVField;
4575}
4576set
4577{
4578this.insideVField = value;
4579}
4580}
4581
4582[XmlElement(Order = 6)]
4583public CT_Border tl2br
4584{
4585get
4586{
4587return this.tl2brField;
4588}
4589set
4590{
4591this.tl2brField = value;
4592}
4593}
4594
4595[XmlElement(Order = 7)]
4596public CT_Border tr2bl
4597{
4598get
4599{
4600return this.tr2blField;
4601}
4602set
4603{
4604this.tr2blField = value;
4605}
4606}
4607}
4608
4609
4610[Serializable]
4611
4612[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4613[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
4614public class CT_TcMar
4615{
4616
4617private CT_TblWidth topField;
4618
4619private CT_TblWidth leftField;
4620
4621private CT_TblWidth bottomField;
4622
4623private CT_TblWidth rightField;
4624
4625public CT_TcMar()
4626{
4627//this.rightField = new CT_TblWidth();
4628//this.bottomField = new CT_TblWidth();
4629//this.leftField = new CT_TblWidth();
4630//this.topField = new CT_TblWidth();
4631}
4632public static CT_TcMar Parse(XmlNode node, XmlNamespaceManager namespaceManager)
4633{
4634if (node == null)
4635return null;
4636CT_TcMar ctObj = new CT_TcMar();
4637foreach (XmlNode childNode in node.ChildNodes)
4638{
4639if (childNode.LocalName == "top")
4640ctObj.top = CT_TblWidth.Parse(childNode, namespaceManager);
4641else if (childNode.LocalName == "left")
4642ctObj.left = CT_TblWidth.Parse(childNode, namespaceManager);
4643else if (childNode.LocalName == "bottom")
4644ctObj.bottom = CT_TblWidth.Parse(childNode, namespaceManager);
4645else if (childNode.LocalName == "right")
4646ctObj.right = CT_TblWidth.Parse(childNode, namespaceManager);
4647}
4648return ctObj;
4649}
4650
4651
4652
4653internal void Write(StreamWriter sw, string nodeName)
4654{
4655sw.Write(string.Format("<w:{0}", nodeName));
4656sw.Write(">");
4657if (this.top != null)
4658this.top.Write(sw, "top");
4659if (this.left != null)
4660this.left.Write(sw, "left");
4661if (this.bottom != null)
4662this.bottom.Write(sw, "bottom");
4663if (this.right != null)
4664this.right.Write(sw, "right");
4665sw.WriteEndW(nodeName);
4666}
4667
4668[XmlElement(Order = 0)]
4669public CT_TblWidth top
4670{
4671get
4672{
4673return this.topField;
4674}
4675set
4676{
4677this.topField = value;
4678}
4679}
4680
4681[XmlElement(Order = 1)]
4682public CT_TblWidth left
4683{
4684get
4685{
4686return this.leftField;
4687}
4688set
4689{
4690this.leftField = value;
4691}
4692}
4693
4694[XmlElement(Order = 2)]
4695public CT_TblWidth bottom
4696{
4697get
4698{
4699return this.bottomField;
4700}
4701set
4702{
4703this.bottomField = value;
4704}
4705}
4706
4707[XmlElement(Order = 3)]
4708public CT_TblWidth right
4709{
4710get
4711{
4712return this.rightField;
4713}
4714set
4715{
4716this.rightField = value;
4717}
4718}
4719}
4720
4721
4722[Serializable]
4723
4724[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4725[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
4726public class CT_TcPr : CT_TcPrInner
4727{
4728
4729private CT_TcPrChange tcPrChangeField;
4730public static new CT_TcPr Parse(XmlNode node, XmlNamespaceManager namespaceManager)
4731{
4732if (node == null)
4733return null;
4734CT_TcPr ctObj = new CT_TcPr();
4735foreach (XmlNode childNode in node.ChildNodes)
4736{
4737if (childNode.LocalName == "tcPrChange")
4738ctObj.tcPrChange = CT_TcPrChange.Parse(childNode, namespaceManager);
4739else if (childNode.LocalName == "cellIns")
4740ctObj.cellIns = CT_TrackChange.Parse(childNode, namespaceManager);
4741else if (childNode.LocalName == "cellDel")
4742ctObj.cellDel = CT_TrackChange.Parse(childNode, namespaceManager);
4743else if (childNode.LocalName == "cellMerge")
4744ctObj.cellMerge = CT_CellMergeTrackChange.Parse(childNode, namespaceManager);
4745else if (childNode.LocalName == "cnfStyle")
4746ctObj.cnfStyle = CT_Cnf.Parse(childNode, namespaceManager);
4747else if (childNode.LocalName == "tcW")
4748ctObj.tcW = CT_TblWidth.Parse(childNode, namespaceManager);
4749else if (childNode.LocalName == "gridSpan")
4750ctObj.gridSpan = CT_DecimalNumber.Parse(childNode, namespaceManager);
4751else if (childNode.LocalName == "hMerge")
4752ctObj.hMerge = CT_HMerge.Parse(childNode, namespaceManager);
4753else if (childNode.LocalName == "vMerge")
4754ctObj.vMerge = CT_VMerge.Parse(childNode, namespaceManager);
4755else if (childNode.LocalName == "tcBorders")
4756ctObj.tcBorders = CT_TcBorders.Parse(childNode, namespaceManager);
4757else if (childNode.LocalName == "shd")
4758ctObj.shd = CT_Shd.Parse(childNode, namespaceManager);
4759else if (childNode.LocalName == "noWrap")
4760ctObj.noWrap = CT_OnOff.Parse(childNode, namespaceManager);
4761else if (childNode.LocalName == "tcMar")
4762ctObj.tcMar = CT_TcMar.Parse(childNode, namespaceManager);
4763else if (childNode.LocalName == "textDirection")
4764ctObj.textDirection = CT_TextDirection.Parse(childNode, namespaceManager);
4765else if (childNode.LocalName == "tcFitText")
4766ctObj.tcFitText = CT_OnOff.Parse(childNode, namespaceManager);
4767else if (childNode.LocalName == "vAlign")
4768ctObj.vAlign = CT_VerticalJc.Parse(childNode, namespaceManager);
4769else if (childNode.LocalName == "hideMark")
4770ctObj.hideMark = CT_OnOff.Parse(childNode, namespaceManager);
4771}
4772return ctObj;
4773}
4774
4775public CT_TblWidth AddNewTcW()
4776{
4777this.tcW = new CT_TblWidth();
4778return this.tcW;
4779}
4780
4781internal new void Write(StreamWriter sw, string nodeName)
4782{
4783sw.Write(string.Format("<w:{0}", nodeName));
4784sw.Write(">");
4785if (this.tcPrChange != null)
4786this.tcPrChange.Write(sw, "tcPrChange");
4787if (this.cellIns != null)
4788this.cellIns.Write(sw, "cellIns");
4789if (this.cellDel != null)
4790this.cellDel.Write(sw, "cellDel");
4791if (this.cellMerge != null)
4792this.cellMerge.Write(sw, "cellMerge");
4793if (this.cnfStyle != null)
4794this.cnfStyle.Write(sw, "cnfStyle");
4795if (this.tcW != null)
4796this.tcW.Write(sw, "tcW");
4797if (this.gridSpan != null)
4798this.gridSpan.Write(sw, "gridSpan");
4799if (this.hMerge != null)
4800this.hMerge.Write(sw, "hMerge");
4801if (this.vMerge != null)
4802this.vMerge.Write(sw, "vMerge");
4803if (this.tcBorders != null)
4804this.tcBorders.Write(sw, "tcBorders");
4805if (this.shd != null)
4806this.shd.Write(sw, "shd");
4807if (this.noWrap != null)
4808this.noWrap.Write(sw, "noWrap");
4809if (this.tcMar != null)
4810this.tcMar.Write(sw, "tcMar");
4811if (this.textDirection != null)
4812this.textDirection.Write(sw, "textDirection");
4813if (this.tcFitText != null)
4814this.tcFitText.Write(sw, "tcFitText");
4815if (this.vAlign != null)
4816this.vAlign.Write(sw, "vAlign");
4817if (this.hideMark != null)
4818this.hideMark.Write(sw, "hideMark");
4819sw.WriteEndW(nodeName);
4820}
4821
4822public CT_TcPr()
4823{
4824//this.tcPrChangeField = new CT_TcPrChange();
4825}
4826
4827[XmlElement(Order = 0)]
4828public CT_TcPrChange tcPrChange
4829{
4830get
4831{
4832return this.tcPrChangeField;
4833}
4834set
4835{
4836this.tcPrChangeField = value;
4837}
4838}
4839
4840}
4841
4842
4843
4844[XmlInclude(typeof(CT_TcPrInner))]
4845[XmlInclude(typeof(CT_TcPr))]
4846[Serializable]
4847[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
4848[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
4849public class CT_TcPrBase
4850{
4851
4852private CT_Cnf cnfStyleField;
4853
4854private CT_TblWidth tcWField;
4855
4856private CT_DecimalNumber gridSpanField;
4857
4858private CT_HMerge hMergeField;
4859
4860private CT_VMerge vMergeField;
4861
4862private CT_TcBorders tcBordersField;
4863
4864private CT_Shd shdField;
4865
4866private CT_OnOff noWrapField;
4867
4868private CT_TcMar tcMarField;
4869
4870private CT_TextDirection textDirectionField;
4871
4872private CT_OnOff tcFitTextField;
4873
4874private CT_VerticalJc vAlignField;
4875
4876private CT_OnOff hideMarkField;
4877
4878public CT_TcPrBase()
4879{
4880}
4881
4882[XmlElement(Order = 0)]
4883public CT_Cnf cnfStyle
4884{
4885get
4886{
4887return this.cnfStyleField;
4888}
4889set
4890{
4891this.cnfStyleField = value;
4892}
4893}
4894
4895[XmlElement(Order = 1)]
4896public CT_TblWidth tcW
4897{
4898get
4899{
4900return this.tcWField;
4901}
4902set
4903{
4904this.tcWField = value;
4905}
4906}
4907
4908[XmlElement(Order = 2)]
4909public CT_DecimalNumber gridSpan
4910{
4911get
4912{
4913return this.gridSpanField;
4914}
4915set
4916{
4917this.gridSpanField = value;
4918}
4919}
4920
4921[XmlElement(Order = 3)]
4922public CT_HMerge hMerge
4923{
4924get
4925{
4926return this.hMergeField;
4927}
4928set
4929{
4930this.hMergeField = value;
4931}
4932}
4933
4934[XmlElement(Order = 4)]
4935public CT_VMerge vMerge
4936{
4937get
4938{
4939return this.vMergeField;
4940}
4941set
4942{
4943this.vMergeField = value;
4944}
4945}
4946
4947[XmlElement(Order = 5)]
4948public CT_TcBorders tcBorders
4949{
4950get
4951{
4952return this.tcBordersField;
4953}
4954set
4955{
4956this.tcBordersField = value;
4957}
4958}
4959
4960[XmlElement(Order = 6)]
4961public CT_Shd shd
4962{
4963get
4964{
4965return this.shdField;
4966}
4967set
4968{
4969this.shdField = value;
4970}
4971}
4972
4973[XmlElement(Order = 7)]
4974public CT_OnOff noWrap
4975{
4976get
4977{
4978return this.noWrapField;
4979}
4980set
4981{
4982this.noWrapField = value;
4983}
4984}
4985
4986[XmlElement(Order = 8)]
4987public CT_TcMar tcMar
4988{
4989get
4990{
4991return this.tcMarField;
4992}
4993set
4994{
4995this.tcMarField = value;
4996}
4997}
4998
4999[XmlElement(Order = 9)]
5000public CT_TextDirection textDirection
5001{
5002get
5003{
5004return this.textDirectionField;
5005}
5006set
5007{
5008this.textDirectionField = value;
5009}
5010}
5011
5012[XmlElement(Order = 10)]
5013public CT_OnOff tcFitText
5014{
5015get
5016{
5017return this.tcFitTextField;
5018}
5019set
5020{
5021this.tcFitTextField = value;
5022}
5023}
5024
5025[XmlElement(Order = 11)]
5026public CT_VerticalJc vAlign
5027{
5028get
5029{
5030return this.vAlignField;
5031}
5032set
5033{
5034this.vAlignField = value;
5035}
5036}
5037
5038[XmlElement(Order = 12)]
5039public CT_OnOff hideMark
5040{
5041get
5042{
5043return this.hideMarkField;
5044}
5045set
5046{
5047this.hideMarkField = value;
5048}
5049}
5050
5051public CT_Shd AddNewShd()
5052{
5053this.shdField = new CT_Shd();
5054return this.shdField;
5055}
5056
5057public bool IsSetShd()
5058{
5059return this.shdField != null;
5060}
5061
5062public CT_VerticalJc AddNewVAlign()
5063{
5064this.vAlign = new CT_VerticalJc();
5065return this.vAlign;
5066}
5067
5068public CT_VMerge AddNewVMerge()
5069{
5070this.vMerge = new CT_VMerge();
5071return this.vMerge;
5072}
5073
5074public CT_TcBorders AddNewTcBorders()
5075{
5076this.tcBorders = new CT_TcBorders();
5077return this.tcBorders;
5078}
5079
5080public CT_HMerge AddNewHMerge()
5081{
5082this.hMerge = new CT_HMerge();
5083return this.hMerge;
5084}
5085public CT_DecimalNumber AddNewGridspan()
5086{
5087this.gridSpanField = new CT_DecimalNumber();
5088return this.gridSpanField;
5089}
5090}
5091
5092[Serializable]
5093
5094[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
5095[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
5096public class CT_HMerge
5097{
5098
5099private ST_Merge valField;
5100
5101private bool valFieldSpecified;
5102public static CT_HMerge Parse(XmlNode node, XmlNamespaceManager namespaceManager)
5103{
5104if (node == null)
5105return null;
5106CT_HMerge ctObj = new CT_HMerge();
5107if (node.Attributes["w:val"] != null)
5108ctObj.val = (ST_Merge)Enum.Parse(typeof(ST_Merge), node.Attributes["w:val"].Value);
5109return ctObj;
5110}
5111
5112
5113
5114internal void Write(StreamWriter sw, string nodeName)
5115{
5116sw.Write(string.Format("<w:{0}", nodeName));
5117XmlHelper.WriteAttribute(sw, "w:val", this.val.ToString());
5118sw.Write(">");
5119sw.WriteEndW(nodeName);
5120}
5121
5122[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
5123public ST_Merge val
5124{
5125get
5126{
5127return this.valField;
5128}
5129set
5130{
5131this.valField = value;
5132}
5133}
5134
5135[XmlIgnore]
5136public bool valSpecified
5137{
5138get
5139{
5140return this.valFieldSpecified;
5141}
5142set
5143{
5144this.valFieldSpecified = value;
5145}
5146}
5147}
5148
5149
5150[Serializable]
5151[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
5152public enum ST_Merge
5153{
5154
5155
5156@continue,
5157
5158
5159restart,
5160}
5161
5162
5163[Serializable]
5164
5165[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
5166[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
5167public class CT_VMerge
5168{
5169public CT_VMerge()
5170{
5171this.valField = ST_Merge.@continue;
5172}
5173private ST_Merge valField;
5174
5175private bool valFieldSpecified;
5176public static CT_VMerge Parse(XmlNode node, XmlNamespaceManager namespaceManager)
5177{
5178if (node == null)
5179return null;
5180CT_VMerge ctObj = new CT_VMerge();
5181if (node.Attributes["w:val"] != null)
5182{
5183ctObj.valField = (ST_Merge)Enum.Parse(typeof(ST_Merge), node.Attributes["w:val"].Value);
5184ctObj.valFieldSpecified = true;
5185}
5186return ctObj;
5187}
5188
5189
5190
5191internal void Write(StreamWriter sw, string nodeName)
5192{
5193sw.Write(string.Format("<w:{0}", nodeName));
5194if (valField != ST_Merge.@continue|| this.valFieldSpecified)
5195{
5196XmlHelper.WriteAttribute(sw, "w:val", this.valField.ToString());
5197}
5198sw.Write("/>");
5199}
5200
5201public ST_Merge val
5202{
5203get
5204{
5205return this.valField;
5206}
5207set
5208{
5209this.valField = value;
5210this.valFieldSpecified = true;
5211}
5212}
5213
5214[XmlIgnore]
5215public bool valSpecified
5216{
5217get
5218{
5219return this.valFieldSpecified;
5220}
5221set
5222{
5223this.valFieldSpecified = value;
5224}
5225}
5226}
5227
5228
5229#endregion
5230[Serializable]
5231
5232[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
5233[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
5234public class CT_Column
5235{
5236
5237private ulong wField;
5238
5239private bool wFieldSpecified;
5240
5241private ulong spaceField;
5242
5243private bool spaceFieldSpecified;
5244public static CT_Column Parse(XmlNode node, XmlNamespaceManager namespaceManager)
5245{
5246if (node == null)
5247return null;
5248CT_Column ctObj = new CT_Column();
5249ctObj.w = XmlHelper.ReadULong(node.Attributes["w:w"]);
5250ctObj.space = XmlHelper.ReadULong(node.Attributes["w:space"]);
5251return ctObj;
5252}
5253
5254
5255
5256internal void Write(StreamWriter sw, string nodeName)
5257{
5258sw.Write(string.Format("<w:{0}", nodeName));
5259XmlHelper.WriteAttribute(sw, "w:w", this.w);
5260XmlHelper.WriteAttribute(sw, "w:space", this.space);
5261sw.Write(">");
5262sw.WriteEndW(nodeName);
5263}
5264
5265[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
5266public ulong w
5267{
5268get
5269{
5270return this.wField;
5271}
5272set
5273{
5274this.wField = value;
5275}
5276}
5277
5278[XmlIgnore]
5279public bool wSpecified
5280{
5281get
5282{
5283return this.wFieldSpecified;
5284}
5285set
5286{
5287this.wFieldSpecified = value;
5288}
5289}
5290
5291[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
5292public ulong space
5293{
5294get
5295{
5296return this.spaceField;
5297}
5298set
5299{
5300this.spaceField = value;
5301}
5302}
5303
5304[XmlIgnore]
5305public bool spaceSpecified
5306{
5307get
5308{
5309return this.spaceFieldSpecified;
5310}
5311set
5312{
5313this.spaceFieldSpecified = value;
5314}
5315}
5316}
5317[Serializable]
5318
5319[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
5320[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
5321public class CT_Columns
5322{
5323
5324private List<CT_Column> colField;
5325
5326private ST_OnOff equalWidthField;
5327
5328private bool equalWidthFieldSpecified;
5329
5330private ulong spaceField;
5331
5332private bool spaceFieldSpecified;
5333
5334private string numField;
5335
5336private ST_OnOff sepField;
5337
5338private bool sepFieldSpecified;
5339
5340public CT_Columns()
5341{
5342//this.colField = new List<CT_Column>();
5343this.equalWidthField = ST_OnOff.off;
5344this.sepField = ST_OnOff.off;
5345}
5346public static CT_Columns Parse(XmlNode node, XmlNamespaceManager namespaceManager)
5347{
5348if (node == null)
5349return null;
5350CT_Columns ctObj = new CT_Columns();
5351if (node.Attributes["w:equalWidth"] != null)
5352ctObj.equalWidth = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:equalWidth"].Value,true);
5353ctObj.space = XmlHelper.ReadULong(node.Attributes["w:space"]);
5354ctObj.num = XmlHelper.ReadString(node.Attributes["w:num"]);
5355if (node.Attributes["w:sep"] != null)
5356ctObj.sep = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:sep"].Value,true);
5357ctObj.col = new List<CT_Column>();
5358foreach (XmlNode childNode in node.ChildNodes)
5359{
5360if (childNode.LocalName == "col")
5361ctObj.col.Add(CT_Column.Parse(childNode, namespaceManager));
5362}
5363return ctObj;
5364}
5365
5366
5367
5368internal void Write(StreamWriter sw, string nodeName)
5369{
5370sw.Write(string.Format("<w:{0}", nodeName));
5371if(this.equalWidth!= ST_OnOff.off)
5372XmlHelper.WriteAttribute(sw, "w:equalWidth", this.equalWidth.ToString());
5373XmlHelper.WriteAttribute(sw, "w:space", this.space);
5374XmlHelper.WriteAttribute(sw, "w:num", this.num);
5375if(this.sep!= ST_OnOff.off)
5376XmlHelper.WriteAttribute(sw, "w:sep", this.sep.ToString());
5377if (this.col != null && this.col.Count > 0)
5378{
5379sw.Write(">");
5380foreach (CT_Column x in this.col)
5381{
5382x.Write(sw, "col");
5383}
5384sw.WriteEndW(nodeName);
5385} else
5386{
5387sw.Write("/>");
5388}
5389}
5390
5391
5392[XmlElement("col", Order = 0)]
5393public List<CT_Column> col
5394{
5395get
5396{
5397return this.colField;
5398}
5399set
5400{
5401this.colField = value;
5402}
5403}
5404
5405[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
5406public ST_OnOff equalWidth
5407{
5408get
5409{
5410return this.equalWidthField;
5411}
5412set
5413{
5414this.equalWidthField = value;
5415}
5416}
5417
5418[XmlIgnore]
5419public bool equalWidthSpecified
5420{
5421get
5422{
5423return this.equalWidthFieldSpecified;
5424}
5425set
5426{
5427this.equalWidthFieldSpecified = value;
5428}
5429}
5430
5431[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
5432public ulong space
5433{
5434get
5435{
5436return this.spaceField;
5437}
5438set
5439{
5440this.spaceField = value;
5441}
5442}
5443
5444[XmlIgnore]
5445public bool spaceSpecified
5446{
5447get
5448{
5449return this.spaceFieldSpecified;
5450}
5451set
5452{
5453this.spaceFieldSpecified = value;
5454}
5455}
5456
5457[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
5458public string num
5459{
5460get
5461{
5462return this.numField;
5463}
5464set
5465{
5466this.numField = value;
5467}
5468}
5469
5470[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
5471public ST_OnOff sep
5472{
5473get
5474{
5475return this.sepField;
5476}
5477set
5478{
5479this.sepField = value;
5480}
5481}
5482
5483[XmlIgnore]
5484public bool sepSpecified
5485{
5486get
5487{
5488return this.sepFieldSpecified;
5489}
5490set
5491{
5492this.sepFieldSpecified = value;
5493}
5494}
5495}
5496
5497
5498#region Table Row
5499[Serializable]
5500
5501[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
5502[XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
5503public class CT_Row
5504{
5505
5506private CT_TblPrEx tblPrExField;
5507
5508private CT_TrPr trPrField;
5509
5510private ArrayList itemsField;
5511
5512private List<ItemsChoiceTableRowType> itemsElementNameField;
5513
5514private byte[] rsidRPrField;
5515
5516private byte[] rsidRField;
5517
5518private byte[] rsidDelField;
5519
5520private byte[] rsidTrField;
5521private byte[] paraIdField;
5522private byte[] textIdField;
5523
5524public CT_Row()
5525{
5526this.itemsElementNameField = new List<ItemsChoiceTableRowType>();
5527this.itemsField = new ArrayList();
5528}
5529object parent;
5530[XmlIgnore]
5531public object Parent
5532{
5533get { return parent; }
5534}
5535public static CT_Row Parse(XmlNode node, XmlNamespaceManager namespaceManager, object parent)
5536{
5537if (node == null)
5538return null;
5539CT_Row ctObj = new CT_Row();
5540if (parent != null)
5541ctObj.parent = parent;
5542if (node.Attributes["w14:paraId"] != null)
5543ctObj.paraIdField = XmlHelper.ReadBytes(node.Attributes["w14:paraId"]);
5544if (node.Attributes["w14:textId"] != null)
5545ctObj.textIdField = XmlHelper.ReadBytes(node.Attributes["w14:textId"]);
5546ctObj.rsidRPr = XmlHelper.ReadBytes(node.Attributes["w:rsidRPr"]);
5547ctObj.rsidR = XmlHelper.ReadBytes(node.Attributes["w:rsidR"]);
5548ctObj.rsidDel = XmlHelper.ReadBytes(node.Attributes["w:rsidDel"]);
5549ctObj.rsidTr = XmlHelper.ReadBytes(node.Attributes["w:rsidTr"]);
5550
5551foreach (XmlNode childNode in node.ChildNodes)
5552{
5553if (childNode.LocalName == "tblPrEx")
5554ctObj.tblPrEx = CT_TblPrEx.Parse(childNode, namespaceManager);
5555else if (childNode.LocalName == "trPr")
5556ctObj.trPr = CT_TrPr.Parse(childNode, namespaceManager);
5557else if (childNode.LocalName == "bookmarkStart")
5558{
5559ctObj.Items.Add(CT_Bookmark.Parse(childNode, namespaceManager));
5560ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.bookmarkStart);
5561}
5562else if (childNode.LocalName == "commentRangeEnd")
5563{
5564ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
5565ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.commentRangeEnd);
5566}
5567else if (childNode.LocalName == "commentRangeStart")
5568{
5569ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
5570ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.commentRangeStart);
5571}
5572else if (childNode.LocalName == "customXmlInsRangeStart")
5573{
5574ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
5575ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlInsRangeStart);
5576}
5577else if (childNode.LocalName == "customXmlMoveFromRangeStart")
5578{
5579ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
5580ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlMoveFromRangeStart);
5581}
5582else if (childNode.LocalName == "customXmlMoveToRangeEnd")
5583{
5584ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
5585ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlMoveToRangeEnd);
5586}
5587else if (childNode.LocalName == "customXmlMoveToRangeStart")
5588{
5589ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
5590ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlMoveToRangeStart);
5591}
5592else if (childNode.LocalName == "del")
5593{
5594ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
5595ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.del);
5596}
5597else if (childNode.LocalName == "moveTo")
5598{
5599ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
5600ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.moveTo);
5601}
5602else if (childNode.LocalName == "oMath")
5603{
5604ctObj.Items.Add(CT_OMath.Parse(childNode, namespaceManager));
5605ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.oMath);
5606}
5607else if (childNode.LocalName == "oMathPara")
5608{
5609ctObj.Items.Add(CT_OMathPara.Parse(childNode, namespaceManager));
5610ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.oMathPara);
5611}
5612else if (childNode.LocalName == "bookmarkEnd")
5613{
5614ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
5615ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.bookmarkEnd);
5616}
5617else if (childNode.LocalName == "customXml")
5618{
5619ctObj.Items.Add(CT_CustomXmlCell.Parse(childNode, namespaceManager));
5620ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXml);
5621}
5622else if (childNode.LocalName == "customXmlDelRangeStart")
5623{
5624ctObj.Items.Add(CT_TrackChange.Parse(childNode, namespaceManager));
5625ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlDelRangeStart);
5626}
5627else if (childNode.LocalName == "customXmlInsRangeEnd")
5628{
5629ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
5630ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlInsRangeEnd);
5631}
5632else if (childNode.LocalName == "customXmlMoveFromRangeEnd")
5633{
5634ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
5635ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlMoveFromRangeEnd);
5636}
5637else if (childNode.LocalName == "ins")
5638{
5639ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
5640ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.ins);
5641}
5642else if (childNode.LocalName == "moveFrom")
5643{
5644ctObj.Items.Add(CT_RunTrackChange.Parse(childNode, namespaceManager));
5645ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.moveFrom);
5646}
5647else if (childNode.LocalName == "moveFromRangeEnd")
5648{
5649ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
5650ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.moveFromRangeEnd);
5651}
5652else if (childNode.LocalName == "moveFromRangeStart")
5653{
5654ctObj.Items.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
5655ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.moveFromRangeStart);
5656}
5657else if (childNode.LocalName == "customXmlDelRangeEnd")
5658{
5659ctObj.Items.Add(CT_Markup.Parse(childNode, namespaceManager));
5660ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.customXmlDelRangeEnd);
5661}
5662else if (childNode.LocalName == "moveToRangeEnd")
5663{
5664ctObj.Items.Add(CT_MarkupRange.Parse(childNode, namespaceManager));
5665ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.moveToRangeEnd);
5666}
5667else if (childNode.LocalName == "moveToRangeStart")
5668{
5669ctObj.Items.Add(CT_MoveBookmark.Parse(childNode, namespaceManager));
5670ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.moveToRangeStart);
5671}
5672else if (childNode.LocalName == "permEnd")
5673{
5674ctObj.Items.Add(CT_Perm.Parse(childNode, namespaceManager));
5675ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.permEnd);
5676}
5677else if (childNode.LocalName == "permStart")
5678{
5679ctObj.Items.Add(CT_PermStart.Parse(childNode, namespaceManager));
5680ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.permStart);
5681}
5682else if (childNode.LocalName == "proofErr")
5683{
5684ctObj.Items.Add(CT_ProofErr.Parse(childNode, namespaceManager));
5685ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.proofErr);
5686}
5687else if (childNode.LocalName == "sdt")
5688{
5689ctObj.Items.Add(CT_SdtCell.Parse(childNode, namespaceManager));
5690ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.sdt);
5691}
5692else if (childNode.LocalName == "tc")
5693{
5694ctObj.Items.Add(CT_Tc.Parse(childNode, namespaceManager, ctObj));
5695ctObj.ItemsElementName.Add(ItemsChoiceTableRowType.tc);
5696}
5697}
5698return ctObj;
5699}
5700
5701internal void Write(StreamWriter sw, string nodeName)
5702{
5703sw.Write(string.Format("<w:{0}", nodeName));
5704XmlHelper.WriteAttribute(sw, "w:rsidR", this.rsidR);
5705XmlHelper.WriteAttribute(sw, "w:rsidRPr", this.rsidRPr);
5706XmlHelper.WriteAttribute(sw, "w14:paraId", this.paraIdField);
5707XmlHelper.WriteAttribute(sw, "w14:textId", this.textIdField);
5708XmlHelper.WriteAttribute(sw, "w:rsidDel", this.rsidDel);
5709XmlHelper.WriteAttribute(sw, "w:rsidTr", this.rsidTr);
5710sw.Write(">");
5711if (this.tblPrEx != null)
5712this.tblPrEx.Write(sw, "tblPrEx");
5713if (this.trPr != null)
5714this.trPr.Write(sw, "trPr");
5715foreach (object o in this.Items)
5716{
5717if (o is CT_Bookmark)
5718((CT_Bookmark)o).Write(sw, "bookmarkStart");
5719else if (o is CT_MarkupRange)
5720((CT_MarkupRange)o).Write(sw, "commentRangeEnd");
5721else if (o is CT_MarkupRange)
5722((CT_MarkupRange)o).Write(sw, "commentRangeStart");
5723else if (o is CT_TrackChange)
5724((CT_TrackChange)o).Write(sw, "customXmlInsRangeStart");
5725else if (o is CT_TrackChange)
5726((CT_TrackChange)o).Write(sw, "customXmlMoveFromRangeStart");
5727else if (o is CT_Markup)
5728((CT_Markup)o).Write(sw, "customXmlMoveToRangeEnd");
5729else if (o is CT_TrackChange)
5730((CT_TrackChange)o).Write(sw, "customXmlMoveToRangeStart");
5731else if (o is CT_RunTrackChange)
5732((CT_RunTrackChange)o).Write(sw, "del");
5733else if (o is CT_RunTrackChange)
5734((CT_RunTrackChange)o).Write(sw, "moveTo");
5735else if (o is CT_OMath)
5736((CT_OMath)o).Write(sw, "oMath");
5737else if (o is CT_OMathPara)
5738((CT_OMathPara)o).Write(sw, "oMathPara");
5739else if (o is CT_MarkupRange)
5740((CT_MarkupRange)o).Write(sw, "bookmarkEnd");
5741else if (o is CT_CustomXmlCell)
5742((CT_CustomXmlCell)o).Write(sw, "customXml");
5743else if (o is CT_TrackChange)
5744((CT_TrackChange)o).Write(sw, "customXmlDelRangeStart");
5745else if (o is CT_Markup)
5746((CT_Markup)o).Write(sw, "customXmlInsRangeEnd");
5747else if (o is CT_Markup)
5748((CT_Markup)o).Write(sw, "customXmlMoveFromRangeEnd");
5749else if (o is CT_RunTrackChange)
5750((CT_RunTrackChange)o).Write(sw, "ins");
5751else if (o is CT_RunTrackChange)
5752((CT_RunTrackChange)o).Write(sw, "moveFrom");
5753else if (o is CT_MarkupRange)
5754((CT_MarkupRange)o).Write(sw, "moveFromRangeEnd");
5755else if (o is CT_MoveBookmark)
5756((CT_MoveBookmark)o).Write(sw, "moveFromRangeStart");
5757else if (o is CT_Markup)
5758((CT_Markup)o).Write(sw, "customXmlDelRangeEnd");
5759else if (o is CT_MarkupRange)
5760((CT_MarkupRange)o).Write(sw, "moveToRangeEnd");
5761else if (o is CT_MoveBookmark)
5762((CT_MoveBookmark)o).Write(sw, "moveToRangeStart");
5763else if (o is CT_Perm)
5764((CT_Perm)o).Write(sw, "permEnd");
5765else if (o is CT_PermStart)
5766((CT_PermStart)o).Write(sw, "permStart");
5767else if (o is CT_ProofErr)
5768((CT_ProofErr)o).Write(sw, "proofErr");
5769else if (o is CT_SdtCell)
5770((CT_SdtCell)o).Write(sw, "sdt");
5771else if (o is CT_Tc)
5772((CT_Tc)o).Write(sw, "tc");
5773}
5774sw.WriteEndW(nodeName);
5775}
5776public CT_Row Copy()
5777{
5778CT_Row ctRow = new CT_Row();
5779ctRow.paraIdField = this.paraIdField?.ToArray();
5780ctRow.rsidRField = this.rsidRField?.ToArray();
5781ctRow.rsidDelField = this.rsidDelField?.ToArray();
5782ctRow.rsidRPrField = this.rsidRPrField?.ToArray();
5783ctRow.rsidTrField = this.rsidTrField?.ToArray();
5784ctRow.textIdField = this.textIdField?.ToArray();
5785ctRow.trPrField = this.trPrField?.Copy();
5786ctRow.tblPrExField = this.tblPrExField?.Copy();
5787ctRow.itemsElementNameField = this.itemsElementNameField?.Copy();
5788ctRow.itemsField = this.itemsField?.Copy();
5789return ctRow;
5790}
5791public void RemoveTc(int pos)
5792{
5793RemoveObject(ItemsChoiceTableRowType.tc, pos);
5794}
5795[XmlElement(Order = 0)]
5796public CT_TblPrEx tblPrEx
5797{
5798get
5799{
5800return this.tblPrExField;
5801}
5802set
5803{
5804this.tblPrExField = value;
5805}
5806}
5807
5808[XmlElement(Order = 1)]
5809public CT_TrPr trPr
5810{
5811get
5812{
5813return this.trPrField;
5814}
5815set
5816{
5817this.trPrField = value;
5818}
5819}
5820
5821[XmlElement("oMath", typeof(CT_OMath), Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", Order = 2)]
5822[XmlElement("oMathPara", typeof(CT_OMathPara), Namespace = "http://schemas.openxmlformats.org/officeDocument/2006/math", Order = 2)]
5823[XmlElement("bookmarkEnd", typeof(CT_MarkupRange), Order = 2)]
5824[XmlElement("bookmarkStart", typeof(CT_Bookmark), Order = 2)]
5825[XmlElement("commentRangeEnd", typeof(CT_MarkupRange), Order = 2)]
5826[XmlElement("commentRangeStart", typeof(CT_MarkupRange), Order = 2)]
5827[XmlElement("customXml", typeof(CT_CustomXmlCell), Order = 2)]
5828[XmlElement("customXmlDelRangeEnd", typeof(CT_Markup), Order = 2)]
5829[XmlElement("customXmlDelRangeStart", typeof(CT_TrackChange), Order = 2)]
5830[XmlElement("customXmlInsRangeEnd", typeof(CT_Markup), Order = 2)]
5831[XmlElement("customXmlInsRangeStart", typeof(CT_TrackChange), Order = 2)]
5832[XmlElement("customXmlMoveFromRangeEnd", typeof(CT_Markup), Order = 2)]
5833[XmlElement("customXmlMoveFromRangeStart", typeof(CT_TrackChange), Order = 2)]
5834[XmlElement("customXmlMoveToRangeEnd", typeof(CT_Markup), Order = 2)]
5835[XmlElement("customXmlMoveToRangeStart", typeof(CT_TrackChange), Order = 2)]
5836[XmlElement("del", typeof(CT_RunTrackChange), Order = 2)]
5837[XmlElement("ins", typeof(CT_RunTrackChange), Order = 2)]
5838[XmlElement("moveFrom", typeof(CT_RunTrackChange), Order = 2)]
5839[XmlElement("moveFromRangeEnd", typeof(CT_MarkupRange), Order = 2)]
5840[XmlElement("moveFromRangeStart", typeof(CT_MoveBookmark), Order = 2)]
5841[XmlElement("moveTo", typeof(CT_RunTrackChange), Order = 2)]
5842[XmlElement("moveToRangeEnd", typeof(CT_MarkupRange), Order = 2)]
5843[XmlElement("moveToRangeStart", typeof(CT_MoveBookmark), Order = 2)]
5844[XmlElement("permEnd", typeof(CT_Perm), Order = 2)]
5845[XmlElement("permStart", typeof(CT_PermStart), Order = 2)]
5846[XmlElement("proofErr", typeof(CT_ProofErr), Order = 2)]
5847[XmlElement("sdt", typeof(CT_SdtCell), Order = 2)]
5848[XmlElement("tc", typeof(CT_Tc), Order = 2)]
5849[XmlChoiceIdentifier("ItemsElementName")]
5850public ArrayList Items
5851{
5852get
5853{
5854return this.itemsField;
5855}
5856set
5857{
5858this.itemsField = value;
5859}
5860}
5861
5862[XmlElement("ItemsElementName", Order = 3)]
5863[XmlIgnore]
5864public List<ItemsChoiceTableRowType> ItemsElementName
5865{
5866get
5867{
5868return this.itemsElementNameField;
5869}
5870set
5871{
5872this.itemsElementNameField = value;
5873}
5874}
5875
5876[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "hexBinary")]
5877public byte[] rsidRPr
5878{
5879get
5880{
5881return this.rsidRPrField;
5882}
5883set
5884{
5885this.rsidRPrField = value;
5886}
5887}
5888
5889[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "hexBinary")]
5890public byte[] rsidR
5891{
5892get
5893{
5894return this.rsidRField;
5895}
5896set
5897{
5898this.rsidRField = value;
5899}
5900}
5901
5902[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "hexBinary")]
5903public byte[] rsidDel
5904{
5905get
5906{
5907return this.rsidDelField;
5908}
5909set
5910{
5911this.rsidDelField = value;
5912}
5913}
5914
5915[XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "hexBinary")]
5916public byte[] rsidTr
5917{
5918get
5919{
5920return this.rsidTrField;
5921}
5922set
5923{
5924this.rsidTrField = value;
5925}
5926}
5927private CT_Tbl _table;
5928[XmlIgnore]
5929public CT_Tbl Table
5930{
5931get { return _table; }
5932set { _table = value; }
5933}
5934
5935public IList<CT_Tc> GetTcList()
5936{
5937return GetObjectList<CT_Tc>(ItemsChoiceTableRowType.tc);
5938}
5939
5940public bool IsSetTrPr()
5941{
5942if (this.trPrField == null)
5943return false;
5944return this.trPrField.Items.Count > 0;
5945}
5946
5947public CT_TrPr AddNewTrPr()
5948{
5949if (this.trPrField == null)
5950this.trPrField = new CT_TrPr();
5951return this.trPrField;
5952}
5953
5954public CT_Tc AddNewTc()
5955{
5956return AddNewObject<CT_Tc>(ItemsChoiceTableRowType.tc);
5957}
5958
5959public int SizeOfTcArray()
5960{
5961return SizeOfArray(ItemsChoiceTableRowType.tc);
5962}
5963
5964public CT_Tc GetTcArray(int p)
5965{
5966return GetObjectArray<CT_Tc>(p, ItemsChoiceTableRowType.tc);
5967}
5968#region Generic methods for object operation
5969
5970private List<T> GetObjectList<T>(ItemsChoiceTableRowType type) where T : class
5971{
5972lock (this)
5973{
5974List<T> list = new List<T>();
5975for (int i = 0; i < itemsElementNameField.Count; i++)
5976{
5977if (itemsElementNameField[i] == type)
5978list.Add(itemsField[i] as T);
5979}
5980return list;
5981}
5982}
5983private int SizeOfArray(ItemsChoiceTableRowType type)
5984{
5985lock (this)
5986{
5987int size = 0;
5988for (int i = 0; i < itemsElementNameField.Count; i++)
5989{
5990if (itemsElementNameField[i] == type)
5991size++;
5992}
5993return size;
5994}
5995}
5996private T GetObjectArray<T>(int p, ItemsChoiceTableRowType type) where T : class
5997{
5998lock (this)
5999{
6000int pos = GetObjectIndex(type, p);
6001if (pos < 0 || pos >= this.itemsField.Count)
6002return null;
6003return itemsField[pos] as T;
6004}
6005}
6006private T InsertNewObject<T>(ItemsChoiceTableRowType type, int p) where T : class, new()
6007{
6008T t = new T();
6009lock (this)
6010{
6011int pos = GetObjectIndex(type, p);
6012this.itemsElementNameField.Insert(pos, type);
6013this.itemsField.Insert(pos, t);
6014}
6015return t;
6016}
6017private T AddNewObject<T>(ItemsChoiceTableRowType type) where T : class, new()
6018{
6019T t = new T();
6020lock (this)
6021{
6022this.itemsElementNameField.Add(type);
6023this.itemsField.Add(t);
6024}
6025return t;
6026}
6027private void SetObject<T>(ItemsChoiceTableRowType type, int p, T obj) where T : class
6028{
6029lock (this)
6030{
6031int pos = GetObjectIndex(type, p);
6032if (pos < 0 || pos >= this.itemsField.Count)
6033return;
6034if (this.itemsField[pos] is T)
6035this.itemsField[pos] = obj;
6036else
6037throw new Exception(string.Format(@"object types are difference, itemsField[{0}] is {1}, and parameter obj is {2}",
6038pos, this.itemsField[pos].GetType().Name, typeof(T).Name));
6039}
6040}
6041private int GetObjectIndex(ItemsChoiceTableRowType type, int p)
6042{
6043int index = -1;
6044int pos = 0;
6045for (int i = 0; i < itemsElementNameField.Count; i++)
6046{
6047if (itemsElementNameField[i] == type)
6048{
6049if (pos == p)
6050{
6051index = i;
6052break;
6053}
6054else
6055pos++;
6056}
6057}
6058return index;
6059}
6060private void RemoveObject(ItemsChoiceTableRowType type, int p)
6061{
6062lock (this)
6063{
6064int pos = GetObjectIndex(type, p);
6065if (pos < 0 || pos >= this.itemsField.Count)
6066return;
6067itemsElementNameField.RemoveAt(pos);
6068itemsField.RemoveAt(pos);
6069}
6070}
6071#endregion
6072}
6073
6074
6075[Serializable]
6076[XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IncludeInSchema = false)]
6077public enum ItemsChoiceTableRowType
6078{
6079
6080
6081[XmlEnum("http://schemas.openxmlformats.org/officeDocument/2006/math:oMath")]
6082oMath,
6083
6084
6085[XmlEnum("http://schemas.openxmlformats.org/officeDocument/2006/math:oMathPara")]
6086oMathPara,
6087
6088
6089bookmarkEnd,
6090
6091
6092bookmarkStart,
6093
6094
6095commentRangeEnd,
6096
6097
6098commentRangeStart,
6099
6100
6101customXml,
6102
6103
6104customXmlDelRangeEnd,
6105
6106
6107customXmlDelRangeStart,
6108
6109
6110customXmlInsRangeEnd,
6111
6112
6113customXmlInsRangeStart,
6114
6115
6116customXmlMoveFromRangeEnd,
6117
6118
6119customXmlMoveFromRangeStart,
6120
6121
6122customXmlMoveToRangeEnd,
6123
6124
6125customXmlMoveToRangeStart,
6126
6127
6128del,
6129
6130
6131ins,
6132
6133
6134moveFrom,
6135
6136
6137moveFromRangeEnd,
6138
6139
6140moveFromRangeStart,
6141
6142
6143moveTo,
6144
6145
6146moveToRangeEnd,
6147
6148
6149moveToRangeStart,
6150
6151
6152permEnd,
6153
6154
6155permStart,
6156
6157
6158proofErr,
6159
6160
6161sdt,
6162
6163
6164tc,
6165}
6166
6167#endregion
6168}
6169