npoi

Форк
0
/
WordprocessingDrawing.cs 
2239 строк · 58.8 Кб
1
// ------------------------------------------------------------------------------
2
//  <auto-generated>
3
//    Generated by Xsd2Code. Version 3.4.0.38967
4
//    <NameSpace>NPOI.OpenXmlFormats</NameSpace><Collection>List</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><EnableLazyLoading>False</EnableLazyLoading><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>True</EnableSummaryComment><VirtualProp>False</VirtualProp><IncludeSerializeMethod>False</IncludeSerializeMethod><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><CodeBaseTag>Net20</CodeBaseTag><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><GenerateXMLAttributes>True</GenerateXMLAttributes><EnableEncoding>False</EnableEncoding><AutomaticProperties>False</AutomaticProperties><GenerateShouldSerialize>False</GenerateShouldSerialize><DisableDebug>False</DisableDebug><PropNameSpecified>Default</PropNameSpecified><Encoder>UTF8</Encoder><CustomUsings></CustomUsings><ExcludeIncludedTypes>True</ExcludeIncludedTypes><EnableInitializeFields>True</EnableInitializeFields>
5
//  </auto-generated>
6
// ------------------------------------------------------------------------------
7

8
using NPOI.OpenXml4Net.Util;
9
using System;
10
using System.Collections.Generic;
11
using System.ComponentModel;
12
using System.IO;
13
using System.Xml;
14
using System.Xml.Serialization;
15

16
namespace NPOI.OpenXmlFormats.Dml.WordProcessing
17
{
18

19

20
    [Serializable]
21
    [XmlType(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main")]
22
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", IsNullable = true)]
23
    public class CT_Drawing
24
    {
25

26
        public CT_Drawing()
27
        {
28

29
        }
30
        public static CT_Drawing Parse(XmlNode node, XmlNamespaceManager namespaceManager)
31
        {
32
            if (node == null)
33
                return null;
34
            CT_Drawing ctObj = new CT_Drawing();
35
            ctObj.anchor = new List<CT_Anchor>();
36
            ctObj.inline = new List<CT_Inline>();
37
            foreach (XmlNode childNode in node.ChildNodes)
38
            {
39
                if (childNode.LocalName == "anchor")
40
                    ctObj.anchor.Add(CT_Anchor.Parse(childNode, namespaceManager));
41
                else if (childNode.LocalName == "inline")
42
                    ctObj.inline.Add(CT_Inline.Parse(childNode, namespaceManager));
43
            }
44
            return ctObj;
45
        }
46

47

48

49
        internal void Write(StreamWriter sw, string nodeName)
50
        {
51
            sw.Write(string.Format("<w:{0}", nodeName));
52
            sw.Write(">");
53
            if (this.anchor != null)
54
            {
55
                foreach (CT_Anchor x in this.anchor)
56
                {
57
                    x.Write(sw, "anchor");
58
                }
59
            }
60
            if (this.inline != null)
61
            {
62
                foreach (CT_Inline x in this.inline)
63
                {
64
                    x.Write(sw, "inline");
65
                }
66
            }
67
            sw.WriteEndW(nodeName);
68
        }
69

70
        List<CT_Anchor> anchorField;
71
        public List<CT_Anchor> anchor
72
        {
73
            get { return this.anchorField; }
74
            set { this.anchorField = value; }
75
        }
76

77
        List<CT_Inline> inlineField;
78
        public List<CT_Inline> inline
79
        {
80
            get { return this.inlineField; }
81
            set { this.inlineField = value; }
82
        }
83

84

85

86
        public CT_Inline AddNewInline()
87
        {
88
            CT_Inline inlineObj = new CT_Inline();
89
            if (this.inlineField == null)
90
                this.inlineField = new List<CT_Inline>();
91
            this.inlineField.Add(inlineObj);
92
            return inlineObj;
93
        }
94

95
        public List<CT_Anchor> GetAnchorList()
96
        {
97
            return this.anchor;
98
        }
99

100
        public List<CT_Inline> GetInlineList()
101
        {
102
            return this.inline;
103
        }
104

105
        public CT_Inline GetInlineArray(int p)
106
        {
107
            lock (this)
108
            {
109
                return this.inline[p];
110
            }
111
        }
112
    }
113

114

115

116
    [Serializable]
117
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
118
    [XmlRoot("inline", Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = false)]
119
    public class CT_PositiveSize2D
120
    {
121

122
        private long cxField;
123

124
        private long cyField;
125
        public static CT_PositiveSize2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
126
        {
127
            if (node == null)
128
                return null;
129
            CT_PositiveSize2D ctObj = new CT_PositiveSize2D();
130
            ctObj.cx = XmlHelper.ReadLong(node.Attributes["cx"]);
131
            ctObj.cy = XmlHelper.ReadLong(node.Attributes["cy"]);
132
            return ctObj;
133
        }
134

135

136

137
        internal void Write(StreamWriter sw, string nodeName)
138
        {
139
            sw.Write(string.Format("<wp:{0}", nodeName));
140
            XmlHelper.WriteAttribute(sw, "cx", this.cx, true);
141
            XmlHelper.WriteAttribute(sw, "cy", this.cy, true);
142
            sw.Write("/>");
143
        }
144

145
        [XmlAttribute]
146
        public long cx
147
        {
148
            get
149
            {
150
                return this.cxField;
151
            }
152
            set
153
            {
154
                this.cxField = value;
155
            }
156
        }
157
        [XmlAttribute]
158
        public long cy
159
        {
160
            get
161
            {
162
                return this.cyField;
163
            }
164
            set
165
            {
166
                this.cyField = value;
167
            }
168
        }
169
    }
170
    [Serializable]
171
    [System.ComponentModel.DesignerCategoryAttribute("code")]
172
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
173
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
174
    public class CT_NonVisualDrawingProps
175
    {
176
        public static CT_NonVisualDrawingProps Parse(XmlNode node, XmlNamespaceManager namespaceManager)
177
        {
178
            if (node == null)
179
                return null;
180
            CT_NonVisualDrawingProps ctObj = new CT_NonVisualDrawingProps();
181
            ctObj.id = XmlHelper.ReadUInt(node.Attributes["id"]);
182
            ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);
183
            ctObj.descr = XmlHelper.ReadString(node.Attributes["descr"]);
184
            ctObj.hidden = XmlHelper.ReadBool(node.Attributes["hidden"]);
185
            foreach (XmlNode childNode in node.ChildNodes)
186
            {
187
                if (childNode.LocalName == "hlinkClick")
188
                    ctObj.hlinkClick = CT_Hyperlink.Parse(childNode, namespaceManager);
189
                else if (childNode.LocalName == "hlinkHover")
190
                    ctObj.hlinkHover = CT_Hyperlink.Parse(childNode, namespaceManager);
191
                else if (childNode.LocalName == "extLst")
192
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
193
            }
194
            return ctObj;
195
        }
196

197

198

199
        internal void Write(StreamWriter sw, string nodeName)
200
        {
201
            sw.Write(string.Format("<wp:{0}", nodeName));
202
            XmlHelper.WriteAttribute(sw, "id", this.id, true);
203
            XmlHelper.WriteAttribute(sw, "name", this.name);
204
            XmlHelper.WriteAttribute(sw, "descr", this.descr.Replace("\n", "&#xA;").Replace("\r", "&#xD;"));
205
            if(this.hidden)
206
                XmlHelper.WriteAttribute(sw, "hidden", this.hidden);
207
            if (this.hlinkClick == null && this.hlinkHover == null && this.extLst == null)
208
            {
209
                sw.Write("/>");
210
            }
211
            else
212
            {
213
                sw.Write(">");
214
                if (this.hlinkClick != null)
215
                    this.hlinkClick.Write(sw, "hlinkClick");
216
                if (this.hlinkHover != null)
217
                    this.hlinkHover.Write(sw, "hlinkHover");
218
                if (this.extLst != null)
219
                    this.extLst.Write(sw, "extLst");
220
                sw.Write(string.Format("</wp:{0}>", nodeName));
221
            }
222
        }
223

224
        private CT_Hyperlink hlinkClickField = null;
225

226
        private CT_Hyperlink hlinkHoverField = null;
227

228
        private CT_OfficeArtExtensionList extLstField = null;
229

230
        private uint idField;
231

232
        private string nameField = null;
233

234
        private string descrField;
235

236
        private bool? hiddenField = null;
237

238
        [XmlElement(Order = 0)]
239
        public CT_Hyperlink hlinkClick
240
        {
241
            get
242
            {
243
                return this.hlinkClickField;
244
            }
245
            set
246
            {
247
                this.hlinkClickField = value;
248
            }
249
        }
250

251
        [XmlElement(Order = 1)]
252
        public CT_Hyperlink hlinkHover
253
        {
254
            get
255
            {
256
                return this.hlinkHoverField;
257
            }
258
            set
259
            {
260
                this.hlinkHoverField = value;
261
            }
262
        }
263

264
        [XmlElement(Order = 2)]
265
        public CT_OfficeArtExtensionList extLst
266
        {
267
            get
268
            {
269
                return this.extLstField;
270
            }
271
            set
272
            {
273
                this.extLstField = value;
274
            }
275
        }
276

277
        [XmlAttribute]
278
        public uint id
279
        {
280
            get
281
            {
282
                return this.idField;
283
            }
284
            set
285
            {
286
                this.idField = value;
287
            }
288
        }
289

290
        [XmlAttribute]
291
        public string name
292
        {
293
            get
294
            {
295
                return this.nameField;
296
            }
297
            set
298
            {
299
                this.nameField = value;
300
            }
301
        }
302

303
        [XmlAttribute]
304
        [DefaultValue("")]
305
        public string descr
306
        {
307
            get
308
            {
309
                return null == this.descrField ? "" : descrField;
310
            }
311
            set
312
            {
313
                this.descrField = value;
314
            }
315
        }
316
        [XmlIgnore]
317
        public bool descrSpecified
318
        {
319
            get { return (null != descrField); }
320
        }
321
        [XmlAttribute]
322
        [DefaultValue(false)]
323
        public bool hidden
324
        {
325
            get
326
            {
327
                return null == this.hiddenField ? false : (bool)hiddenField;
328
            }
329
            set
330
            {
331
                this.hiddenField = value;
332
            }
333
        }
334

335
        [XmlIgnore]
336
        public bool hiddenSpecified
337
        {
338
            get { return (null != hiddenField); }
339
        }
340
    }
341
    [Serializable]
342
    [System.ComponentModel.DesignerCategoryAttribute("code")]
343
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
344
    [XmlRoot("inline", Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = false)]
345
    public class CT_NonVisualGraphicFrameProperties
346
    {
347

348
        private CT_GraphicalObjectFrameLocking graphicFrameLocksField;
349

350
        private CT_OfficeArtExtensionList extLstField;
351

352
        public CT_NonVisualGraphicFrameProperties()
353
        {
354
        }
355
        public static CT_NonVisualGraphicFrameProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
356
        {
357
            if (node == null)
358
                return null;
359
            CT_NonVisualGraphicFrameProperties ctObj = new CT_NonVisualGraphicFrameProperties();
360
            foreach (XmlNode childNode in node.ChildNodes)
361
            {
362
                if (childNode.LocalName == "graphicFrameLocks")
363
                    ctObj.graphicFrameLocks = CT_GraphicalObjectFrameLocking.Parse(childNode, namespaceManager);
364
                else if (childNode.LocalName == "extLst")
365
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
366
            }
367
            return ctObj;
368
        }
369

370

371

372
        internal void Write(StreamWriter sw, string nodeName)
373
        {
374
            sw.Write(string.Format("<wp:{0}", nodeName));
375
            sw.Write(">");
376
            if (this.graphicFrameLocks != null)
377
                this.graphicFrameLocks.Write(sw, "graphicFrameLocks");
378
            if (this.extLst != null)
379
                this.extLst.Write(sw, "extLst");
380
            sw.Write(string.Format("</wp:{0}>", nodeName));
381
        }
382

383
        [XmlElement(Order = 0)]
384
        public CT_GraphicalObjectFrameLocking graphicFrameLocks
385
        {
386
            get
387
            {
388
                return this.graphicFrameLocksField;
389
            }
390
            set
391
            {
392
                this.graphicFrameLocksField = value;
393
            }
394
        }
395

396
        [XmlElement(Order = 1)]
397
        public CT_OfficeArtExtensionList extLst
398
        {
399
            get
400
            {
401
                return this.extLstField;
402
            }
403
            set
404
            {
405
                this.extLstField = value;
406
            }
407
        }
408
    }
409
    [Serializable]
410
    
411
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
412
    [XmlRoot("inline", Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = false)]
413
    public class CT_Inline
414
    {
415

416
        private CT_PositiveSize2D extentField;
417

418
        private CT_EffectExtent effectExtentField;
419

420
        private CT_NonVisualDrawingProps docPrField;
421

422
        private NPOI.OpenXmlFormats.Dml.WordProcessing.CT_NonVisualGraphicFrameProperties cNvGraphicFramePrField;
423

424
        private CT_GraphicalObject graphicField;
425

426
        private uint distTField;
427

428
        private bool distTFieldSpecified;
429

430
        private uint distBField;
431

432
        private bool distBFieldSpecified;
433

434
        private uint distLField;
435

436
        private bool distLFieldSpecified;
437

438
        private uint distRField;
439

440
        private bool distRFieldSpecified;
441

442
        public static CT_Inline Parse(XmlNode node, XmlNamespaceManager namespaceManager)
443
        {
444
            if (node == null)
445
                return null;
446
            CT_Inline ctObj = new CT_Inline();
447
            ctObj.distT = XmlHelper.ReadUInt(node.Attributes["distT"]);
448
            ctObj.distB = XmlHelper.ReadUInt(node.Attributes["distB"]);
449
            ctObj.distL = XmlHelper.ReadUInt(node.Attributes["distL"]);
450
            ctObj.distR = XmlHelper.ReadUInt(node.Attributes["distR"]);
451
            foreach (XmlNode childNode in node.ChildNodes)
452
            {
453
                if (childNode.LocalName == "extent")
454
                    ctObj.extent = CT_PositiveSize2D.Parse(childNode, namespaceManager);
455
                else if (childNode.LocalName == "effectExtent")
456
                    ctObj.effectExtent = CT_EffectExtent.Parse(childNode, namespaceManager);
457
                else if (childNode.LocalName == "docPr")
458
                    ctObj.docPr = CT_NonVisualDrawingProps.Parse(childNode, namespaceManager);
459
                else if (childNode.LocalName == "cNvGraphicFramePr")
460
                    ctObj.cNvGraphicFramePr = CT_NonVisualGraphicFrameProperties.Parse(childNode, namespaceManager);
461
                else if (childNode.LocalName == "graphic")
462
                    ctObj.graphic = CT_GraphicalObject.Parse(childNode, namespaceManager);
463
            }
464
            return ctObj;
465
        }
466

467

468

469
        internal void Write(StreamWriter sw, string nodeName)
470
        {
471
            sw.Write(string.Format("<wp:{0}", nodeName));
472
            XmlHelper.WriteAttribute(sw, "distT", this.distT, true);
473
            XmlHelper.WriteAttribute(sw, "distB", this.distB, true);
474
            XmlHelper.WriteAttribute(sw, "distL", this.distL, true);
475
            XmlHelper.WriteAttribute(sw, "distR", this.distR, true);
476
            sw.Write(">");
477
            if (this.extent != null)
478
                this.extent.Write(sw, "extent");
479
            if (this.effectExtent != null)
480
                this.effectExtent.Write(sw, "effectExtent");
481
            if (this.docPr != null)
482
                this.docPr.Write(sw, "docPr");
483
            if (this.cNvGraphicFramePr != null)
484
                this.cNvGraphicFramePr.Write(sw, "cNvGraphicFramePr");
485
            if (this.graphic != null)
486
                this.graphic.Write(sw, "graphic");
487
            sw.Write(string.Format("</wp:{0}>", nodeName));
488
        }
489

490
        /// <summary>
491
        /// CT_Inline class constructor
492
        /// </summary>
493
        public CT_Inline()
494
        {
495
            //this.graphicField = new CT_GraphicalObject();
496
            //this.cNvGraphicFramePrField = new CT_NonVisualGraphicFrameProperties();
497
            //this.docPrField = new CT_NonVisualDrawingProps();
498
            //this.effectExtentField = new CT_EffectExtent();
499
            //this.extentField = new CT_PositiveSize2D();
500
        }
501

502
        [XmlElement(Order = 0)]
503
        public CT_PositiveSize2D extent
504
        {
505
            get
506
            {
507
                return this.extentField;
508
            }
509
            set
510
            {
511
                this.extentField = value;
512
            }
513
        }
514

515
        [XmlElement(Order = 1)]
516
        public CT_EffectExtent effectExtent
517
        {
518
            get
519
            {
520
                return this.effectExtentField;
521
            }
522
            set
523
            {
524
                this.effectExtentField = value;
525
            }
526
        }
527

528
        [XmlElement(Order = 2)]
529
        public CT_NonVisualDrawingProps docPr
530
        {
531
            get
532
            {
533
                return this.docPrField;
534
            }
535
            set
536
            {
537
                this.docPrField = value;
538
            }
539
        }
540

541
        [XmlElement(Order = 3)]
542
        public CT_NonVisualGraphicFrameProperties cNvGraphicFramePr
543
        {
544
            get
545
            {
546
                return this.cNvGraphicFramePrField;
547
            }
548
            set
549
            {
550
                this.cNvGraphicFramePrField = value;
551
            }
552
        }
553

554
        [XmlElement(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", Order = 4)]
555
        public CT_GraphicalObject graphic
556
        {
557
            get
558
            {
559
                return this.graphicField;
560
            }
561
            set
562
            {
563
                this.graphicField = value;
564
            }
565
        }
566

567
        [XmlAttribute]
568
        public uint distT
569
        {
570
            get
571
            {
572
                return this.distTField;
573
            }
574
            set
575
            {
576
                this.distTField = value;
577
            }
578
        }
579

580
        [XmlIgnore]
581
        public bool distTSpecified
582
        {
583
            get
584
            {
585
                return this.distTFieldSpecified;
586
            }
587
            set
588
            {
589
                this.distTFieldSpecified = value;
590
            }
591
        }
592

593
        [XmlAttribute]
594
        public uint distB
595
        {
596
            get
597
            {
598
                return this.distBField;
599
            }
600
            set
601
            {
602
                this.distBField = value;
603
            }
604
        }
605

606
        [XmlIgnore]
607
        public bool distBSpecified
608
        {
609
            get
610
            {
611
                return this.distBFieldSpecified;
612
            }
613
            set
614
            {
615
                this.distBFieldSpecified = value;
616
            }
617
        }
618

619
        [XmlAttribute]
620
        public uint distL
621
        {
622
            get
623
            {
624
                return this.distLField;
625
            }
626
            set
627
            {
628
                this.distLField = value;
629
            }
630
        }
631

632
        [XmlIgnore]
633
        public bool distLSpecified
634
        {
635
            get
636
            {
637
                return this.distLFieldSpecified;
638
            }
639
            set
640
            {
641
                this.distLFieldSpecified = value;
642
            }
643
        }
644

645
        [XmlAttribute]
646
        public uint distR
647
        {
648
            get
649
            {
650
                return this.distRField;
651
            }
652
            set
653
            {
654
                this.distRField = value;
655
            }
656
        }
657

658
        [XmlIgnore]
659
        public bool distRSpecified
660
        {
661
            get
662
            {
663
                return this.distRFieldSpecified;
664
            }
665
            set
666
            {
667
                this.distRFieldSpecified = value;
668
            }
669
        }
670

671
        public CT_PositiveSize2D AddNewExtent()
672
        {
673
            if (this.extentField == null)
674
                this.extentField = new CT_PositiveSize2D();
675
            return this.extentField;
676
        }
677

678
        public CT_NonVisualDrawingProps AddNewDocPr()
679
        {
680
            if (this.docPrField == null)
681
                this.docPrField = new CT_NonVisualDrawingProps();
682
            return this.docPrField;
683
        }
684
    }
685

686
    
687
    [Serializable]
688
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
689
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
690
    public class CT_EffectExtent
691
    {
692

693
        private long lField;
694

695
        private long tField;
696

697
        private long rField;
698

699
        private long bField;
700

701
        public static CT_EffectExtent Parse(XmlNode node, XmlNamespaceManager namespaceManager)
702
        {
703
            if (node == null)
704
                return null;
705
            CT_EffectExtent ctObj = new CT_EffectExtent();
706
            ctObj.l = XmlHelper.ReadLong(node.Attributes["l"]);
707
            ctObj.t = XmlHelper.ReadLong(node.Attributes["t"]);
708
            ctObj.r = XmlHelper.ReadLong(node.Attributes["r"]);
709
            ctObj.b = XmlHelper.ReadLong(node.Attributes["b"]);
710
            return ctObj;
711
        }
712

713

714

715
        internal void Write(StreamWriter sw, string nodeName)
716
        {
717
            sw.Write(string.Format("<wp:{0}", nodeName));
718
            XmlHelper.WriteAttribute(sw, "l", this.l, true);
719
            XmlHelper.WriteAttribute(sw, "t", this.t, true);
720
            XmlHelper.WriteAttribute(sw, "r", this.r, true);
721
            XmlHelper.WriteAttribute(sw, "b", this.b, true);
722
            sw.Write("/>");
723
        }
724

725
        [XmlAttribute]
726
        public long l
727
        {
728
            get
729
            {
730
                return this.lField;
731
            }
732
            set
733
            {
734
                this.lField = value;
735
            }
736
        }
737

738
        [XmlAttribute]
739
        public long t
740
        {
741
            get
742
            {
743
                return this.tField;
744
            }
745
            set
746
            {
747
                this.tField = value;
748
            }
749
        }
750

751
        [XmlAttribute]
752
        public long r
753
        {
754
            get
755
            {
756
                return this.rField;
757
            }
758
            set
759
            {
760
                this.rField = value;
761
            }
762
        }
763

764
        [XmlAttribute]
765
        public long b
766
        {
767
            get
768
            {
769
                return this.bField;
770
            }
771
            set
772
            {
773
                this.bField = value;
774
            }
775
        }
776
    }
777

778
    
779
    [Serializable]
780
    
781
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
782
    [XmlRoot("anchor", Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = false)]
783
    public class CT_Anchor
784
    {
785

786
        private CT_Point2D simplePosField;
787

788
        private CT_PosH positionHField;
789

790
        private CT_PosV positionVField;
791

792
        private CT_PositiveSize2D extentField;
793

794
        private CT_EffectExtent effectExtentField;
795

796
        //private object itemField;
797

798
        private CT_NonVisualDrawingProps docPrField;
799

800
        private CT_NonVisualGraphicFrameProperties cNvGraphicFramePrField;
801

802
        private CT_GraphicalObject graphicField;
803

804
        private uint distTField;
805

806
        private bool distTFieldSpecified;
807

808
        private uint distBField;
809

810
        private bool distBFieldSpecified;
811

812
        private uint distLField;
813

814
        private bool distLFieldSpecified;
815

816
        private uint distRField;
817

818
        private bool distRFieldSpecified;
819

820
        private bool simplePos1Field;
821

822
        private bool simplePos1FieldSpecified;
823

824
        private uint relativeHeightField;
825

826
        private bool behindDocField;
827

828
        private bool lockedField;
829

830
        private bool layoutInCellField;
831

832
        private bool hiddenField;
833

834
        private bool hiddenFieldSpecified;
835

836
        private bool allowOverlapField;
837

838
        /// <summary>
839
        /// CT_Anchor class constructor
840
        /// </summary>
841
        public CT_Anchor()
842
        {
843
            //this.effectExtentField = new CT_EffectExtent();
844
            //this.positionVField = new CT_PosV();
845
            //this.positionHField = new CT_PosH();
846
            //this.simplePosField = new CT_Point2D();
847
        }
848

849
        [XmlElement(Order = 0)]
850
        public CT_Point2D simplePos
851
        {
852
            get
853
            {
854
                return this.simplePosField;
855
            }
856
            set
857
            {
858
                this.simplePosField = value;
859
            }
860
        }
861

862
        [XmlElement(Order = 1)]
863
        public CT_PosH positionH
864
        {
865
            get
866
            {
867
                return this.positionHField;
868
            }
869
            set
870
            {
871
                this.positionHField = value;
872
            }
873
        }
874

875
        [XmlElement(Order = 2)]
876
        public CT_PosV positionV
877
        {
878
            get
879
            {
880
                return this.positionVField;
881
            }
882
            set
883
            {
884
                this.positionVField = value;
885
            }
886
        }
887

888
        [XmlElement(Order = 3)]
889
        public CT_PositiveSize2D extent
890
        {
891
            get
892
            {
893
                return this.extentField;
894
            }
895
            set
896
            {
897
                this.extentField = value;
898
            }
899
        }
900

901
        [XmlElement(Order = 4)]
902
        public CT_EffectExtent effectExtent
903
        {
904
            get
905
            {
906
                return this.effectExtentField;
907
            }
908
            set
909
            {
910
                this.effectExtentField = value;
911
            }
912
        }
913

914
        CT_WrapNone wrapNoneField;
915
        public CT_WrapNone wrapNone
916
        {
917
            get { return this.wrapNoneField; }
918
            set { this.wrapNoneField = value; }
919
        }
920

921
        CT_WrapTight wrapTightField;
922
        public CT_WrapTight wrapTight
923
        {
924
            get { return this.wrapTightField; }
925
            set { this.wrapTightField = value; }
926
        }
927

928
        CT_WrapTopBottom wrapTopAndBottomField;
929
        public CT_WrapTopBottom wrapTopAndBottom
930
        {
931
            get { return this.wrapTopAndBottomField; }
932
            set { this.wrapTopAndBottomField = value; }
933
        }
934

935
        CT_WrapSquare wrapSquareField;
936
        public CT_WrapSquare wrapSquare
937
        {
938
            get { return this.wrapSquareField; }
939
            set { this.wrapSquareField = value; }
940
        }
941

942
        CT_WrapThrough wrapThroughField;
943
        public CT_WrapThrough wrapThrough
944
        {
945
            get { return this.wrapThroughField; }
946
            set { this.wrapThroughField = value; }
947
        }
948

949

950

951
        [XmlElement(Order = 6)]
952
        public CT_NonVisualDrawingProps docPr
953
        {
954
            get
955
            {
956
                return this.docPrField;
957
            }
958
            set
959
            {
960
                this.docPrField = value;
961
            }
962
        }
963

964
        [XmlElement(Order = 7)]
965
        public CT_NonVisualGraphicFrameProperties cNvGraphicFramePr
966
        {
967
            get
968
            {
969
                return this.cNvGraphicFramePrField;
970
            }
971
            set
972
            {
973
                this.cNvGraphicFramePrField = value;
974
            }
975
        }
976

977
        [XmlElement(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", Order = 8)]
978
        public CT_GraphicalObject graphic
979
        {
980
            get
981
            {
982
                return this.graphicField;
983
            }
984
            set
985
            {
986
                this.graphicField = value;
987
            }
988
        }
989

990
        [XmlAttribute]
991
        public uint distT
992
        {
993
            get
994
            {
995
                return this.distTField;
996
            }
997
            set
998
            {
999
                this.distTField = value;
1000
            }
1001
        }
1002

1003
        [XmlIgnore]
1004
        public bool distTSpecified
1005
        {
1006
            get
1007
            {
1008
                return this.distTFieldSpecified;
1009
            }
1010
            set
1011
            {
1012
                this.distTFieldSpecified = value;
1013
            }
1014
        }
1015

1016
        [XmlAttribute]
1017
        public uint distB
1018
        {
1019
            get
1020
            {
1021
                return this.distBField;
1022
            }
1023
            set
1024
            {
1025
                this.distBField = value;
1026
            }
1027
        }
1028

1029
        [XmlIgnore]
1030
        public bool distBSpecified
1031
        {
1032
            get
1033
            {
1034
                return this.distBFieldSpecified;
1035
            }
1036
            set
1037
            {
1038
                this.distBFieldSpecified = value;
1039
            }
1040
        }
1041

1042
        [XmlAttribute]
1043
        public uint distL
1044
        {
1045
            get
1046
            {
1047
                return this.distLField;
1048
            }
1049
            set
1050
            {
1051
                this.distLField = value;
1052
            }
1053
        }
1054

1055
        [XmlIgnore]
1056
        public bool distLSpecified
1057
        {
1058
            get
1059
            {
1060
                return this.distLFieldSpecified;
1061
            }
1062
            set
1063
            {
1064
                this.distLFieldSpecified = value;
1065
            }
1066
        }
1067

1068
        [XmlAttribute]
1069
        public uint distR
1070
        {
1071
            get
1072
            {
1073
                return this.distRField;
1074
            }
1075
            set
1076
            {
1077
                this.distRField = value;
1078
            }
1079
        }
1080

1081
        [XmlIgnore]
1082
        public bool distRSpecified
1083
        {
1084
            get
1085
            {
1086
                return this.distRFieldSpecified;
1087
            }
1088
            set
1089
            {
1090
                this.distRFieldSpecified = value;
1091
            }
1092
        }
1093

1094
        [XmlAttribute("simplePos")]
1095
        public bool simplePos1
1096
        {
1097
            get
1098
            {
1099
                return this.simplePos1Field;
1100
            }
1101
            set
1102
            {
1103
                this.simplePos1Field = value;
1104
            }
1105
        }
1106

1107
        [XmlIgnore]
1108
        public bool simplePos1Specified
1109
        {
1110
            get
1111
            {
1112
                return this.simplePos1FieldSpecified;
1113
            }
1114
            set
1115
            {
1116
                this.simplePos1FieldSpecified = value;
1117
            }
1118
        }
1119

1120
        [XmlAttribute]
1121
        public uint relativeHeight
1122
        {
1123
            get
1124
            {
1125
                return this.relativeHeightField;
1126
            }
1127
            set
1128
            {
1129
                this.relativeHeightField = value;
1130
            }
1131
        }
1132

1133
        [XmlAttribute]
1134
        public bool behindDoc
1135
        {
1136
            get
1137
            {
1138
                return this.behindDocField;
1139
            }
1140
            set
1141
            {
1142
                this.behindDocField = value;
1143
            }
1144
        }
1145

1146
        [XmlAttribute]
1147
        public bool locked
1148
        {
1149
            get
1150
            {
1151
                return this.lockedField;
1152
            }
1153
            set
1154
            {
1155
                this.lockedField = value;
1156
            }
1157
        }
1158

1159
        [XmlAttribute]
1160
        public bool layoutInCell
1161
        {
1162
            get
1163
            {
1164
                return this.layoutInCellField;
1165
            }
1166
            set
1167
            {
1168
                this.layoutInCellField = value;
1169
            }
1170
        }
1171

1172
        [XmlAttribute]
1173
        public bool hidden
1174
        {
1175
            get
1176
            {
1177
                return this.hiddenField;
1178
            }
1179
            set
1180
            {
1181
                this.hiddenField = value;
1182
            }
1183
        }
1184

1185
        [XmlIgnore]
1186
        public bool hiddenSpecified
1187
        {
1188
            get
1189
            {
1190
                return this.hiddenFieldSpecified;
1191
            }
1192
            set
1193
            {
1194
                this.hiddenFieldSpecified = value;
1195
            }
1196
        }
1197

1198
        [XmlAttribute]
1199
        public bool allowOverlap
1200
        {
1201
            get
1202
            {
1203
                return this.allowOverlapField;
1204
            }
1205
            set
1206
            {
1207
                this.allowOverlapField = value;
1208
            }
1209
        }
1210

1211
        private byte[] anchorIdField;
1212
        private byte[] editIdField;
1213
        public static CT_Anchor Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1214
        {
1215
            if (node == null)
1216
                return null;
1217
            CT_Anchor ctObj = new CT_Anchor();
1218
            ctObj.distT = XmlHelper.ReadUInt(node.Attributes["distT"]);
1219
            ctObj.distB = XmlHelper.ReadUInt(node.Attributes["distB"]);
1220
            ctObj.distL = XmlHelper.ReadUInt(node.Attributes["distL"]);
1221
            ctObj.distR = XmlHelper.ReadUInt(node.Attributes["distR"]);
1222
            ctObj.simplePos1 = XmlHelper.ReadBool(node.Attributes["simplePos"]);
1223
            ctObj.relativeHeight = XmlHelper.ReadUInt(node.Attributes["relativeHeight"]);
1224
            ctObj.behindDoc = XmlHelper.ReadBool(node.Attributes["behindDoc"]);
1225
            ctObj.locked = XmlHelper.ReadBool(node.Attributes["locked"]);
1226
            ctObj.layoutInCell = XmlHelper.ReadBool(node.Attributes["layoutInCell"]);
1227
            ctObj.hidden = XmlHelper.ReadBool(node.Attributes["hidden"]);
1228
            ctObj.allowOverlap = XmlHelper.ReadBool(node.Attributes["allowOverlap"]);
1229
            if (node.Attributes["wp14:anchorId"] != null)
1230
                ctObj.anchorIdField = XmlHelper.ReadBytes(node.Attributes["wp14:anchorId"]);
1231
            if (node.Attributes["wp14:editId"] != null)
1232
                ctObj.editIdField = XmlHelper.ReadBytes(node.Attributes["wp14:editId"]);
1233
            foreach (XmlNode childNode in node.ChildNodes)
1234
            {
1235
                if (childNode.LocalName == "simplePos")
1236
                    ctObj.simplePos = CT_Point2D.Parse(childNode, namespaceManager);
1237
                else if (childNode.LocalName == "positionH")
1238
                    ctObj.positionH = CT_PosH.Parse(childNode, namespaceManager);
1239
                else if (childNode.LocalName == "positionV")
1240
                    ctObj.positionV = CT_PosV.Parse(childNode, namespaceManager);
1241
                else if (childNode.LocalName == "extent")
1242
                    ctObj.extent = CT_PositiveSize2D.Parse(childNode, namespaceManager);
1243
                else if (childNode.LocalName == "wrapSquare")
1244
                    ctObj.wrapSquare = CT_WrapSquare.Parse(childNode, namespaceManager);
1245
                else if (childNode.LocalName == "wrapNone")
1246
                    ctObj.wrapNone = new CT_WrapNone();
1247
                else if (childNode.LocalName == "effectExtent")
1248
                    ctObj.effectExtent = CT_EffectExtent.Parse(childNode, namespaceManager);
1249
                else if(childNode.LocalName == "wrapTight")
1250
                    ctObj.wrapTight = CT_WrapTight.Parse(childNode, namespaceManager);
1251
                else if (childNode.LocalName == "wrapTopAndBottom")
1252
                    ctObj.wrapTopAndBottom = CT_WrapTopBottom.Parse(childNode, namespaceManager);
1253
                else if (childNode.LocalName == "docPr")
1254
                    ctObj.docPr = CT_NonVisualDrawingProps.Parse(childNode, namespaceManager);
1255
                else if (childNode.LocalName == "cNvGraphicFramePr")
1256
                    ctObj.cNvGraphicFramePr = CT_NonVisualGraphicFrameProperties.Parse(childNode, namespaceManager);
1257
                else if (childNode.LocalName == "graphic")
1258
                    ctObj.graphic = CT_GraphicalObject.Parse(childNode, namespaceManager);
1259
            }
1260
            return ctObj;
1261
        }
1262

1263

1264

1265
        internal void Write(StreamWriter sw, string nodeName)
1266
        {
1267
            sw.Write(string.Format("<wp:{0}", nodeName));
1268
            XmlHelper.WriteAttribute(sw, "distT", this.distT, true);
1269
            XmlHelper.WriteAttribute(sw, "distB", this.distB ,true);
1270
            XmlHelper.WriteAttribute(sw, "distL", this.distL);
1271
            XmlHelper.WriteAttribute(sw, "distR", this.distR);
1272
            XmlHelper.WriteAttribute(sw, "simplePos", this.simplePos1);
1273
            XmlHelper.WriteAttribute(sw, "relativeHeight", this.relativeHeight);
1274
            XmlHelper.WriteAttribute(sw, "behindDoc", this.behindDoc);
1275
            XmlHelper.WriteAttribute(sw, "locked", this.locked);
1276
            XmlHelper.WriteAttribute(sw, "layoutInCell", this.layoutInCell);
1277
            if(this.hidden)
1278
                XmlHelper.WriteAttribute(sw, "hidden", this.hidden);
1279
            XmlHelper.WriteAttribute(sw, "allowOverlap", this.allowOverlap);
1280
            XmlHelper.WriteAttribute(sw, "wp14:anchorId", this.anchorIdField);
1281
            XmlHelper.WriteAttribute(sw, "wp14:editId", this.editIdField);
1282
            sw.Write(">");
1283
            if (this.simplePos != null)
1284
                this.simplePos.Write(sw, "simplePos");
1285
            if (this.positionH != null)
1286
                this.positionH.Write(sw, "positionH");
1287
            if (this.positionV != null)
1288
                this.positionV.Write(sw, "positionV");
1289
            if (this.extent != null)
1290
                this.extent.Write(sw, "extent");
1291
            if (this.effectExtent != null)
1292
                this.effectExtent.Write(sw, "effectExtent");
1293
            if(this.wrapTight != null)
1294
                this.wrapTight.Write(sw, "wrapTight");
1295
            if (this.wrapTopAndBottom != null)
1296
                this.wrapTopAndBottom.Write(sw, "wrapTopAndBottom");
1297
            if (this.wrapSquare != null)
1298
                this.wrapSquare.Write(sw, "wrapSquare");
1299
            if (this.wrapNone != null)
1300
                this.wrapNone.Write(sw, "wrapNone");
1301
            if (this.docPr != null)
1302
                this.docPr.Write(sw, "docPr");
1303
            if (this.cNvGraphicFramePr != null)
1304
                this.cNvGraphicFramePr.Write(sw, "cNvGraphicFramePr");
1305
            if (this.graphic != null)
1306
                this.graphic.Write(sw, "graphic");
1307
            sw.Write(string.Format("</wp:{0}>", nodeName));
1308
        }
1309

1310
    }
1311

1312
    [Serializable]
1313
    
1314
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1315
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
1316
    public class CT_PosH
1317
    {
1318
        public static CT_PosH Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1319
        {
1320
            if (node == null)
1321
                return null;
1322
            CT_PosH ctObj = new CT_PosH();
1323

1324
            if (node.Attributes["relativeFrom"] != null)
1325
                ctObj.relativeFrom = (ST_RelFromH)Enum.Parse(typeof(ST_RelFromH), node.Attributes["relativeFrom"].Value);
1326

1327
            foreach (XmlNode childNode in node.ChildNodes)
1328
            {
1329
                if (childNode.LocalName == "posOffset")
1330
                    ctObj.posOffset = int.TryParse(childNode.InnerText, out var i ) ? i : (int?)null;
1331
                else if (childNode.LocalName == "align")
1332
                    ctObj.align = (ST_AlignH)Enum.Parse(typeof(ST_AlignH), childNode.InnerText);
1333
            }
1334

1335
            return ctObj;
1336
        }
1337

1338

1339

1340
        internal void Write(StreamWriter sw, string nodeName)
1341
        {
1342
            sw.Write(string.Format("<wp:{0}", nodeName));
1343
            XmlHelper.WriteAttribute(sw, "relativeFrom", this.relativeFrom.ToString());
1344
            sw.Write(">");
1345

1346
            if (this.posOffset != null)
1347
                sw.Write(string.Format("<wp:posOffset>{0}</wp:posOffset>", this.posOffset.Value));
1348

1349
            if (this.align != null)
1350
                sw.Write(string.Format("<wp:align>{0}</wp:align>", this.align.Value));
1351

1352
            sw.Write(string.Format("</wp:{0}>", nodeName));
1353
        }
1354

1355
        private ST_RelFromH relativeFromField;
1356

1357
        int? posOffsetField;
1358
        public int? posOffset
1359
        {
1360
            get { return this.posOffsetField; }
1361
            set { this.posOffsetField = value; }
1362
        }
1363

1364
        ST_AlignH? alignField;
1365
        public ST_AlignH? align
1366
        {
1367
            get { return this.alignField; }
1368
            set { this.alignField = value; }
1369
        }
1370

1371

1372

1373
        [XmlAttribute]
1374
        public ST_RelFromH relativeFrom
1375
        {
1376
            get
1377
            {
1378
                return this.relativeFromField;
1379
            }
1380
            set
1381
            {
1382
                this.relativeFromField = value;
1383
            }
1384
        }
1385
    }
1386

1387
    
1388
    [Serializable]
1389
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1390
    public enum ST_AlignH
1391
    {
1392

1393
    
1394
        left,
1395

1396
    
1397
        right,
1398

1399
    
1400
        center,
1401

1402
    
1403
        inside,
1404

1405
    
1406
        outside,
1407
    }
1408

1409
    
1410
    [Serializable]
1411
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1412
    public enum ST_RelFromH
1413
    {
1414

1415
    
1416
        margin,
1417

1418
    
1419
        page,
1420

1421
    
1422
        column,
1423

1424
    
1425
        character,
1426

1427
    
1428
        leftMargin,
1429

1430
    
1431
        rightMargin,
1432

1433
    
1434
        insideMargin,
1435

1436
    
1437
        outsideMargin,
1438
    }
1439

1440
    
1441
    [Serializable]
1442
    
1443
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1444
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
1445
    public class CT_PosV
1446
    {
1447
        public static CT_PosV Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1448
        {
1449
            if (node == null)
1450
                return null;
1451
            CT_PosV ctObj = new CT_PosV();
1452

1453
            if (node.Attributes["relativeFrom"] != null)
1454
                ctObj.relativeFrom = (ST_RelFromV)Enum.Parse(typeof(ST_RelFromV), node.Attributes["relativeFrom"].Value);
1455

1456
            foreach (XmlNode childNode in node.ChildNodes)
1457
            {
1458
                if (childNode.LocalName == "posOffset")
1459
                    ctObj.posOffset = int.TryParse(childNode.InnerText, out var i) ? i : (int?)null;
1460
                else if (childNode.LocalName == "align")
1461
                    ctObj.align = (ST_AlignV)Enum.Parse(typeof(ST_AlignV), childNode.InnerText);
1462
            }
1463

1464
            return ctObj;
1465
        }
1466

1467

1468

1469
        internal void Write(StreamWriter sw, string nodeName)
1470
        {
1471
            sw.Write(string.Format("<wp:{0}", nodeName));
1472
            XmlHelper.WriteAttribute(sw, "relativeFrom", this.relativeFrom.ToString());
1473
            sw.Write(">");
1474

1475
            if (this.posOffset != null)
1476
                sw.Write(string.Format("<wp:posOffset>{0}</wp:posOffset>", this.posOffset.Value));
1477

1478
            if (this.align != null)
1479
                sw.Write(string.Format("<wp:align>{0}</wp:align>", this.align.Value));
1480

1481
            sw.Write(string.Format("</wp:{0}>", nodeName));
1482
        }
1483

1484
        private ST_RelFromV relativeFromField;
1485

1486
        int? posOffsetField;
1487
        public int? posOffset
1488
        {
1489
            get { return this.posOffsetField; }
1490
            set { this.posOffsetField = value; }
1491
        }
1492

1493
        ST_AlignV? alignField;
1494
        public ST_AlignV? align
1495
        {
1496
            get { return this.alignField; }
1497
            set { this.alignField = value; }
1498
        }
1499

1500

1501

1502
        [XmlAttribute]
1503
        public ST_RelFromV relativeFrom
1504
        {
1505
            get
1506
            {
1507
                return this.relativeFromField;
1508
            }
1509
            set
1510
            {
1511
                this.relativeFromField = value;
1512
            }
1513
        }
1514
    }
1515

1516
    
1517
    [Serializable]
1518
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1519
    public enum ST_AlignV
1520
    {
1521

1522
    
1523
        top,
1524

1525
    
1526
        bottom,
1527

1528
    
1529
        center,
1530

1531
    
1532
        inside,
1533

1534
    
1535
        outside,
1536
    }
1537

1538
    
1539
    [Serializable]
1540
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1541
    public enum ST_RelFromV
1542
    {
1543

1544
    
1545
        margin,
1546

1547
    
1548
        page,
1549

1550
    
1551
        paragraph,
1552

1553
    
1554
        line,
1555

1556
    
1557
        topMargin,
1558

1559
    
1560
        bottomMargin,
1561

1562
    
1563
        insideMargin,
1564

1565
    
1566
        outsideMargin,
1567
    }
1568

1569
    
1570
    [Serializable]
1571
    
1572
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1573
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
1574
    public class CT_WrapNone
1575
    {
1576
        internal void Write(StreamWriter sw, string nodeName)
1577
        {
1578
            sw.Write(string.Format("<wp:{0}", nodeName));
1579
            sw.Write("/>");
1580
        }
1581
    }
1582

1583
    
1584
    [Serializable]
1585
    
1586
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1587
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
1588
    public class CT_WrapSquare
1589
    {
1590

1591
        private CT_EffectExtent effectExtentField;
1592

1593
        private ST_WrapText wrapTextField;
1594

1595
        private uint distTField;
1596

1597
        private bool distTFieldSpecified;
1598

1599
        private uint distBField;
1600

1601
        private bool distBFieldSpecified;
1602

1603
        private uint distLField;
1604

1605
        private bool distLFieldSpecified;
1606

1607
        private uint distRField;
1608

1609
        private bool distRFieldSpecified;
1610

1611
        /// <summary>
1612
        /// CT_WrapSquare class constructor
1613
        /// </summary>
1614
        public CT_WrapSquare()
1615
        {
1616
            this.effectExtentField = new CT_EffectExtent();
1617
        }
1618

1619
        public static CT_WrapSquare Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1620
        {
1621
            if (node == null)
1622
                return null;
1623

1624
            CT_WrapSquare ctObj = new CT_WrapSquare();
1625
            ctObj.wrapText = (ST_WrapText)Enum.Parse(typeof(ST_WrapText), node.Attributes["wrapText"].Value);
1626
            return ctObj;
1627
        }
1628

1629
        internal void Write(StreamWriter sw, string nodeName)
1630
        {
1631
            sw.Write(string.Format("<wp:{0}", nodeName));
1632
            XmlHelper.WriteAttribute(sw, "wrapText", this.wrapText.ToString(), true);
1633
            sw.Write("/>");
1634
        }
1635

1636
        [XmlElement(Order = 0)]
1637
        public CT_EffectExtent effectExtent
1638
        {
1639
            get
1640
            {
1641
                return this.effectExtentField;
1642
            }
1643
            set
1644
            {
1645
                this.effectExtentField = value;
1646
            }
1647
        }
1648

1649
        [XmlAttribute]
1650
        public ST_WrapText wrapText
1651
        {
1652
            get
1653
            {
1654
                return this.wrapTextField;
1655
            }
1656
            set
1657
            {
1658
                this.wrapTextField = value;
1659
            }
1660
        }
1661

1662
        [XmlAttribute]
1663
        public uint distT
1664
        {
1665
            get
1666
            {
1667
                return this.distTField;
1668
            }
1669
            set
1670
            {
1671
                this.distTField = value;
1672
            }
1673
        }
1674

1675
        [XmlIgnore]
1676
        public bool distTSpecified
1677
        {
1678
            get
1679
            {
1680
                return this.distTFieldSpecified;
1681
            }
1682
            set
1683
            {
1684
                this.distTFieldSpecified = value;
1685
            }
1686
        }
1687

1688
        [XmlAttribute]
1689
        public uint distB
1690
        {
1691
            get
1692
            {
1693
                return this.distBField;
1694
            }
1695
            set
1696
            {
1697
                this.distBField = value;
1698
            }
1699
        }
1700

1701
        [XmlIgnore]
1702
        public bool distBSpecified
1703
        {
1704
            get
1705
            {
1706
                return this.distBFieldSpecified;
1707
            }
1708
            set
1709
            {
1710
                this.distBFieldSpecified = value;
1711
            }
1712
        }
1713

1714
        [XmlAttribute]
1715
        public uint distL
1716
        {
1717
            get
1718
            {
1719
                return this.distLField;
1720
            }
1721
            set
1722
            {
1723
                this.distLField = value;
1724
            }
1725
        }
1726

1727
        [XmlIgnore]
1728
        public bool distLSpecified
1729
        {
1730
            get
1731
            {
1732
                return this.distLFieldSpecified;
1733
            }
1734
            set
1735
            {
1736
                this.distLFieldSpecified = value;
1737
            }
1738
        }
1739

1740
        [XmlAttribute]
1741
        public uint distR
1742
        {
1743
            get
1744
            {
1745
                return this.distRField;
1746
            }
1747
            set
1748
            {
1749
                this.distRField = value;
1750
            }
1751
        }
1752

1753
        [XmlIgnore]
1754
        public bool distRSpecified
1755
        {
1756
            get
1757
            {
1758
                return this.distRFieldSpecified;
1759
            }
1760
            set
1761
            {
1762
                this.distRFieldSpecified = value;
1763
            }
1764
        }
1765
    }
1766

1767
    
1768
    [Serializable]
1769
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1770
    public enum ST_WrapText
1771
    {
1772

1773
    
1774
        bothSides,
1775

1776
    
1777
        left,
1778

1779
    
1780
        right,
1781

1782
    
1783
        largest,
1784
    }
1785

1786
    
1787
    [Serializable]
1788
    
1789
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1790
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
1791
    public class CT_WrapThrough
1792
    {
1793

1794
        private CT_WrapPath wrapPolygonField;
1795

1796
        private ST_WrapText wrapTextField;
1797

1798
        private uint distLField;
1799

1800
        private bool distLFieldSpecified;
1801

1802
        private uint distRField;
1803

1804
        private bool distRFieldSpecified;
1805

1806
        /// <summary>
1807
        /// CT_WrapThrough class constructor
1808
        /// </summary>
1809
        public CT_WrapThrough()
1810
        {
1811
            this.wrapPolygonField = new CT_WrapPath();
1812
        }
1813

1814
        [XmlElement(Order = 0)]
1815
        public CT_WrapPath wrapPolygon
1816
        {
1817
            get
1818
            {
1819
                return this.wrapPolygonField;
1820
            }
1821
            set
1822
            {
1823
                this.wrapPolygonField = value;
1824
            }
1825
        }
1826

1827
        [XmlAttribute]
1828
        public ST_WrapText wrapText
1829
        {
1830
            get
1831
            {
1832
                return this.wrapTextField;
1833
            }
1834
            set
1835
            {
1836
                this.wrapTextField = value;
1837
            }
1838
        }
1839

1840
        [XmlAttribute]
1841
        public uint distL
1842
        {
1843
            get
1844
            {
1845
                return this.distLField;
1846
            }
1847
            set
1848
            {
1849
                this.distLField = value;
1850
            }
1851
        }
1852

1853
        [XmlIgnore]
1854
        public bool distLSpecified
1855
        {
1856
            get
1857
            {
1858
                return this.distLFieldSpecified;
1859
            }
1860
            set
1861
            {
1862
                this.distLFieldSpecified = value;
1863
            }
1864
        }
1865

1866
        [XmlAttribute]
1867
        public uint distR
1868
        {
1869
            get
1870
            {
1871
                return this.distRField;
1872
            }
1873
            set
1874
            {
1875
                this.distRField = value;
1876
            }
1877
        }
1878

1879
        [XmlIgnore]
1880
        public bool distRSpecified
1881
        {
1882
            get
1883
            {
1884
                return this.distRFieldSpecified;
1885
            }
1886
            set
1887
            {
1888
                this.distRFieldSpecified = value;
1889
            }
1890
        }
1891
    }
1892

1893
    
1894
    [Serializable]
1895
    
1896
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
1897
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
1898
    public class CT_WrapPath
1899
    {
1900

1901
        private CT_Point2D startField;
1902

1903
        private List<CT_Point2D> lineToField;
1904

1905
        private bool editedField;
1906

1907
        private bool editedFieldSpecified;
1908

1909
        /// <summary>
1910
        /// CT_WrapPath class constructor
1911
        /// </summary>
1912
        public CT_WrapPath()
1913
        {
1914
            this.lineToField = new List<CT_Point2D>();
1915
        }
1916

1917
        [XmlElement(Order = 0)]
1918
        public CT_Point2D start
1919
        {
1920
            get
1921
            {
1922
                return this.startField;
1923
            }
1924
            set
1925
            {
1926
                this.startField = value;
1927
            }
1928
        }
1929

1930
        [XmlElement("lineTo", Order = 1)]
1931
        public List<CT_Point2D> lineTo
1932
        {
1933
            get
1934
            {
1935
                return this.lineToField;
1936
            }
1937
            set
1938
            {
1939
                this.lineToField = value;
1940
            }
1941
        }
1942

1943
        [XmlAttribute]
1944
        public bool edited
1945
        {
1946
            get
1947
            {
1948
                return this.editedField;
1949
            }
1950
            set
1951
            {
1952
                this.editedField = value;
1953
            }
1954
        }
1955

1956
        [XmlIgnore]
1957
        public bool editedSpecified
1958
        {
1959
            get
1960
            {
1961
                return this.editedFieldSpecified;
1962
            }
1963
            set
1964
            {
1965
                this.editedFieldSpecified = value;
1966
            }
1967
        }
1968
        internal static CT_WrapPath Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1969
        {
1970
            if(node == null)
1971
                return null;
1972
            CT_WrapPath ctObj = new CT_WrapPath();
1973
            ctObj.lineToField = new List<CT_Point2D>();
1974
            foreach(XmlNode childNode in node.ChildNodes)
1975
            {
1976
                if(childNode.LocalName == "start")
1977
                    ctObj.start = CT_Point2D.Parse(childNode, namespaceManager);
1978
                else if(childNode.LocalName == "lineTo")
1979
                    ctObj.lineToField.Add(CT_Point2D.Parse(childNode, namespaceManager));
1980
            }
1981
            return ctObj;
1982
        }
1983
        internal void Write(StreamWriter sw, string nodeName)
1984
        {
1985
            sw.Write(string.Format("<wp:{0}", nodeName));
1986
            XmlHelper.WriteAttribute(sw, "edited", this.edited, true);
1987
            sw.Write(">");
1988
            if(this.start!=null)
1989
                this.start.Write(sw, "wp:start");
1990
            if(this.lineToField!=null)
1991
            {
1992
                foreach(var lineTo in this.lineToField)
1993
                {
1994
                    lineTo.Write(sw, "wp:lineTo");
1995
                }
1996
            }
1997
            sw.Write("</wp:{0}>", nodeName);
1998
        }
1999
    }
2000

2001
    
2002
    [Serializable]
2003
    
2004
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing")]
2005
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing", IsNullable = true)]
2006
    public class CT_WrapTight
2007
    {
2008

2009
        private CT_WrapPath wrapPolygonField;
2010

2011
        private ST_WrapText wrapTextField;
2012

2013
        private uint distLField;
2014

2015
        private bool distLFieldSpecified;
2016

2017
        private uint distRField;
2018

2019
        private bool distRFieldSpecified;
2020

2021
        /// <summary>
2022
        /// CT_WrapTight class constructor
2023
        /// </summary>
2024
        public CT_WrapTight()
2025
        {
2026
            this.wrapPolygonField = new CT_WrapPath();
2027
        }
2028

2029
        [XmlElement(Order = 0)]
2030
        public CT_WrapPath wrapPolygon
2031
        {
2032
            get
2033
            {
2034
                return this.wrapPolygonField;
2035
            }
2036
            set
2037
            {
2038
                this.wrapPolygonField = value;
2039
            }
2040
        }
2041

2042
        [XmlAttribute]
2043
        public ST_WrapText wrapText
2044
        {
2045
            get
2046
            {
2047
                return this.wrapTextField;
2048
            }
2049
            set
2050
            {
2051
                this.wrapTextField = value;
2052
            }
2053
        }
2054

2055
        [XmlAttribute]
2056
        public uint distL
2057
        {
2058
            get
2059
            {
2060
                return this.distLField;
2061
            }
2062
            set
2063
            {
2064
                this.distLField = value;
2065
            }
2066
        }
2067

2068
        [XmlIgnore]
2069
        public bool distLSpecified
2070
        {
2071
            get
2072
            {
2073
                return this.distLFieldSpecified;
2074
            }
2075
            set
2076
            {
2077
                this.distLFieldSpecified = value;
2078
            }
2079
        }
2080

2081
        [XmlAttribute]
2082
        public uint distR
2083
        {
2084
            get
2085
            {
2086
                return this.distRField;
2087
            }
2088
            set
2089
            {
2090
                this.distRField = value;
2091
            }
2092
        }
2093

2094
        [XmlIgnore]
2095
        public bool distRSpecified
2096
        {
2097
            get
2098
            {
2099
                return this.distRFieldSpecified;
2100
            }
2101
            set
2102
            {
2103
                this.distRFieldSpecified = value;
2104
            }
2105
        }
2106
        internal static CT_WrapTight Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2107
        {
2108
            if(node == null)
2109
                return null;
2110
            CT_WrapTight ctObj = new CT_WrapTight();
2111
            ctObj.wrapText = XmlHelper.ReadEnum<ST_WrapText>(node.Attributes["wrapText"]);
2112
            ctObj.distR = XmlHelper.ReadUInt(node.Attributes["distR"]);
2113
            ctObj.distL = XmlHelper.ReadUInt(node.Attributes["distL"]);
2114
            foreach(XmlNode childNode in node.ChildNodes)
2115
            {
2116
                if(childNode.LocalName == "wrapPolygon")
2117
                    ctObj.wrapPolygon = CT_WrapPath.Parse(childNode, namespaceManager);
2118
            }
2119
            return ctObj;
2120
        }
2121
        internal void Write(StreamWriter sw, string nodeName)
2122
        {
2123
            sw.Write(string.Format("<wp:{0}", nodeName));
2124
            XmlHelper.WriteAttribute(sw, "distR", this.distR);
2125
            XmlHelper.WriteAttribute(sw, "distL", this.distL);
2126
            XmlHelper.WriteAttribute(sw, "wrapText", this.wrapTextField.ToString());            
2127
            sw.Write(">");
2128
            if(this.wrapPolygon!=null)
2129
                this.wrapPolygon.Write(sw, "wrapPolygon");
2130
            sw.Write("</wp:{0}>", nodeName);
2131
        }
2132
    }
2133

2134
   
2135
    public class CT_WrapTopBottom
2136
    {
2137

2138
        private CT_EffectExtent effectExtentField;
2139

2140
        private uint distTField;
2141

2142
        private bool distTFieldSpecified;
2143

2144
        private uint distBField;
2145

2146
        private bool distBFieldSpecified;
2147

2148
        /// <summary>
2149
        /// CT_WrapTopBottom class constructor
2150
        /// </summary>
2151
        public CT_WrapTopBottom()
2152
        {
2153
            this.effectExtentField = new CT_EffectExtent();
2154
        }
2155

2156
        [XmlElement(Order = 0)]
2157
        public CT_EffectExtent effectExtent
2158
        {
2159
            get
2160
            {
2161
                return this.effectExtentField;
2162
            }
2163
            set
2164
            {
2165
                this.effectExtentField = value;
2166
            }
2167
        }
2168

2169
        [XmlAttribute]
2170
        public uint distT
2171
        {
2172
            get
2173
            {
2174
                return this.distTField;
2175
            }
2176
            set
2177
            {
2178
                this.distTField = value;
2179
            }
2180
        }
2181

2182
        [XmlIgnore]
2183
        public bool distTSpecified
2184
        {
2185
            get
2186
            {
2187
                return this.distTFieldSpecified;
2188
            }
2189
            set
2190
            {
2191
                this.distTFieldSpecified = value;
2192
            }
2193
        }
2194

2195
        [XmlAttribute]
2196
        public uint distB
2197
        {
2198
            get
2199
            {
2200
                return this.distBField;
2201
            }
2202
            set
2203
            {
2204
                this.distBField = value;
2205
            }
2206
        }
2207

2208
        [XmlIgnore]
2209
        public bool distBSpecified
2210
        {
2211
            get
2212
            {
2213
                return this.distBFieldSpecified;
2214
            }
2215
            set
2216
            {
2217
                this.distBFieldSpecified = value;
2218
            }
2219
        }
2220

2221
        internal static CT_WrapTopBottom Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2222
        {
2223
            if (node == null)
2224
                return null;
2225
            CT_WrapTopBottom ctObj = new CT_WrapTopBottom();
2226
            ctObj.distB = XmlHelper.ReadUInt(node.Attributes["distB"]);
2227
            ctObj.distT = XmlHelper.ReadUInt(node.Attributes["distT"]);
2228
            return ctObj;
2229
        }
2230

2231
        internal void Write(StreamWriter sw, string nodeName)
2232
        {
2233
            sw.Write(string.Format("<wp:{0}", nodeName));
2234
            XmlHelper.WriteAttribute(sw, "distT", this.distT);
2235
            XmlHelper.WriteAttribute(sw, "distB", this.distB);
2236
            sw.Write("/>");
2237
        }
2238
    }
2239
}
2240

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

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

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

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