npoi

Форк
0
2089 строк · 56.3 Кб
1
using NPOI.OpenXml4Net.Util;
2
using System;
3
using System.Collections.Generic;
4
using System.IO;
5
using System.Xml;
6
using System.Xml.Serialization;
7

8
namespace NPOI.OpenXmlFormats.Wordprocessing
9
{
10
    [Serializable]
11

12
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
13
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
14
    public class CT_Num
15
    {
16

17
        private CT_DecimalNumber abstractNumIdField;
18

19
        private List<CT_NumLvl> lvlOverrideField;
20

21
        private string numIdField;
22

23
        public CT_Num()
24
        {
25
            //this.lvlOverrideField = new List<CT_NumLvl>();
26
            //this.abstractNumIdField = new CT_DecimalNumber();
27
        }
28
        public static CT_Num Parse(XmlNode node, XmlNamespaceManager namespaceManager)
29
        {
30
            if (node == null)
31
                return null;
32
            CT_Num ctObj = new CT_Num();
33
            ctObj.numId = XmlHelper.ReadString(node.Attributes["w:numId"]);
34
            ctObj.lvlOverride = new List<CT_NumLvl>();
35
            foreach (XmlNode childNode in node.ChildNodes)
36
            {
37
                if (childNode.LocalName == "abstractNumId")
38
                    ctObj.abstractNumId = CT_DecimalNumber.Parse(childNode, namespaceManager);
39
                else if (childNode.LocalName == "lvlOverride")
40
                    ctObj.lvlOverride.Add(CT_NumLvl.Parse(childNode, namespaceManager));
41
            }
42
            return ctObj;
43
        }
44

45

46

47
        internal void Write(StreamWriter sw, string nodeName)
48
        {
49
            sw.Write(string.Format("<w:{0}", nodeName));
50
            XmlHelper.WriteAttribute(sw, "w:numId", this.numId);
51
            sw.Write(">");
52
            if (this.abstractNumId != null)
53
                this.abstractNumId.Write(sw, "abstractNumId");
54
            if (this.lvlOverride != null)
55
            {
56
                foreach (CT_NumLvl x in this.lvlOverride)
57
                {
58
                    x.Write(sw, "lvlOverride");
59
                }
60
            }
61
            sw.WriteEndW(nodeName);
62
        }
63

64

65

66
        [XmlElement(Order = 0)]
67
        public CT_DecimalNumber abstractNumId
68
        {
69
            get
70
            {
71
                return this.abstractNumIdField;
72
            }
73
            set
74
            {
75
                this.abstractNumIdField = value;
76
            }
77
        }
78

79
        [XmlElement("lvlOverride", Order = 1)]
80
        public List<CT_NumLvl> lvlOverride
81
        {
82
            get
83
            {
84
                return this.lvlOverrideField;
85
            }
86
            set
87
            {
88
                this.lvlOverrideField = value;
89
            }
90
        }
91

92
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
93
        public string numId
94
        {
95
            get
96
            {
97
                return this.numIdField;
98
            }
99
            set
100
            {
101
                this.numIdField = value;
102
            }
103
        }
104

105
        public CT_DecimalNumber AddNewAbstractNumId()
106
        {
107
            if (this.abstractNumIdField == null)
108
                abstractNumIdField = new CT_DecimalNumber();
109
            return abstractNumIdField;
110
        }
111

112
        public int SizeOfLvlOverrideArray()
113
        {
114
            return lvlOverrideField == null ? 0 : lvlOverrideField.Count;
115
        }
116

117
        public CT_NumLvl GetLvlOverrideArray(int i)
118
        {
119
            return lvlOverrideField == null ? null : lvlOverrideField[i];
120
        }
121
    }
122

123

124
    [Serializable]
125

126
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
127
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
128
    public class CT_NumLvl
129
    {
130

131
        private CT_DecimalNumber startOverrideField;
132

133
        private CT_Lvl lvlField;
134

135
        private string ilvlField;
136

137
        public CT_NumLvl()
138
        {
139
            //this.lvlField = new CT_Lvl();
140
            //this.startOverrideField = new CT_DecimalNumber();
141
        }
142
        public static CT_NumLvl Parse(XmlNode node, XmlNamespaceManager namespaceManager)
143
        {
144
            if (node == null)
145
                return null;
146
            CT_NumLvl ctObj = new CT_NumLvl();
147
            ctObj.ilvl = XmlHelper.ReadString(node.Attributes["w:ilvl"]);
148
            foreach (XmlNode childNode in node.ChildNodes)
149
            {
150
                if (childNode.LocalName == "startOverride")
151
                    ctObj.startOverride = CT_DecimalNumber.Parse(childNode, namespaceManager);
152
                else if (childNode.LocalName == "lvl")
153
                    ctObj.lvl = CT_Lvl.Parse(childNode, namespaceManager);
154
            }
155
            return ctObj;
156
        }
157

158

159

160
        internal void Write(StreamWriter sw, string nodeName)
161
        {
162
            sw.Write(string.Format("<w:{0}", nodeName));
163
            XmlHelper.WriteAttribute(sw, "w:ilvl", this.ilvl);
164
            sw.Write(">");
165
            if (this.startOverride != null)
166
                this.startOverride.Write(sw, "startOverride");
167
            if (this.lvl != null)
168
                this.lvl.Write(sw, "lvl");
169
            sw.WriteEndW(nodeName);
170
        }
171

172

173

174
        [XmlElement(Order = 0)]
175
        public CT_DecimalNumber startOverride
176
        {
177
            get
178
            {
179
                return this.startOverrideField;
180
            }
181
            set
182
            {
183
                this.startOverrideField = value;
184
            }
185
        }
186

187
        [XmlElement(Order = 1)]
188
        public CT_Lvl lvl
189
        {
190
            get
191
            {
192
                return this.lvlField;
193
            }
194
            set
195
            {
196
                this.lvlField = value;
197
            }
198
        }
199

200
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
201
        public string ilvl
202
        {
203
            get
204
            {
205
                return this.ilvlField;
206
            }
207
            set
208
            {
209
                this.ilvlField = value;
210
            }
211
        }
212
    }
213

214
    public class CT_Numbering
215
    {
216

217
        private List<CT_NumPicBullet> numPicBulletField;
218

219
        private List<CT_AbstractNum> abstractNumField;
220

221
        private List<CT_Num> numField;
222

223
        private CT_DecimalNumber numIdMacAtCleanupField;
224
        public static CT_Numbering Parse(XmlNode node, XmlNamespaceManager namespaceManager)
225
        {
226
            if (node == null)
227
                return null;
228
            CT_Numbering ctObj = new CT_Numbering();
229
            ctObj.numPicBullet = new List<CT_NumPicBullet>();
230
            ctObj.abstractNum = new List<CT_AbstractNum>();
231
            ctObj.num = new List<CT_Num>();
232
            foreach (XmlNode childNode in node.ChildNodes)
233
            {
234
                if (childNode.LocalName == "numIdMacAtCleanup")
235
                    ctObj.numIdMacAtCleanup = CT_DecimalNumber.Parse(childNode, namespaceManager);
236
                else if (childNode.LocalName == "numPicBullet")
237
                    ctObj.numPicBullet.Add(CT_NumPicBullet.Parse(childNode, namespaceManager));
238
                else if (childNode.LocalName == "abstractNum")
239
                    ctObj.abstractNum.Add(CT_AbstractNum.Parse(childNode, namespaceManager));
240
                else if (childNode.LocalName == "num")
241
                    ctObj.num.Add(CT_Num.Parse(childNode, namespaceManager));
242
            }
243
            return ctObj;
244
        }
245

246

247

248
        internal void Write(StreamWriter sw)
249
        {
250
            sw.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
251
            sw.Write("<w:numbering xmlns:wpc=\"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas\" xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" ");
252
            sw.Write("xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:m=\"http://schemas.openxmlformats.org/officeDocument/2006/math\" ");
253
            sw.Write("xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:wp14=\"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing\" xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" ");
254
            sw.Write("xmlns:w10=\"urn:schemas-microsoft-com:office:word\" xmlns:w=\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\" ");
255
            sw.Write("xmlns:wne=\"http://schemas.microsoft.com/office/word/2006/wordml\">");
256
            if (this.numIdMacAtCleanup != null)
257
                this.numIdMacAtCleanup.Write(sw, "numIdMacAtCleanup");
258
            if (this.numPicBullet != null)
259
            {
260
                foreach (CT_NumPicBullet x in this.numPicBullet)
261
                {
262
                    x.Write(sw, "numPicBullet");
263
                }
264
            }
265
            if (this.abstractNum != null)
266
            {
267
                foreach (CT_AbstractNum x in this.abstractNum)
268
                {
269
                    x.Write(sw, "abstractNum");
270
                }
271
            }
272
            if (this.num != null)
273
            {
274
                foreach (CT_Num x in this.num)
275
                {
276
                    x.Write(sw, "num");
277
                }
278
            }
279
            sw.Write("</w:numbering>");
280
        }
281

282
        public CT_Numbering()
283
        {
284
            //this.numIdMacAtCleanupField = new CT_DecimalNumber();
285
            //this.numField = new List<CT_Num>();
286
            //this.abstractNumField = new List<CT_AbstractNum>();
287
            //this.numPicBulletField = new List<CT_NumPicBullet>();
288
        }
289

290
        [XmlElement("numPicBullet", Order = 0)]
291
        public List<CT_NumPicBullet> numPicBullet
292
        {
293
            get
294
            {
295
                return this.numPicBulletField;
296
            }
297
            set
298
            {
299
                this.numPicBulletField = value;
300
            }
301
        }
302

303
        [XmlElement("abstractNum", Order = 1)]
304
        public List<CT_AbstractNum> abstractNum
305
        {
306
            get
307
            {
308
                return this.abstractNumField;
309
            }
310
            set
311
            {
312
                this.abstractNumField = value;
313
            }
314
        }
315

316
        [XmlElement("num", Order = 2)]
317
        public List<CT_Num> num
318
        {
319
            get
320
            {
321
                return this.numField;
322
            }
323
            set
324
            {
325
                this.numField = value;
326
            }
327
        }
328

329
        [XmlElement(Order = 3)]
330
        public CT_DecimalNumber numIdMacAtCleanup
331
        {
332
            get
333
            {
334
                return this.numIdMacAtCleanupField;
335
            }
336
            set
337
            {
338
                this.numIdMacAtCleanupField = value;
339
            }
340
        }
341

342
        public IList<CT_Num> GetNumList()
343
        {
344
            return numField;
345
        }
346

347
        public IList<CT_AbstractNum> GetAbstractNumList()
348
        {
349
            return abstractNumField;
350
        }
351

352
        public CT_Num AddNewNum()
353
        {
354
            CT_Num num = new CT_Num();
355
            if (this.numField == null)
356
                this.numField = new List<CT_Num>();
357
            numField.Add(num);
358
            return num;
359
        }
360

361
        public void SetNumArray(int pos, CT_Num ct_Num)
362
        {
363
            if (this.numField == null)
364
                this.numField = new List<CT_Num>();
365

366
            if (pos < 0 || pos >= numField.Count)
367
                numField.Add(ct_Num);
368
            numField[pos] = ct_Num;
369
        }
370

371
        public CT_AbstractNum AddNewAbstractNum()
372
        {
373
            CT_AbstractNum num = new CT_AbstractNum();
374
            if (this.abstractNumField == null)
375
                this.abstractNumField = new List<CT_AbstractNum>();
376
            this.abstractNumField.Add(num);
377
            return num;
378
        }
379

380
        public void SetAbstractNumArray(int pos, CT_AbstractNum cT_AbstractNum)
381
        {
382
            if (this.abstractNumField == null)
383
                this.abstractNumField = new List<CT_AbstractNum>();
384
            if (pos < 0 || pos >= abstractNumField.Count)
385
                abstractNumField.Add(cT_AbstractNum);
386
            abstractNumField[pos] = cT_AbstractNum;
387
        }
388

389
        public void RemoveAbstractNum(int p)
390
        {
391
            if (this.abstractNumField == null)
392
                return;
393
            abstractNumField.RemoveAt(p);
394
        }
395
    }
396

397

398
    [Serializable]
399

400
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
401
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
402
    public class CT_NumPicBullet
403
    {
404

405
        private CT_Picture pictField;
406

407
        private string numPicBulletIdField;
408

409
        public CT_NumPicBullet()
410
        {
411
            //this.pictField = new CT_Picture();
412
        }
413

414
        [XmlElement(Order = 0)]
415
        public CT_Picture pict
416
        {
417
            get
418
            {
419
                return this.pictField;
420
            }
421
            set
422
            {
423
                this.pictField = value;
424
            }
425
        }
426

427
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
428
        public string numPicBulletId
429
        {
430
            get
431
            {
432
                return this.numPicBulletIdField;
433
            }
434
            set
435
            {
436
                this.numPicBulletIdField = value;
437
            }
438
        }
439
        public static CT_NumPicBullet Parse(XmlNode node, XmlNamespaceManager namespaceManager)
440
        {
441
            if (node == null)
442
                return null;
443
            CT_NumPicBullet ctObj = new CT_NumPicBullet();
444
            ctObj.numPicBulletId = XmlHelper.ReadString(node.Attributes["w:numPicBulletId"]);
445
            foreach (XmlNode childNode in node.ChildNodes)
446
            {
447
                if (childNode.LocalName == "pict")
448
                    ctObj.pict = CT_Picture.Parse(childNode, namespaceManager);
449
            }
450
            return ctObj;
451
        }
452

453

454

455
        internal void Write(StreamWriter sw, string nodeName)
456
        {
457
            sw.Write(string.Format("<w:{0}", nodeName));
458
            XmlHelper.WriteAttribute(sw, "w:numPicBulletId", this.numPicBulletId);
459
            sw.Write(">");
460
            if (this.pict != null)
461
                this.pict.Write(sw, "pict");
462
            sw.WriteEndW(nodeName);
463
        }
464

465

466

467

468
    }
469

470

471
    [Serializable]
472

473
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
474
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
475
    public class CT_NumFmt
476
    {
477
        public static CT_NumFmt Parse(XmlNode node, XmlNamespaceManager namespaceManager)
478
        {
479
            if (node == null)
480
                return null;
481
            CT_NumFmt ctObj = new CT_NumFmt();
482
            if (node.Attributes["w:val"] != null)
483
                ctObj.val = (ST_NumberFormat)Enum.Parse(typeof(ST_NumberFormat), node.Attributes["w:val"].Value);
484
            return ctObj;
485
        }
486

487

488

489
        internal void Write(StreamWriter sw, string nodeName)
490
        {
491
            sw.Write(string.Format("<w:{0}", nodeName));
492
            XmlHelper.WriteAttribute(sw, "w:val", this.val.ToString());
493
            sw.Write("/>");
494
        }
495

496

497
        private ST_NumberFormat valField;
498

499
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
500
        public ST_NumberFormat val
501
        {
502
            get
503
            {
504
                return this.valField;
505
            }
506
            set
507
            {
508
                this.valField = value;
509
            }
510
        }
511
    }
512

513

514
    [Serializable]
515
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
516
    public enum ST_NumberFormat
517
    {
518

519
    
520
        [XmlEnum("decimal")]
521
        @decimal,
522

523
    
524
        upperRoman,
525

526
    
527
        lowerRoman,
528

529
    
530
        upperLetter,
531

532
    
533
        lowerLetter,
534

535
    
536
        ordinal,
537

538
    
539
        cardinalText,
540

541
    
542
        ordinalText,
543

544
    
545
        hex,
546

547
    
548
        chicago,
549

550
    
551
        ideographDigital,
552

553
    
554
        japaneseCounting,
555

556
    
557
        aiueo,
558

559
    
560
        iroha,
561

562
    
563
        decimalFullWidth,
564

565
    
566
        decimalHalfWidth,
567

568
    
569
        japaneseLegal,
570

571
    
572
        japaneseDigitalTenThousand,
573

574
    
575
        decimalEnclosedCircle,
576

577
    
578
        decimalFullWidth2,
579

580
    
581
        aiueoFullWidth,
582

583
    
584
        irohaFullWidth,
585

586
    
587
        decimalZero,
588

589
    
590
        bullet,
591

592
    
593
        ganada,
594

595
    
596
        chosung,
597

598
    
599
        decimalEnclosedFullstop,
600

601
    
602
        decimalEnclosedParen,
603

604
    
605
        decimalEnclosedCircleChinese,
606

607
    
608
        ideographEnclosedCircle,
609

610
    
611
        ideographTraditional,
612

613
    
614
        ideographZodiac,
615

616
    
617
        ideographZodiacTraditional,
618

619
    
620
        taiwaneseCounting,
621

622
    
623
        ideographLegalTraditional,
624

625
    
626
        taiwaneseCountingThousand,
627

628
    
629
        taiwaneseDigital,
630

631
    
632
        chineseCounting,
633

634
    
635
        chineseLegalSimplified,
636

637
    
638
        chineseCountingThousand,
639

640
    
641
        koreanDigital,
642

643
    
644
        koreanCounting,
645

646
    
647
        koreanLegal,
648

649
    
650
        koreanDigital2,
651

652
    
653
        vietnameseCounting,
654

655
    
656
        russianLower,
657

658
    
659
        russianUpper,
660

661
    
662
        none,
663

664
    
665
        numberInDash,
666

667
    
668
        hebrew1,
669

670
    
671
        hebrew2,
672

673
    
674
        arabicAlpha,
675

676
    
677
        arabicAbjad,
678

679
    
680
        hindiVowels,
681

682
    
683
        hindiConsonants,
684

685
    
686
        hindiNumbers,
687

688
    
689
        hindiCounting,
690

691
    
692
        thaiLetters,
693

694
    
695
        thaiNumbers,
696

697
    
698
        thaiCounting,
699
    }
700

701

702
    [Serializable]
703

704
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
705
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
706
    public class CT_NumRestart
707
    {
708
        public static CT_NumRestart Parse(XmlNode node, XmlNamespaceManager namespaceManager)
709
        {
710
            if (node == null)
711
                return null;
712
            CT_NumRestart ctObj = new CT_NumRestart();
713
            if (node.Attributes["w:val"] != null)
714
                ctObj.val = (ST_RestartNumber)Enum.Parse(typeof(ST_RestartNumber), node.Attributes["w:val"].Value);
715
            return ctObj;
716
        }
717

718

719

720
        internal void Write(StreamWriter sw, string nodeName)
721
        {
722
            sw.Write(string.Format("<w:{0}", nodeName));
723
            XmlHelper.WriteAttribute(sw, "w:val", this.val.ToString());
724
            sw.Write(">");
725
            sw.WriteEndW(nodeName);
726
        }
727

728
        private ST_RestartNumber valField;
729

730
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
731
        public ST_RestartNumber val
732
        {
733
            get
734
            {
735
                return this.valField;
736
            }
737
            set
738
            {
739
                this.valField = value;
740
            }
741
        }
742
    }
743

744

745
    [Serializable]
746
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
747
    public enum ST_RestartNumber
748
    {
749

750
    
751
        continuous,
752

753
    
754
        eachSect,
755

756
    
757
        eachPage,
758
    }
759
    [Serializable]
760

761
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
762
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
763
    public class CT_NumPr
764
    {
765

766
        private CT_DecimalNumber ilvlField;
767

768
        private CT_DecimalNumber numIdField;
769

770
        private CT_TrackChangeNumbering numberingChangeField;
771

772
        private CT_TrackChange insField;
773

774
        public CT_NumPr()
775
        {
776
            //this.insField = new CT_TrackChange();
777
            //this.numberingChangeField = new CT_TrackChangeNumbering();
778
            //this.numIdField = new CT_DecimalNumber();
779
            //this.ilvlField = new CT_DecimalNumber();
780
        }
781
        public static CT_NumPr Parse(XmlNode node, XmlNamespaceManager namespaceManager)
782
        {
783
            if (node == null)
784
                return null;
785
            CT_NumPr ctObj = new CT_NumPr();
786
            foreach (XmlNode childNode in node.ChildNodes)
787
            {
788
                if (childNode.LocalName == "ilvl")
789
                    ctObj.ilvl = CT_DecimalNumber.Parse(childNode, namespaceManager);
790
                else if (childNode.LocalName == "numId")
791
                    ctObj.numId = CT_DecimalNumber.Parse(childNode, namespaceManager);
792
                else if (childNode.LocalName == "numberingChange")
793
                    ctObj.numberingChange = CT_TrackChangeNumbering.Parse(childNode, namespaceManager);
794
                else if (childNode.LocalName == "ins")
795
                    ctObj.ins = CT_TrackChange.Parse(childNode, namespaceManager);
796
            }
797
            return ctObj;
798
        }
799

800

801

802
        internal void Write(StreamWriter sw, string nodeName)
803
        {
804
            sw.Write(string.Format("<w:{0}", nodeName));
805
            sw.Write(">");
806
            if (this.ilvl != null)
807
                this.ilvl.Write(sw, "ilvl");
808
            if (this.numId != null)
809
                this.numId.Write(sw, "numId");
810
            if (this.numberingChange != null)
811
                this.numberingChange.Write(sw, "numberingChange");
812
            if (this.ins != null)
813
                this.ins.Write(sw, "ins");
814
            sw.WriteEndW(nodeName);
815
        }
816

817
        public CT_DecimalNumber AddNewIlvl()
818
        {
819
            this.ilvlField = new CT_DecimalNumber();
820
            return this.ilvlField;
821
        }
822

823
        [XmlElement(Order = 0)]
824
        public CT_DecimalNumber ilvl
825
        {
826
            get
827
            {
828
                return this.ilvlField;
829
            }
830
            set
831
            {
832
                this.ilvlField = value;
833
            }
834
        }
835

836
        [XmlElement(Order = 1)]
837
        public CT_DecimalNumber numId
838
        {
839
            get
840
            {
841
                return this.numIdField;
842
            }
843
            set
844
            {
845
                this.numIdField = value;
846
            }
847
        }
848

849
        [XmlElement(Order = 2)]
850
        public CT_TrackChangeNumbering numberingChange
851
        {
852
            get
853
            {
854
                return this.numberingChangeField;
855
            }
856
            set
857
            {
858
                this.numberingChangeField = value;
859
            }
860
        }
861

862
        [XmlElement(Order = 3)]
863
        public CT_TrackChange ins
864
        {
865
            get
866
            {
867
                return this.insField;
868
            }
869
            set
870
            {
871
                this.insField = value;
872
            }
873
        }
874

875
        public CT_DecimalNumber AddNewNumId()
876
        {
877
            this.numId = new CT_DecimalNumber();
878
            return this.numId;
879
        }
880
    }
881

882

883
    [Serializable]
884

885
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
886
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
887
    public class CT_Sym
888
    {
889

890
        private string fontField;
891

892
        private byte[] charField;
893
        public static CT_Sym Parse(XmlNode node, XmlNamespaceManager namespaceManager)
894
        {
895
            if (node == null)
896
                return null;
897
            CT_Sym ctObj = new CT_Sym();
898
            ctObj.font = XmlHelper.ReadString(node.Attributes["w:font"]);
899
            ctObj.@char = XmlHelper.ReadBytes(node.Attributes["w:char"]);
900
            return ctObj;
901
        }
902

903

904

905
        internal void Write(StreamWriter sw, string nodeName)
906
        {
907
            sw.Write(string.Format("<w:{0}", nodeName));
908
            XmlHelper.WriteAttribute(sw, "w:font", this.font);
909
            XmlHelper.WriteAttribute(sw, "w:char", this.@char);
910
            sw.Write(">");
911
            sw.WriteEndW(nodeName);
912
        }
913

914
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
915
        public string font
916
        {
917
            get
918
            {
919
                return this.fontField;
920
            }
921
            set
922
            {
923
                this.fontField = value;
924
            }
925
        }
926

927
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "hexBinary")]
928
        public byte[] @char
929
        {
930
            get
931
            {
932
                return this.charField;
933
            }
934
            set
935
            {
936
                this.charField = value;
937
            }
938
        }
939
    }
940

941
    [Serializable]
942

943
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
944
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
945
    public class CT_AbstractNum
946
    {
947

948
        private CT_LongHexNumber nsidField;
949

950
        private CT_MultiLevelType multiLevelTypeField;
951

952
        private CT_LongHexNumber tmplField;
953

954
        private CT_String nameField;
955

956
        private CT_String styleLinkField;
957

958
        private CT_String numStyleLinkField;
959

960
        private List<CT_Lvl> lvlField;
961

962
        private string abstractNumIdField;
963

964
        public CT_AbstractNum()
965
        {
966
            //this.lvlField = new List<CT_Lvl>();
967
            //this.numStyleLinkField = new CT_String();
968
            //this.styleLinkField = new CT_String();
969
            //this.nameField = new CT_String();
970
            //this.tmplField = new CT_LongHexNumber();
971
            this.multiLevelTypeField = new CT_MultiLevelType();
972
            this.nsidField = new CT_LongHexNumber();
973
            this.nsidField.val = new byte[4];
974
            Array.Copy(BitConverter.GetBytes(DateTime.Now.Ticks), 0, this.nsidField.val, 0, 4);
975
        }
976

977
        [XmlElement(Order = 0)]
978
        public CT_LongHexNumber nsid
979
        {
980
            get
981
            {
982
                return this.nsidField;
983
            }
984
            set
985
            {
986
                this.nsidField = value;
987
            }
988
        }
989

990
        [XmlElement(Order = 1)]
991
        public CT_MultiLevelType multiLevelType
992
        {
993
            get
994
            {
995
                return this.multiLevelTypeField;
996
            }
997
            set
998
            {
999
                this.multiLevelTypeField = value;
1000
            }
1001
        }
1002

1003
        [XmlElement(Order = 2)]
1004
        public CT_LongHexNumber tmpl
1005
        {
1006
            get
1007
            {
1008
                return this.tmplField;
1009
            }
1010
            set
1011
            {
1012
                this.tmplField = value;
1013
            }
1014
        }
1015

1016
        [XmlElement(Order = 3)]
1017
        public CT_String name
1018
        {
1019
            get
1020
            {
1021
                return this.nameField;
1022
            }
1023
            set
1024
            {
1025
                this.nameField = value;
1026
            }
1027
        }
1028

1029
        [XmlElement(Order = 4)]
1030
        public CT_String styleLink
1031
        {
1032
            get
1033
            {
1034
                return this.styleLinkField;
1035
            }
1036
            set
1037
            {
1038
                this.styleLinkField = value;
1039
            }
1040
        }
1041

1042
        [XmlElement(Order = 5)]
1043
        public CT_String numStyleLink
1044
        {
1045
            get
1046
            {
1047
                return this.numStyleLinkField;
1048
            }
1049
            set
1050
            {
1051
                this.numStyleLinkField = value;
1052
            }
1053
        }
1054

1055
        [XmlElement("lvl", Order = 6)]
1056
        public List<CT_Lvl> lvl
1057
        {
1058
            get
1059
            {
1060
                return this.lvlField;
1061
            }
1062
            set
1063
            {
1064
                 this.lvlField = value;
1065
            }
1066
        }
1067

1068
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
1069
        public string abstractNumId
1070
        {
1071
            get
1072
            {
1073
                return this.abstractNumIdField;
1074
            }
1075
            set
1076
            {
1077
                this.abstractNumIdField = value;
1078
            }
1079
        }
1080

1081
        public CT_AbstractNum Copy()
1082
        {
1083
            CT_AbstractNum anum = new CT_AbstractNum();
1084
            anum.abstractNumIdField = this.abstractNumIdField;
1085
            anum.lvlField = new List<CT_Lvl>(this.lvlField);
1086
            anum.multiLevelTypeField = this.multiLevelTypeField;
1087
            anum.nameField = this.nameField;
1088
            anum.nsidField = this.nsidField;
1089
            anum.numStyleLinkField = this.numStyleLinkField;
1090
            anum.styleLinkField = this.styleLinkField;
1091
            anum.tmplField = this.tmplField;
1092
            return anum;
1093
        }
1094

1095
        public bool ValueEquals(CT_AbstractNum cT_AbstractNum)
1096
        {
1097
            return this.abstractNumIdField == cT_AbstractNum.abstractNumIdField;
1098
        }
1099

1100
        public void Set(CT_AbstractNum cT_AbstractNum)
1101
        {
1102
            this.abstractNumIdField = cT_AbstractNum.abstractNumIdField;
1103
            this.lvlField = new List<CT_Lvl>(cT_AbstractNum.lvlField);
1104
            this.multiLevelTypeField = cT_AbstractNum.multiLevelTypeField;
1105
            this.nameField = cT_AbstractNum.nameField;
1106
            this.nsidField = cT_AbstractNum.nsidField;
1107
            this.numStyleLinkField = cT_AbstractNum.numStyleLinkField;
1108
            this.styleLinkField = cT_AbstractNum.styleLinkField;
1109
            this.tmplField = cT_AbstractNum.tmplField;
1110
        }
1111

1112
        public static CT_AbstractNum Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1113
        {
1114
            if (node == null)
1115
                return null;
1116
            CT_AbstractNum ctObj = new CT_AbstractNum();
1117
            ctObj.abstractNumId = XmlHelper.ReadString(node.Attributes["w:abstractNumId"]);
1118
            ctObj.lvl = new List<CT_Lvl>();
1119
            foreach (XmlNode childNode in node.ChildNodes)
1120
            {
1121
                if (childNode.LocalName == "nsid")
1122
                    ctObj.nsid = CT_LongHexNumber.Parse(childNode, namespaceManager);
1123
                else if (childNode.LocalName == "multiLevelType")
1124
                    ctObj.multiLevelType = CT_MultiLevelType.Parse(childNode, namespaceManager);
1125
                else if (childNode.LocalName == "tmpl")
1126
                    ctObj.tmpl = CT_LongHexNumber.Parse(childNode, namespaceManager);
1127
                else if (childNode.LocalName == "name")
1128
                    ctObj.name = CT_String.Parse(childNode, namespaceManager);
1129
                else if (childNode.LocalName == "styleLink")
1130
                    ctObj.styleLink = CT_String.Parse(childNode, namespaceManager);
1131
                else if (childNode.LocalName == "numStyleLink")
1132
                    ctObj.numStyleLink = CT_String.Parse(childNode, namespaceManager);
1133
                else if (childNode.LocalName == "lvl")
1134
                    ctObj.lvl.Add(CT_Lvl.Parse(childNode, namespaceManager));
1135
            }
1136
            return ctObj;
1137
        }
1138

1139
        internal void Write(StreamWriter sw, string nodeName)
1140
        {
1141
            sw.Write(string.Format("<w:{0}", nodeName));
1142
            XmlHelper.WriteAttribute(sw, "w:abstractNumId", this.abstractNumId);
1143
            sw.Write(">");
1144
            if (this.nsid != null)
1145
                this.nsid.Write(sw, "nsid");
1146
            if (this.multiLevelType != null)
1147
                this.multiLevelType.Write(sw, "multiLevelType");
1148
            if (this.tmpl != null)
1149
                this.tmpl.Write(sw, "tmpl");
1150
            if (this.name != null)
1151
                this.name.Write(sw, "name");
1152
            if (this.styleLink != null)
1153
                this.styleLink.Write(sw, "styleLink");
1154
            if (this.numStyleLink != null)
1155
                this.numStyleLink.Write(sw, "numStyleLink");
1156
            if (this.lvl != null)
1157
            {
1158
                foreach (CT_Lvl x in this.lvl)
1159
                {
1160
                    x.Write(sw, "lvl");
1161
                }
1162
            }
1163
            sw.WriteEndW(nodeName);
1164
        }
1165

1166
        public CT_Lvl AddNewLvl()
1167
        {
1168
            if (this.lvl == null)
1169
                this.lvlField = new List<CT_Lvl>();
1170
            CT_Lvl lvl = new CT_Lvl();
1171
            this.lvlField.Add(lvl);
1172
            return lvl;
1173
        }
1174

1175

1176
        public int SizeOfLvlArray()
1177
        {
1178
            return this.lvlField == null ? 0 : this.lvlField.Count;
1179
        }
1180

1181
        public CT_Lvl GetLvlArray(int i)
1182
        {
1183
            return this.lvlField == null ? null : this.lvlField[i];
1184
        }
1185
    }
1186

1187

1188
    [Serializable]
1189

1190
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1191
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1192
    public class CT_MultiLevelType
1193
    {
1194
        public static CT_MultiLevelType Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1195
        {
1196
            if (node == null)
1197
                return null;
1198
            CT_MultiLevelType ctObj = new CT_MultiLevelType();
1199
            if (node.Attributes["w:val"] != null)
1200
                ctObj.val = (ST_MultiLevelType)Enum.Parse(typeof(ST_MultiLevelType), node.Attributes["w:val"].Value);
1201
            return ctObj;
1202
        }
1203

1204

1205

1206
        internal void Write(StreamWriter sw, string nodeName)
1207
        {
1208
            sw.Write(string.Format("<w:{0}", nodeName));
1209
            XmlHelper.WriteAttribute(sw, "w:val", this.val.ToString());
1210
            sw.Write("/>");
1211
        }
1212

1213
        private ST_MultiLevelType valField;
1214

1215
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1216
        public ST_MultiLevelType val
1217
        {
1218
            get
1219
            {
1220
                return this.valField;
1221
            }
1222
            set
1223
            {
1224
                this.valField = value;
1225
            }
1226
        }
1227
    }
1228

1229

1230
    [Serializable]
1231
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1232
    public enum ST_MultiLevelType
1233
    {
1234

1235
    
1236
        singleLevel,
1237

1238
    
1239
        multilevel,
1240

1241
    
1242
        hybridMultilevel,
1243
    }
1244

1245

1246
    [Serializable]
1247

1248
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1249
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1250
    public class CT_Lvl
1251
    {
1252

1253
        private CT_DecimalNumber startField;
1254

1255
        private CT_NumFmt numFmtField;
1256

1257
        private CT_DecimalNumber lvlRestartField;
1258

1259
        private CT_String pStyleField;
1260

1261
        private CT_OnOff isLglField;
1262

1263
        private CT_LevelSuffix suffField;
1264

1265
        private CT_LevelText lvlTextField;
1266

1267
        private CT_DecimalNumber lvlPicBulletIdField;
1268

1269
        private CT_LvlLegacy legacyField;
1270

1271
        private CT_Jc lvlJcField;
1272

1273
        private CT_PPr pPrField;
1274

1275
        private CT_RPr rPrField;
1276

1277
        private string ilvlField;
1278

1279
        private byte[] tplcField;
1280

1281
        private ST_OnOff tentativeField;
1282

1283
        private bool tentativeFieldSpecified;
1284

1285
        public CT_Lvl()
1286
        {
1287
            this.rPrField = new CT_RPr();
1288
            this.pPrField = new CT_PPr();
1289
            this.lvlJcField = new CT_Jc();
1290
            //this.legacyField = new CT_LvlLegacy();
1291
            //this.lvlPicBulletIdField = new CT_DecimalNumber();
1292
            this.lvlTextField = new CT_LevelText();
1293
            //this.suffField = new CT_LevelSuffix();
1294
            //this.isLglField = new CT_OnOff();
1295
            //this.pStyleField = new CT_String();
1296
            //this.lvlRestartField = new CT_DecimalNumber();
1297
            this.numFmtField = new CT_NumFmt();
1298
            this.startField = new CT_DecimalNumber();
1299
            this.tentativeField = ST_OnOff.off;
1300
        }
1301
        public static CT_Lvl Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1302
        {
1303
            if (node == null)
1304
                return null;
1305
            CT_Lvl ctObj = new CT_Lvl();
1306
            ctObj.ilvl = XmlHelper.ReadString(node.Attributes["w:ilvl"]);
1307
            ctObj.tplc = XmlHelper.ReadBytes(node.Attributes["w:tplc"]);
1308
            if (node.Attributes["w:tentative"] != null)
1309
            {
1310
                ctObj.tentative = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:tentative"].Value, true);
1311
                ctObj.tentativeSpecified = true;
1312
            }
1313
            foreach (XmlNode childNode in node.ChildNodes)
1314
            {
1315
                if (childNode.LocalName == "start")
1316
                    ctObj.start = CT_DecimalNumber.Parse(childNode, namespaceManager);
1317
                else if (childNode.LocalName == "numFmt")
1318
                    ctObj.numFmt = CT_NumFmt.Parse(childNode, namespaceManager);
1319
                else if (childNode.LocalName == "lvlRestart")
1320
                    ctObj.lvlRestart = CT_DecimalNumber.Parse(childNode, namespaceManager);
1321
                else if (childNode.LocalName == "pStyle")
1322
                    ctObj.pStyle = CT_String.Parse(childNode, namespaceManager);
1323
                else if (childNode.LocalName == "isLgl")
1324
                    ctObj.isLgl = CT_OnOff.Parse(childNode, namespaceManager);
1325
                else if (childNode.LocalName == "suff")
1326
                    ctObj.suff = CT_LevelSuffix.Parse(childNode, namespaceManager);
1327
                else if (childNode.LocalName == "lvlText")
1328
                    ctObj.lvlText = CT_LevelText.Parse(childNode, namespaceManager);
1329
                else if (childNode.LocalName == "lvlPicBulletId")
1330
                    ctObj.lvlPicBulletId = CT_DecimalNumber.Parse(childNode, namespaceManager);
1331
                else if (childNode.LocalName == "legacy")
1332
                    ctObj.legacy = CT_LvlLegacy.Parse(childNode, namespaceManager);
1333
                else if (childNode.LocalName == "lvlJc")
1334
                    ctObj.lvlJc = CT_Jc.Parse(childNode, namespaceManager);
1335
                else if (childNode.LocalName == "pPr")
1336
                    ctObj.pPr = CT_PPr.Parse(childNode, namespaceManager);
1337
                else if (childNode.LocalName == "rPr")
1338
                    ctObj.rPr = CT_RPr.Parse(childNode, namespaceManager);
1339
            }
1340
            return ctObj;
1341
        }
1342

1343

1344

1345
        internal void Write(StreamWriter sw, string nodeName)
1346
        {
1347
            sw.Write(string.Format("<w:{0}", nodeName));
1348
            XmlHelper.WriteAttribute(sw, "w:ilvl", this.ilvl);
1349
            XmlHelper.WriteAttribute(sw, "w:tplc", this.tplc);
1350
            if(this.tentative!= ST_OnOff.off|| this.tentativeFieldSpecified)
1351
                XmlHelper.WriteAttribute(sw, "w:tentative", this.tentative.ToString());
1352
            sw.Write(">");
1353
            if (this.start != null)
1354
                this.start.Write(sw, "start");
1355
            if (this.numFmt != null)
1356
                this.numFmt.Write(sw, "numFmt");
1357
            if (this.lvlRestart != null)
1358
                this.lvlRestart.Write(sw, "lvlRestart");
1359
            if (this.pStyle != null)
1360
                this.pStyle.Write(sw, "pStyle");
1361
            if (this.isLgl != null)
1362
                this.isLgl.Write(sw, "isLgl");
1363
            if (this.suff != null)
1364
                this.suff.Write(sw, "suff");
1365
            if (this.lvlText != null)
1366
                this.lvlText.Write(sw, "lvlText");
1367
            if (this.lvlPicBulletId != null)
1368
                this.lvlPicBulletId.Write(sw, "lvlPicBulletId");
1369
            if (this.legacy != null)
1370
                this.legacy.Write(sw, "legacy");
1371
            if (this.lvlJc != null)
1372
                this.lvlJc.Write(sw, "lvlJc");
1373
            if (this.pPr != null)
1374
                this.pPr.Write(sw, "pPr");
1375
            if (this.rPr != null)
1376
                this.rPr.Write(sw, "rPr");
1377
            sw.WriteEndW(nodeName);
1378
        }
1379

1380

1381

1382
        [XmlElement(Order = 0)]
1383
        public CT_DecimalNumber start
1384
        {
1385
            get
1386
            {
1387
                return this.startField;
1388
            }
1389
            set
1390
            {
1391
                this.startField = value;
1392
            }
1393
        }
1394

1395
        [XmlElement(Order = 1)]
1396
        public CT_NumFmt numFmt
1397
        {
1398
            get
1399
            {
1400
                return this.numFmtField;
1401
            }
1402
            set
1403
            {
1404
                this.numFmtField = value;
1405
            }
1406
        }
1407

1408
        [XmlElement(Order = 2)]
1409
        public CT_DecimalNumber lvlRestart
1410
        {
1411
            get
1412
            {
1413
                return this.lvlRestartField;
1414
            }
1415
            set
1416
            {
1417
                this.lvlRestartField = value;
1418
            }
1419
        }
1420

1421
        [XmlElement(Order = 3)]
1422
        public CT_String pStyle
1423
        {
1424
            get
1425
            {
1426
                return this.pStyleField;
1427
            }
1428
            set
1429
            {
1430
                this.pStyleField = value;
1431
            }
1432
        }
1433

1434
        [XmlElement(Order = 4)]
1435
        public CT_OnOff isLgl
1436
        {
1437
            get
1438
            {
1439
                return this.isLglField;
1440
            }
1441
            set
1442
            {
1443
                this.isLglField = value;
1444
            }
1445
        }
1446

1447
        [XmlElement(Order = 5)]
1448
        public CT_LevelSuffix suff
1449
        {
1450
            get
1451
            {
1452
                return this.suffField;
1453
            }
1454
            set
1455
            {
1456
                this.suffField = value;
1457
            }
1458
        }
1459

1460
        [XmlElement(Order = 6)]
1461
        public CT_LevelText lvlText
1462
        {
1463
            get
1464
            {
1465
                return this.lvlTextField;
1466
            }
1467
            set
1468
            {
1469
                this.lvlTextField = value;
1470
            }
1471
        }
1472

1473
        [XmlElement(Order = 7)]
1474
        public CT_DecimalNumber lvlPicBulletId
1475
        {
1476
            get
1477
            {
1478
                return this.lvlPicBulletIdField;
1479
            }
1480
            set
1481
            {
1482
                this.lvlPicBulletIdField = value;
1483
            }
1484
        }
1485

1486
        [XmlElement(Order = 8)]
1487
        public CT_LvlLegacy legacy
1488
        {
1489
            get
1490
            {
1491
                return this.legacyField;
1492
            }
1493
            set
1494
            {
1495
                this.legacyField = value;
1496
            }
1497
        }
1498

1499
        [XmlElement(Order = 9)]
1500
        public CT_Jc lvlJc
1501
        {
1502
            get
1503
            {
1504
                return this.lvlJcField;
1505
            }
1506
            set
1507
            {
1508
                this.lvlJcField = value;
1509
            }
1510
        }
1511

1512
        [XmlElement(Order = 10)]
1513
        public CT_PPr pPr
1514
        {
1515
            get
1516
            {
1517
                return this.pPrField;
1518
            }
1519
            set
1520
            {
1521
                this.pPrField = value;
1522
            }
1523
        }
1524

1525
        [XmlElement(Order = 11)]
1526
        public CT_RPr rPr
1527
        {
1528
            get
1529
            {
1530
                return this.rPrField;
1531
            }
1532
            set
1533
            {
1534
                this.rPrField = value;
1535
            }
1536
        }
1537

1538
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
1539
        public string ilvl
1540
        {
1541
            get
1542
            {
1543
                return this.ilvlField;
1544
            }
1545
            set
1546
            {
1547
                this.ilvlField = value;
1548
            }
1549
        }
1550

1551
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "hexBinary")]
1552
        public byte[] tplc
1553
        {
1554
            get
1555
            {
1556
                return this.tplcField;
1557
            }
1558
            set
1559
            {
1560
                this.tplcField = value;
1561
            }
1562
        }
1563

1564
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1565
        public ST_OnOff tentative
1566
        {
1567
            get
1568
            {
1569
                return this.tentativeField;
1570
            }
1571
            set
1572
            {
1573
                this.tentativeField = value;
1574
                this.tentativeFieldSpecified = true;
1575
            }
1576
        }
1577

1578
        [XmlIgnore]
1579
        public bool tentativeSpecified
1580
        {
1581
            get
1582
            {
1583
                return this.tentativeFieldSpecified;
1584
            }
1585
            set
1586
            {
1587
                this.tentativeFieldSpecified = value;
1588
            }
1589
        }
1590

1591
        public CT_NumFmt AddNewNumFmt()
1592
        {
1593
            this.numFmtField = new CT_NumFmt();
1594
            return this.numFmtField;
1595
        }
1596

1597
        public CT_LevelText AddNewLvlText()
1598
        {
1599
            this.lvlText = new CT_LevelText();
1600
            return this.lvlText;
1601
        }
1602
    }
1603

1604

1605
    [Serializable]
1606

1607
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1608
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1609
    public class CT_LevelSuffix
1610
    {
1611
        public static CT_LevelSuffix Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1612
        {
1613
            if (node == null)
1614
                return null;
1615
            CT_LevelSuffix ctObj = new CT_LevelSuffix();
1616
            if (node.Attributes["w:val"] != null)
1617
                ctObj.val = (ST_LevelSuffix)Enum.Parse(typeof(ST_LevelSuffix), node.Attributes["w:val"].Value);
1618
            return ctObj;
1619
        }
1620

1621

1622

1623
        internal void Write(StreamWriter sw, string nodeName)
1624
        {
1625
            sw.Write(string.Format("<w:{0}", nodeName));
1626
            XmlHelper.WriteAttribute(sw, "w:val", this.val.ToString());
1627
            sw.Write("/>");
1628
        }
1629

1630
        private ST_LevelSuffix valField;
1631

1632
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1633
        public ST_LevelSuffix val
1634
        {
1635
            get
1636
            {
1637
                return this.valField;
1638
            }
1639
            set
1640
            {
1641
                this.valField = value;
1642
            }
1643
        }
1644
    }
1645

1646

1647
    [Serializable]
1648
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1649
    public enum ST_LevelSuffix
1650
    {
1651
        tab,
1652
        space,
1653
        nothing,
1654
    }
1655

1656

1657
    [Serializable]
1658

1659
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1660
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1661
    public class CT_LevelText
1662
    {
1663

1664
        private string valField;
1665

1666
        private ST_OnOff nullField= ST_OnOff.off;
1667

1668
        private bool nullFieldSpecified;
1669

1670
        public static CT_LevelText Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1671
        {
1672
            if(node==null)
1673
                return null;
1674
            CT_LevelText ctObj = new CT_LevelText();
1675
            ctObj.val = XmlHelper.ReadString(node.Attributes["w:val"]);
1676
            if (node.Attributes["w:null"]!=null)
1677
                ctObj.@null = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:null"].Value,true);
1678
            return ctObj;
1679
        }
1680

1681

1682

1683
        internal void Write(StreamWriter sw, string nodeName)
1684
        {
1685
            sw.Write(string.Format("<w:{0}", nodeName));
1686
            XmlHelper.WriteAttribute(sw, "w:val", this.val);
1687
            if(this.@null!= ST_OnOff.off)
1688
                XmlHelper.WriteAttribute(sw, "w:null", this.@null.ToString());
1689
            sw.Write("/>");
1690
        }
1691

1692

1693
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1694
        public string val
1695
        {
1696
            get
1697
            {
1698
                return this.valField;
1699
            }
1700
            set
1701
            {
1702
                this.valField = value;
1703
            }
1704
        }
1705

1706
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1707
        public ST_OnOff @null
1708
        {
1709
            get
1710
            {
1711
                return this.nullField;
1712
            }
1713
            set
1714
            {
1715
                this.nullField = value;
1716
            }
1717
        }
1718

1719
        [XmlIgnore]
1720
        public bool nullSpecified
1721
        {
1722
            get
1723
            {
1724
                return this.nullFieldSpecified;
1725
            }
1726
            set
1727
            {
1728
                this.nullFieldSpecified = value;
1729
            }
1730
        }
1731
    }
1732

1733

1734
    [Serializable]
1735

1736
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1737
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1738
    public class CT_LvlLegacy
1739
    {
1740

1741
        private ST_OnOff legacyField;
1742

1743
        private bool legacyFieldSpecified;
1744

1745
        private ulong legacySpaceField;
1746

1747
        private bool legacySpaceFieldSpecified;
1748

1749
        private string legacyIndentField;
1750

1751
        public static CT_LvlLegacy Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1752
        {
1753
            if (node == null)
1754
                return null;
1755
            CT_LvlLegacy ctObj = new CT_LvlLegacy();
1756
            if (node.Attributes["w:legacy"] != null)
1757
                ctObj.legacy = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:legacy"].Value,true);
1758
            ctObj.legacySpace = XmlHelper.ReadULong(node.Attributes["w:legacySpace"]);
1759
            ctObj.legacyIndent = XmlHelper.ReadString(node.Attributes["w:legacyIndent"]);
1760
            return ctObj;
1761
        }
1762

1763
        internal void Write(StreamWriter sw, string nodeName)
1764
        {
1765
            sw.Write(string.Format("<w:{0}", nodeName));
1766
            XmlHelper.WriteAttribute(sw, "w:legacy", this.legacy.ToString());
1767
            XmlHelper.WriteAttribute(sw, "w:legacySpace", this.legacySpace);
1768
            XmlHelper.WriteAttribute(sw, "w:legacyIndent", this.legacyIndent);
1769
            sw.Write(">");
1770
            sw.WriteEndW(nodeName);
1771
        }
1772

1773

1774
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1775
        public ST_OnOff legacy
1776
        {
1777
            get
1778
            {
1779
                return this.legacyField;
1780
            }
1781
            set
1782
            {
1783
                this.legacyField = value;
1784
            }
1785
        }
1786

1787
        [XmlIgnore]
1788
        public bool legacySpecified
1789
        {
1790
            get
1791
            {
1792
                return this.legacyFieldSpecified;
1793
            }
1794
            set
1795
            {
1796
                this.legacyFieldSpecified = value;
1797
            }
1798
        }
1799

1800
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1801
        public ulong legacySpace
1802
        {
1803
            get
1804
            {
1805
                return this.legacySpaceField;
1806
            }
1807
            set
1808
            {
1809
                this.legacySpaceField = value;
1810
            }
1811
        }
1812

1813
        [XmlIgnore]
1814
        public bool legacySpaceSpecified
1815
        {
1816
            get
1817
            {
1818
                return this.legacySpaceFieldSpecified;
1819
            }
1820
            set
1821
            {
1822
                this.legacySpaceFieldSpecified = value;
1823
            }
1824
        }
1825

1826
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
1827
        public string legacyIndent
1828
        {
1829
            get
1830
            {
1831
                return this.legacyIndentField;
1832
            }
1833
            set
1834
            {
1835
                this.legacyIndentField = value;
1836
            }
1837
        }
1838
    }
1839

1840

1841
    [Serializable]
1842

1843
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
1844
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
1845
    public class CT_LsdException
1846
    {
1847

1848
        private string nameField;
1849

1850
        private ST_OnOff lockedField;
1851

1852
        private bool lockedFieldSpecified;
1853

1854
        private string uiPriorityField;
1855

1856
        private ST_OnOff semiHiddenField;
1857

1858
        private bool semiHiddenFieldSpecified;
1859

1860
        private ST_OnOff unhideWhenUsedField;
1861

1862
        private bool unhideWhenUsedFieldSpecified;
1863

1864
        private ST_OnOff qFormatField;
1865

1866
        private bool qFormatFieldSpecified;
1867
        public CT_LsdException()
1868
        {
1869
            semiHidden = ST_OnOff.off;
1870
            unhideWhenUsed = ST_OnOff.off;
1871
            locked = ST_OnOff.off;
1872
        }
1873

1874
        public static CT_LsdException Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1875
        {
1876
            if (node == null)
1877
                return null;
1878
            CT_LsdException ctObj = new CT_LsdException();
1879
            ctObj.name = XmlHelper.ReadString(node.Attributes["w:name"]);
1880
            if (node.Attributes["w:locked"] != null)
1881
                ctObj.locked = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:locked"].Value,true);
1882
            ctObj.uiPriority = XmlHelper.ReadString(node.Attributes["w:uiPriority"]);
1883
            if (node.Attributes["w:semiHidden"] != null)
1884
                ctObj.semiHidden = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:semiHidden"].Value,true);
1885
            if (node.Attributes["w:unhideWhenUsed"] != null)
1886
                ctObj.unhideWhenUsed = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:unhideWhenUsed"].Value,true);
1887
            if (node.Attributes["w:qFormat"] != null)
1888
                ctObj.qFormat = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:qFormat"].Value,true);
1889
            return ctObj;
1890
        }
1891

1892

1893

1894
        internal void Write(StreamWriter sw, string nodeName)
1895
        {
1896
            sw.Write(string.Format("<w:{0}", nodeName));
1897
            XmlHelper.WriteAttribute(sw, "w:name", this.name);
1898
            if (locked != ST_OnOff.off)
1899
                XmlHelper.WriteAttribute(sw, "w:locked", this.locked.ToString());
1900
            if(this.semiHidden== ST_OnOff.on)
1901
                XmlHelper.WriteAttribute(sw, "w:semiHidden", "1");
1902
            XmlHelper.WriteAttribute(sw, "w:uiPriority", this.uiPriority);
1903
            if (this.unhideWhenUsed == ST_OnOff.on)
1904
                XmlHelper.WriteAttribute(sw, "w:unhideWhenUsed", "1");
1905
            if (qFormat != ST_OnOff.off)
1906
                XmlHelper.WriteAttribute(sw, "w:qFormat", "1");
1907
            sw.Write("/>");
1908
        }
1909

1910
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1911
        public string name
1912
        {
1913
            get
1914
            {
1915
                return this.nameField;
1916
            }
1917
            set
1918
            {
1919
                this.nameField = value;
1920
            }
1921
        }
1922

1923
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1924
        public ST_OnOff locked
1925
        {
1926
            get
1927
            {
1928
                return this.lockedField;
1929
            }
1930
            set
1931
            {
1932
                this.lockedField = value;
1933
            }
1934
        }
1935

1936
        [XmlIgnore]
1937
        public bool lockedSpecified
1938
        {
1939
            get
1940
            {
1941
                return this.lockedFieldSpecified;
1942
            }
1943
            set
1944
            {
1945
                this.lockedFieldSpecified = value;
1946
            }
1947
        }
1948

1949
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, DataType = "integer")]
1950
        public string uiPriority
1951
        {
1952
            get
1953
            {
1954
                return this.uiPriorityField;
1955
            }
1956
            set
1957
            {
1958
                this.uiPriorityField = value;
1959
            }
1960
        }
1961

1962
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1963
        public ST_OnOff semiHidden
1964
        {
1965
            get
1966
            {
1967
                return this.semiHiddenField;
1968
            }
1969
            set
1970
            {
1971
                this.semiHiddenField = value;
1972
            }
1973
        }
1974

1975
        [XmlIgnore]
1976
        public bool semiHiddenSpecified
1977
        {
1978
            get
1979
            {
1980
                return this.semiHiddenFieldSpecified;
1981
            }
1982
            set
1983
            {
1984
                this.semiHiddenFieldSpecified = value;
1985
            }
1986
        }
1987

1988
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
1989
        public ST_OnOff unhideWhenUsed
1990
        {
1991
            get
1992
            {
1993
                return this.unhideWhenUsedField;
1994
            }
1995
            set
1996
            {
1997
                this.unhideWhenUsedField = value;
1998
            }
1999
        }
2000

2001
        [XmlIgnore]
2002
        public bool unhideWhenUsedSpecified
2003
        {
2004
            get
2005
            {
2006
                return this.unhideWhenUsedFieldSpecified;
2007
            }
2008
            set
2009
            {
2010
                this.unhideWhenUsedFieldSpecified = value;
2011
            }
2012
        }
2013

2014
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
2015
        public ST_OnOff qFormat
2016
        {
2017
            get
2018
            {
2019
                return this.qFormatField;
2020
            }
2021
            set
2022
            {
2023
                this.qFormatField = value;
2024
            }
2025
        }
2026

2027
        [XmlIgnore]
2028
        public bool qFormatSpecified
2029
        {
2030
            get
2031
            {
2032
                return this.qFormatFieldSpecified;
2033
            }
2034
            set
2035
            {
2036
                this.qFormatFieldSpecified = value;
2037
            }
2038
        }
2039
    }
2040

2041

2042
    [Serializable]
2043

2044
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
2045
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
2046
    public class CT_TrackChangeNumbering : CT_TrackChange
2047
    {
2048
        public static new CT_TrackChangeNumbering Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2049
        {
2050
            if (node == null)
2051
                return null;
2052
            CT_TrackChangeNumbering ctObj = new CT_TrackChangeNumbering();
2053
            ctObj.original = XmlHelper.ReadString(node.Attributes["original"]);
2054
            ctObj.author = XmlHelper.ReadString(node.Attributes["author"]);
2055
            ctObj.date = XmlHelper.ReadString(node.Attributes["date"]);
2056
            ctObj.id = XmlHelper.ReadString(node.Attributes["id"]);
2057
            return ctObj;
2058
        }
2059

2060

2061

2062
        internal new void Write(StreamWriter sw, string nodeName)
2063
        {
2064
            sw.Write(string.Format("<{0}", nodeName));
2065
            XmlHelper.WriteAttribute(sw, "original", this.original);
2066
            XmlHelper.WriteAttribute(sw, "author", this.author);
2067
            XmlHelper.WriteAttribute(sw, "date", this.date);
2068
            XmlHelper.WriteAttribute(sw, "id", this.id);
2069
            sw.Write(">");
2070
            sw.Write(string.Format("</{0}>", nodeName));
2071
        }
2072

2073
        private string originalField;
2074

2075
        [XmlAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)]
2076
        public string original
2077
        {
2078
            get
2079
            {
2080
                return this.originalField;
2081
            }
2082
            set
2083
            {
2084
                this.originalField = value;
2085
            }
2086
        }
2087
    }
2088

2089
}
2090

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.