npoi

Форк
0
/
ShapeGeometry.cs 
2295 строк · 45.2 Кб
1
using System;
2
using System.Collections.Generic;
3
using System.ComponentModel;
4
using System.Xml.Serialization;
5
using System.Diagnostics;
6
using System.Xml;
7
using NPOI.OpenXml4Net.Util;
8
using System.IO;
9

10
namespace NPOI.OpenXmlFormats.Dml
11
{
12

13

14

15
    [Serializable]
16
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
17
    public enum ST_ShapeType : int
18
    {
19
        none,
20

21
        line,
22

23

24
        lineInv,
25

26

27
        triangle,
28

29

30
        rtTriangle,
31

32

33
        rect,
34

35

36
        diamond,
37

38

39
        parallelogram,
40

41

42
        trapezoid,
43

44

45
        nonIsoscelesTrapezoid,
46

47

48
        pentagon,
49

50

51
        hexagon,
52

53

54
        heptagon,
55

56

57
        octagon,
58

59

60
        decagon,
61

62

63
        dodecagon,
64

65

66
        star4,
67

68

69
        star5,
70

71

72
        star6,
73

74

75
        star7,
76

77

78
        star8,
79

80

81
        star10,
82

83

84
        star12,
85

86

87
        star16,
88

89

90
        star24,
91

92

93
        star32,
94

95

96
        roundRect,
97

98

99
        round1Rect,
100

101

102
        round2SameRect,
103

104

105
        round2DiagRect,
106

107

108
        snipRoundRect,
109

110

111
        snip1Rect,
112

113

114
        snip2SameRect,
115

116

117
        snip2DiagRect,
118

119

120
        plaque,
121

122

123
        ellipse,
124

125

126
        teardrop,
127

128

129
        homePlate,
130

131

132
        chevron,
133

134

135
        pieWedge,
136

137

138
        pie,
139

140

141
        blockArc,
142

143

144
        donut,
145

146

147
        noSmoking,
148

149

150
        rightArrow,
151

152

153
        leftArrow,
154

155

156
        upArrow,
157

158

159
        downArrow,
160

161

162
        stripedRightArrow,
163

164

165
        notchedRightArrow,
166

167

168
        bentUpArrow,
169

170

171
        leftRightArrow,
172

173

174
        upDownArrow,
175

176

177
        leftUpArrow,
178

179

180
        leftRightUpArrow,
181

182

183
        quadArrow,
184

185

186
        leftArrowCallout,
187

188

189
        rightArrowCallout,
190

191

192
        upArrowCallout,
193

194

195
        downArrowCallout,
196

197

198
        leftRightArrowCallout,
199

200

201
        upDownArrowCallout,
202

203

204
        quadArrowCallout,
205

206

207
        bentArrow,
208

209

210
        uturnArrow,
211

212

213
        circularArrow,
214

215

216
        leftCircularArrow,
217

218

219
        leftRightCircularArrow,
220

221

222
        curvedRightArrow,
223

224

225
        curvedLeftArrow,
226

227

228
        curvedUpArrow,
229

230

231
        curvedDownArrow,
232

233

234
        swooshArrow,
235

236

237
        cube,
238

239

240
        can,
241

242

243
        lightningBolt,
244

245

246
        heart,
247

248

249
        sun,
250

251

252
        moon,
253

254

255
        smileyFace,
256

257

258
        irregularSeal1,
259

260

261
        irregularSeal2,
262

263

264
        foldedCorner,
265

266

267
        bevel,
268

269

270
        frame,
271

272

273
        halfFrame,
274

275

276
        corner,
277

278

279
        diagStripe,
280

281

282
        chord,
283

284

285
        arc,
286

287

288
        leftBracket,
289

290

291
        rightBracket,
292

293

294
        leftBrace,
295

296

297
        rightBrace,
298

299

300
        bracketPair,
301

302

303
        bracePair,
304

305

306
        straightConnector1,
307

308

309
        bentConnector2,
310

311

312
        bentConnector3,
313

314

315
        bentConnector4,
316

317

318
        bentConnector5,
319

320

321
        curvedConnector2,
322

323

324
        curvedConnector3,
325

326

327
        curvedConnector4,
328

329

330
        curvedConnector5,
331

332

333
        callout1,
334

335

336
        callout2,
337

338

339
        callout3,
340

341

342
        accentCallout1,
343

344

345
        accentCallout2,
346

347

348
        accentCallout3,
349

350

351
        borderCallout1,
352

353

354
        borderCallout2,
355

356

357
        borderCallout3,
358

359

360
        accentBorderCallout1,
361

362

363
        accentBorderCallout2,
364

365

366
        accentBorderCallout3,
367

368

369
        wedgeRectCallout,
370

371

372
        wedgeRoundRectCallout,
373

374

375
        wedgeEllipseCallout,
376

377

378
        cloudCallout,
379

380

381
        cloud,
382

383

384
        ribbon,
385

386

387
        ribbon2,
388

389

390
        ellipseRibbon,
391

392

393
        ellipseRibbon2,
394

395

396
        leftRightRibbon,
397

398

399
        verticalScroll,
400

401

402
        horizontalScroll,
403

404

405
        wave,
406

407

408
        doubleWave,
409

410

411
        plus,
412

413

414
        flowChartProcess,
415

416

417
        flowChartDecision,
418

419

420
        flowChartInputOutput,
421

422

423
        flowChartPredefinedProcess,
424

425

426
        flowChartInternalStorage,
427

428

429
        flowChartDocument,
430

431

432
        flowChartMultidocument,
433

434

435
        flowChartTerminator,
436

437

438
        flowChartPreparation,
439

440

441
        flowChartManualInput,
442

443

444
        flowChartManualOperation,
445

446

447
        flowChartConnector,
448

449

450
        flowChartPunchedCard,
451

452

453
        flowChartPunchedTape,
454

455

456
        flowChartSummingJunction,
457

458

459
        flowChartOr,
460

461

462
        flowChartCollate,
463

464

465
        flowChartSort,
466

467

468
        flowChartExtract,
469

470

471
        flowChartMerge,
472

473

474
        flowChartOfflineStorage,
475

476

477
        flowChartOnlineStorage,
478

479

480
        flowChartMagneticTape,
481

482

483
        flowChartMagneticDisk,
484

485

486
        flowChartMagneticDrum,
487

488

489
        flowChartDisplay,
490

491

492
        flowChartDelay,
493

494

495
        flowChartAlternateProcess,
496

497

498
        flowChartOffpageConnector,
499

500

501
        actionButtonBlank,
502

503

504
        actionButtonHome,
505

506

507
        actionButtonHelp,
508

509

510
        actionButtonInformation,
511

512

513
        actionButtonForwardNext,
514

515

516
        actionButtonBackPrevious,
517

518

519
        actionButtonEnd,
520

521

522
        actionButtonBeginning,
523

524

525
        actionButtonReturn,
526

527

528
        actionButtonDocument,
529

530

531
        actionButtonSound,
532

533

534
        actionButtonMovie,
535

536

537
        gear6,
538

539

540
        gear9,
541

542

543
        funnel,
544

545

546
        mathPlus,
547

548

549
        mathMinus,
550

551

552
        mathMultiply,
553

554

555
        mathDivide,
556

557

558
        mathEqual,
559

560

561
        mathNotEqual,
562

563

564
        cornerTabs,
565

566

567
        squareTabs,
568

569

570
        plaqueTabs,
571

572

573
        chartX,
574

575

576
        chartStar,
577

578

579
        chartPlus,
580
    }
581

582

583
    [Serializable]
584
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
585
    public enum ST_TextShapeType
586
    {
587

588

589
        textNoShape,
590

591

592
        textPlain,
593

594

595
        textStop,
596

597

598
        textTriangle,
599

600

601
        textTriangleInverted,
602

603

604
        textChevron,
605

606

607
        textChevronInverted,
608

609

610
        textRingInside,
611

612

613
        textRingOutside,
614

615

616
        textArchUp,
617

618

619
        textArchDown,
620

621

622
        textCircle,
623

624

625
        textButton,
626

627

628
        textArchUpPour,
629

630

631
        textArchDownPour,
632

633

634
        textCirclePour,
635

636

637
        textButtonPour,
638

639

640
        textCurveUp,
641

642

643
        textCurveDown,
644

645

646
        textCanUp,
647

648

649
        textCanDown,
650

651

652
        textWave1,
653

654

655
        textWave2,
656

657

658
        textDoubleWave1,
659

660

661
        textWave4,
662

663

664
        textInflate,
665

666

667
        textDeflate,
668

669

670
        textInflateBottom,
671

672

673
        textDeflateBottom,
674

675

676
        textInflateTop,
677

678

679
        textDeflateTop,
680

681

682
        textDeflateInflate,
683

684

685
        textDeflateInflateDeflate,
686

687

688
        textFadeRight,
689

690

691
        textFadeLeft,
692

693

694
        textFadeUp,
695

696

697
        textFadeDown,
698

699

700
        textSlantUp,
701

702

703
        textSlantDown,
704

705

706
        textCascadeUp,
707

708

709
        textCascadeDown,
710
    }
711

712

713
    [Serializable]
714
    //[DebuggerStepThrough]
715
    [System.ComponentModel.DesignerCategory("code")]
716
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
717
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
718
    public class CT_GeomGuide
719
    {
720

721
        private string nameField;
722

723
        private string fmlaField;
724

725
        public static CT_GeomGuide Parse(XmlNode node, XmlNamespaceManager namespaceManager)
726
        {
727
            if (node == null)
728
                return null;
729
            CT_GeomGuide ctObj = new CT_GeomGuide();
730
            ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);
731
            ctObj.fmla = XmlHelper.ReadString(node.Attributes["fmla"]);
732
            return ctObj;
733
        }
734

735

736

737
        internal void Write(StreamWriter sw, string nodeName)
738
        {
739
            sw.Write(string.Format("<a:{0}", nodeName));
740
            XmlHelper.WriteAttribute(sw, "name", this.name);
741
            XmlHelper.WriteAttribute(sw, "fmla", this.fmla);
742
            sw.Write("/>");
743
        }
744

745
        [XmlAttribute(DataType = "token")]
746
        public string name
747
        {
748
            get
749
            {
750
                return this.nameField;
751
            }
752
            set
753
            {
754
                this.nameField = value;
755
            }
756
        }
757

758

759
        [XmlAttribute]
760
        public string fmla
761
        {
762
            get
763
            {
764
                return this.fmlaField;
765
            }
766
            set
767
            {
768
                this.fmlaField = value;
769
            }
770
        }
771
    }
772

773

774
    [Serializable]
775
    //[System.Diagnostics.DebuggerStepThrough]
776
    [System.ComponentModel.DesignerCategory("code")]
777
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
778
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
779
    public class CT_Path2DCubicBezierTo
780
    {
781

782
        private List<CT_AdjPoint2D> pts = null;
783

784
		public static CT_Path2DCubicBezierTo Parse(XmlNode node, XmlNamespaceManager namespaceManager)
785
        {
786
			CT_Path2DCubicBezierTo obj = new CT_Path2DCubicBezierTo();
787
			foreach(XmlNode childNode in node.ChildNodes) {
788
				if(childNode.LocalName == "pt") {
789
					obj.pts.Add(CT_AdjPoint2D.Parse(childNode, namespaceManager));
790
				}
791
			}
792
			return obj;
793
		}
794

795
		internal void Write(StreamWriter sw, string nodeName) {
796

797
			sw.Write("<a:{0}>", nodeName);
798
			foreach(var cub in pts) {
799
				cub.Write(sw, "pt");
800
			}
801
			sw.Write("</a:{0}>", nodeName);
802
		}
803

804
		public CT_Path2DCubicBezierTo() {
805
			pts = new List<CT_AdjPoint2D>();
806
		}
807

808
		[XmlElement("pt", Order = 0)]
809
        public List<CT_AdjPoint2D> pt
810
        {
811
            get
812
            {
813
                return this.pts;
814
            }
815
            set
816
            {
817
                this.pts = value;
818
            }
819
        }
820
    }
821

822

823
    [Serializable]
824
    //[DebuggerStepThrough]
825
    [System.ComponentModel.DesignerCategory("code")]
826
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
827
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
828
    public class CT_AdjPoint2D
829
    {
830

831
        private string xField;
832

833
        private string yField;
834

835
        public static CT_AdjPoint2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
836
        {
837
            if (node == null)
838
                return null;
839
            CT_AdjPoint2D ctObj = new CT_AdjPoint2D();
840
            ctObj.x = XmlHelper.ReadString(node.Attributes["x"]);
841
            ctObj.y = XmlHelper.ReadString(node.Attributes["y"]);
842
            return ctObj;
843
        }
844

845

846

847
        internal void Write(StreamWriter sw, string nodeName)
848
        {
849
            sw.Write(string.Format("<a:{0}", nodeName));
850
            XmlHelper.WriteAttribute(sw, "x", this.x);
851
            XmlHelper.WriteAttribute(sw, "y", this.y);
852
            sw.Write("/>");
853

854
        }
855

856
        [XmlAttribute]
857
        public string x
858
        {
859
            get
860
            {
861
                return this.xField;
862
            }
863
            set
864
            {
865
                this.xField = value;
866
            }
867
        }
868

869

870
        [XmlAttribute]
871
        public string y
872
        {
873
            get
874
            {
875
                return this.yField;
876
            }
877
            set
878
            {
879
                this.yField = value;
880
            }
881
        }
882
    }
883

884

885
    [Serializable]
886
    //[System.Diagnostics.DebuggerStepThrough]
887
    [System.ComponentModel.DesignerCategory("code")]
888
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
889
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
890
    public class CT_Path2DQuadBezierTo
891
    {
892

893
        private CT_AdjPoint2D[] ptField;
894

895

896
        [XmlElement("pt", Order = 0)]
897
        public CT_AdjPoint2D[] pt
898
        {
899
            get
900
            {
901
                return this.ptField;
902
            }
903
            set
904
            {
905
                this.ptField = value;
906
            }
907
        }
908
    }
909

910

911
    [Serializable]
912
    //[System.Diagnostics.DebuggerStepThrough]
913
    [System.ComponentModel.DesignerCategory("code")]
914
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
915
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
916
    public class CT_GeomGuideList
917
    {
918

919
        private List<CT_GeomGuide> gdField;
920

921

922
        [XmlElement("gd", Order = 0)]
923
        public List<CT_GeomGuide> gd
924
        {
925
            get
926
            {
927
                return this.gdField;
928
            }
929
            set
930
            {
931
                this.gdField = value;
932
            }
933
        }
934

935
        internal static CT_GeomGuideList Parse(XmlNode node, XmlNamespaceManager namespaceManager)
936
        {
937
            CT_GeomGuideList avLst = new CT_GeomGuideList();
938
            avLst.gdField = new List<CT_GeomGuide>();
939
            if (node.ChildNodes != null)
940
            {
941
                foreach (XmlNode childNode in node.ChildNodes)
942
                {
943
                    if (childNode.LocalName == "gd")
944
                        avLst.gdField.Add(CT_GeomGuide.Parse(childNode, namespaceManager));
945
                }
946
            }
947
            return avLst;
948
        }
949

950

951

952
        internal void Write(StreamWriter sw, string nodeName)
953
        {
954
            sw.Write("<a:{0}", nodeName);
955
            if (this.gdField == null||this.gdField.Count==0)
956
            {
957
                sw.Write("/>");
958
            }
959
            else
960
            {
961
                sw.Write(">");
962
                foreach (CT_GeomGuide gg in gdField)
963
                {
964
                    gg.Write(sw, "gd");
965
                }
966
                sw.Write("</a:{0}>", nodeName);
967
            }
968

969
        }
970
    }
971

972

973
    [Serializable]
974
    //[System.Diagnostics.DebuggerStepThrough]
975
    [System.ComponentModel.DesignerCategory("code")]
976
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
977
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
978
    public class CT_GeomRect
979
    {
980

981
        private string lField;
982

983
        private string tField;
984

985
        private string rField;
986

987
        private string bField;
988

989
        public static CT_GeomRect Parse(XmlNode node, XmlNamespaceManager namespaceManager)
990
        {
991
            if (node == null)
992
                return null;
993
            CT_GeomRect ctObj = new CT_GeomRect();
994
            ctObj.l = XmlHelper.ReadString(node.Attributes["l"]);
995
            ctObj.t = XmlHelper.ReadString(node.Attributes["t"]);
996
            ctObj.r = XmlHelper.ReadString(node.Attributes["r"]);
997
            ctObj.b = XmlHelper.ReadString(node.Attributes["b"]);
998
            return ctObj;
999
        }
1000

1001

1002

1003
        internal void Write(StreamWriter sw, string nodeName)
1004
        {
1005
            sw.Write(string.Format("<a:{0}", nodeName));
1006
            XmlHelper.WriteAttribute(sw, "l", this.l);
1007
            XmlHelper.WriteAttribute(sw, "t", this.t);
1008
            XmlHelper.WriteAttribute(sw, "r", this.r);
1009
            XmlHelper.WriteAttribute(sw, "b", this.b);
1010
            sw.Write("/>");
1011
        }
1012

1013
        [XmlAttribute]
1014
        public string l
1015
        {
1016
            get
1017
            {
1018
                return this.lField;
1019
            }
1020
            set
1021
            {
1022
                this.lField = value;
1023
            }
1024
        }
1025

1026

1027
        [XmlAttribute]
1028
        public string t
1029
        {
1030
            get
1031
            {
1032
                return this.tField;
1033
            }
1034
            set
1035
            {
1036
                this.tField = value;
1037
            }
1038
        }
1039

1040

1041
        [XmlAttribute]
1042
        public string r
1043
        {
1044
            get
1045
            {
1046
                return this.rField;
1047
            }
1048
            set
1049
            {
1050
                this.rField = value;
1051
            }
1052
        }
1053

1054

1055
        [XmlAttribute]
1056
        public string b
1057
        {
1058
            get
1059
            {
1060
                return this.bField;
1061
            }
1062
            set
1063
            {
1064
                this.bField = value;
1065
            }
1066
        }
1067
    }
1068

1069

1070
    [Serializable]
1071
    //[System.Diagnostics.DebuggerStepThrough]
1072
    [System.ComponentModel.DesignerCategory("code")]
1073
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1074
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1075
    public class CT_XYAdjustHandle
1076
    {
1077

1078
        private CT_AdjPoint2D posField;
1079

1080
        private string gdRefXField;
1081

1082
        private string minXField;
1083

1084
        private string maxXField;
1085

1086
        private string gdRefYField;
1087

1088
        private string minYField;
1089

1090
        private string maxYField;
1091

1092
        [XmlElement(Order = 0)]
1093
        public CT_AdjPoint2D pos
1094
        {
1095
            get
1096
            {
1097
                return this.posField;
1098
            }
1099
            set
1100
            {
1101
                this.posField = value;
1102
            }
1103
        }
1104

1105

1106
        [XmlAttribute(DataType = "token")]
1107
        public string gdRefX
1108
        {
1109
            get
1110
            {
1111
                return this.gdRefXField;
1112
            }
1113
            set
1114
            {
1115
                this.gdRefXField = value;
1116
            }
1117
        }
1118

1119

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

1133

1134
        [XmlAttribute]
1135
        public string maxX
1136
        {
1137
            get
1138
            {
1139
                return this.maxXField;
1140
            }
1141
            set
1142
            {
1143
                this.maxXField = value;
1144
            }
1145
        }
1146

1147

1148
        [XmlAttribute(DataType = "token")]
1149
        public string gdRefY
1150
        {
1151
            get
1152
            {
1153
                return this.gdRefYField;
1154
            }
1155
            set
1156
            {
1157
                this.gdRefYField = value;
1158
            }
1159
        }
1160

1161

1162
        [XmlAttribute]
1163
        public string minY
1164
        {
1165
            get
1166
            {
1167
                return this.minYField;
1168
            }
1169
            set
1170
            {
1171
                this.minYField = value;
1172
            }
1173
        }
1174

1175

1176
        [XmlAttribute]
1177
        public string maxY
1178
        {
1179
            get
1180
            {
1181
                return this.maxYField;
1182
            }
1183
            set
1184
            {
1185
                this.maxYField = value;
1186
            }
1187
        }
1188
    }
1189

1190

1191
    [Serializable]
1192
    //[System.Diagnostics.DebuggerStepThrough]
1193
    [System.ComponentModel.DesignerCategory("code")]
1194
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1195
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1196
    public class CT_PolarAdjustHandle
1197
    {
1198

1199
        private CT_AdjPoint2D posField;
1200

1201
        private string gdRefRField;
1202

1203
        private string minRField;
1204

1205
        private string maxRField;
1206

1207
        private string gdRefAngField;
1208

1209
        private string minAngField;
1210

1211
        private string maxAngField;
1212

1213
        [XmlElement(Order = 0)]
1214
        public CT_AdjPoint2D pos
1215
        {
1216
            get
1217
            {
1218
                return this.posField;
1219
            }
1220
            set
1221
            {
1222
                this.posField = value;
1223
            }
1224
        }
1225

1226

1227
        [XmlAttribute(DataType = "token")]
1228
        public string gdRefR
1229
        {
1230
            get
1231
            {
1232
                return this.gdRefRField;
1233
            }
1234
            set
1235
            {
1236
                this.gdRefRField = value;
1237
            }
1238
        }
1239

1240

1241
        [XmlAttribute]
1242
        public string minR
1243
        {
1244
            get
1245
            {
1246
                return this.minRField;
1247
            }
1248
            set
1249
            {
1250
                this.minRField = value;
1251
            }
1252
        }
1253

1254

1255
        [XmlAttribute]
1256
        public string maxR
1257
        {
1258
            get
1259
            {
1260
                return this.maxRField;
1261
            }
1262
            set
1263
            {
1264
                this.maxRField = value;
1265
            }
1266
        }
1267

1268

1269
        [XmlAttribute(DataType = "token")]
1270
        public string gdRefAng
1271
        {
1272
            get
1273
            {
1274
                return this.gdRefAngField;
1275
            }
1276
            set
1277
            {
1278
                this.gdRefAngField = value;
1279
            }
1280
        }
1281

1282

1283
        [XmlAttribute]
1284
        public string minAng
1285
        {
1286
            get
1287
            {
1288
                return this.minAngField;
1289
            }
1290
            set
1291
            {
1292
                this.minAngField = value;
1293
            }
1294
        }
1295

1296

1297
        [XmlAttribute]
1298
        public string maxAng
1299
        {
1300
            get
1301
            {
1302
                return this.maxAngField;
1303
            }
1304
            set
1305
            {
1306
                this.maxAngField = value;
1307
            }
1308
        }
1309
    }
1310

1311

1312
    [Serializable]
1313
    //[DebuggerStepThrough]
1314
    [System.ComponentModel.DesignerCategory("code")]
1315
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1316
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1317
    public class CT_ConnectionSite
1318
    {
1319

1320
        private CT_AdjPoint2D posField;
1321

1322
        private string angField;
1323
        public static CT_ConnectionSite Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1324
        {
1325
            if (node == null)
1326
                return null;
1327
            CT_ConnectionSite ctObj = new CT_ConnectionSite();
1328
            ctObj.ang = XmlHelper.ReadString(node.Attributes["ang"]);
1329
            foreach (XmlNode childNode in node.ChildNodes)
1330
            {
1331
                if (childNode.LocalName == "pos")
1332
                    ctObj.pos = CT_AdjPoint2D.Parse(childNode, namespaceManager);
1333
            }
1334
            return ctObj;
1335
        }
1336

1337

1338

1339
        internal void Write(StreamWriter sw, string nodeName)
1340
        {
1341
            sw.Write(string.Format("<a:{0}", nodeName));
1342
            XmlHelper.WriteAttribute(sw, "ang", this.ang);
1343
            sw.Write(">");
1344
            if (this.pos != null)
1345
                this.pos.Write(sw, "pos");
1346
            sw.Write(string.Format("</a:{0}>", nodeName));
1347
        }
1348

1349
        [XmlElement(Order = 0)]
1350
        public CT_AdjPoint2D pos
1351
        {
1352
            get
1353
            {
1354
                return this.posField;
1355
            }
1356
            set
1357
            {
1358
                this.posField = value;
1359
            }
1360
        }
1361

1362

1363
        [XmlAttribute]
1364
        public string ang
1365
        {
1366
            get
1367
            {
1368
                return this.angField;
1369
            }
1370
            set
1371
            {
1372
                this.angField = value;
1373
            }
1374
        }
1375
    }
1376

1377

1378
    [Serializable]
1379
    //[System.Diagnostics.DebuggerStepThrough]
1380
    [System.ComponentModel.DesignerCategory("code")]
1381
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1382
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1383
    public class CT_AdjustHandleList
1384
    {
1385

1386
        private object[] itemsField;
1387

1388

1389
        [XmlElement("ahPolar", typeof(CT_PolarAdjustHandle), Order = 0)]
1390
        [XmlElement("ahXY", typeof(CT_XYAdjustHandle), Order = 0)]
1391
        public object[] Items
1392
        {
1393
            get
1394
            {
1395
                return this.itemsField;
1396
            }
1397
            set
1398
            {
1399
                this.itemsField = value;
1400
            }
1401
        }
1402
    }
1403

1404

1405
    [Serializable]
1406
    //[System.Diagnostics.DebuggerStepThrough]
1407
    [System.ComponentModel.DesignerCategory("code")]
1408
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1409
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1410
    public class CT_ConnectionSiteList
1411
    {
1412

1413
        private List<CT_ConnectionSite> cxnField;
1414

1415

1416
        //[XmlElement("cxn", Order = 0)]
1417
        public List<CT_ConnectionSite> cxn
1418
        {
1419
            get
1420
            {
1421
                return this.cxnField;
1422
            }
1423
            set
1424
            {
1425
                this.cxnField = value;
1426
            }
1427
        }
1428
        internal static CT_ConnectionSiteList Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1429
        {
1430
            CT_ConnectionSiteList cxnLst = new CT_ConnectionSiteList();
1431
            cxnLst.cxnField = new List<CT_ConnectionSite>();
1432
            foreach (XmlNode childNode in node.ChildNodes)
1433
            {
1434
                if (childNode.LocalName == "cxn")
1435
                    cxnLst.cxnField.Add(CT_ConnectionSite.Parse(childNode, namespaceManager));
1436
            }
1437
            return cxnLst;
1438
        }
1439

1440

1441

1442
        internal void Write(StreamWriter sw, string nodeName)
1443
        {
1444
            sw.Write("<a:{0}>", nodeName);
1445
            if (this.cxnField != null)
1446
            {
1447
                foreach (CT_ConnectionSite gg in cxnField)
1448
                {
1449
                    gg.Write(sw, "cxn");
1450
                }
1451
            }
1452
            sw.Write("</a:{0}>", nodeName);
1453

1454
        }
1455
    }
1456

1457

1458
    [Serializable]
1459
    //[System.Diagnostics.DebuggerStepThrough]
1460
    [System.ComponentModel.DesignerCategory("code")]
1461
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1462
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1463
    public class CT_Connection
1464
    {
1465

1466
        private uint idField;
1467

1468
        private uint idxField;
1469
        public static CT_Connection Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1470
        {
1471
            if (node == null)
1472
                return null;
1473
            CT_Connection ctObj = new CT_Connection();
1474
            ctObj.id = XmlHelper.ReadUInt(node.Attributes["id"]);
1475
            ctObj.idx = XmlHelper.ReadUInt(node.Attributes["idx"]);
1476
            return ctObj;
1477
        }
1478

1479

1480

1481
        internal void Write(StreamWriter sw, string nodeName)
1482
        {
1483
            sw.Write(string.Format("<a:{0}", nodeName));
1484
            XmlHelper.WriteAttribute(sw, "id", this.id);
1485
            XmlHelper.WriteAttribute(sw, "idx", this.idx, true);
1486
            sw.Write("/>");
1487
        }
1488

1489

1490
        [XmlAttribute]
1491
        public uint id
1492
        {
1493
            get
1494
            {
1495
                return this.idField;
1496
            }
1497
            set
1498
            {
1499
                this.idField = value;
1500
            }
1501
        }
1502

1503

1504
        [XmlAttribute]
1505
        public uint idx
1506
        {
1507
            get
1508
            {
1509
                return this.idxField;
1510
            }
1511
            set
1512
            {
1513
                this.idxField = value;
1514
            }
1515
        }
1516
    }
1517

1518

1519
    [Serializable]
1520
    //[System.Diagnostics.DebuggerStepThrough]
1521
    [System.ComponentModel.DesignerCategory("code")]
1522
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1523
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1524
    public class CT_Path2DMoveTo
1525
    {
1526

1527
        private CT_AdjPoint2D ptField = null;
1528
        public CT_Path2DMoveTo()
1529
        {
1530
            this.ptField = new CT_AdjPoint2D();
1531
        }
1532

1533
		public static CT_Path2DMoveTo Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1534
        {
1535
			CT_Path2DMoveTo obj = new CT_Path2DMoveTo();
1536
			foreach(XmlNode childNode in node.ChildNodes) {
1537
				if(childNode.LocalName == "pt") {
1538
					obj.ptField = CT_AdjPoint2D.Parse(childNode, namespaceManager);
1539
				}	
1540
			}
1541
			return obj;
1542
		}
1543

1544
		internal void Write(StreamWriter sw, string nodeName) {
1545

1546
			sw.Write("<a:{0}>", nodeName);
1547

1548
			if(this.ptField != null) {
1549
				this.ptField.Write(sw, "pt");
1550
			}
1551
			sw.Write("</a:{0}>", nodeName);
1552
		}
1553

1554
		[XmlElement(Order = 0)]
1555
        public CT_AdjPoint2D pt
1556
        {
1557
            get
1558
            {
1559
                return this.ptField;
1560
            }
1561
            set
1562
            {
1563
                this.ptField = value;
1564
            }
1565
        }
1566
    }
1567

1568

1569
    [Serializable]
1570
    //[System.Diagnostics.DebuggerStepThrough]
1571
    [System.ComponentModel.DesignerCategory("code")]
1572
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1573
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1574
    public class CT_Path2DLineTo
1575
    {
1576

1577
        private CT_AdjPoint2D ptField;
1578

1579
        public CT_Path2DLineTo()
1580
        {
1581
            this.ptField = new CT_AdjPoint2D();
1582
        }
1583

1584
        [XmlElement(Order = 0)]
1585
        public CT_AdjPoint2D pt
1586
        {
1587
            get
1588
            {
1589
                return this.ptField;
1590
            }
1591
            set
1592
            {
1593
                this.ptField = value;
1594
            }
1595
        }
1596
    }
1597

1598

1599
    [Serializable]
1600
    //[System.Diagnostics.DebuggerStepThrough]
1601
    [System.ComponentModel.DesignerCategory("code")]
1602
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1603
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1604
    public class CT_Path2DArcTo
1605
    {
1606

1607
        private string wrField;
1608

1609
        private string hrField;
1610

1611
        private string stAngField;
1612

1613
        private string swAngField;
1614

1615

1616
        [XmlAttribute]
1617
        public string wR
1618
        {
1619
            get
1620
            {
1621
                return this.wrField;
1622
            }
1623
            set
1624
            {
1625
                this.wrField = value;
1626
            }
1627
        }
1628

1629

1630
        [XmlAttribute]
1631
        public string hR
1632
        {
1633
            get
1634
            {
1635
                return this.hrField;
1636
            }
1637
            set
1638
            {
1639
                this.hrField = value;
1640
            }
1641
        }
1642

1643

1644
        [XmlAttribute]
1645
        public string stAng
1646
        {
1647
            get
1648
            {
1649
                return this.stAngField;
1650
            }
1651
            set
1652
            {
1653
                this.stAngField = value;
1654
            }
1655
        }
1656

1657

1658
        [XmlAttribute]
1659
        public string swAng
1660
        {
1661
            get
1662
            {
1663
                return this.swAngField;
1664
            }
1665
            set
1666
            {
1667
                this.swAngField = value;
1668
            }
1669
        }
1670
    }
1671

1672

1673
    [Serializable]
1674
    //[System.Diagnostics.DebuggerStepThrough]
1675
    [System.ComponentModel.DesignerCategory("code")]
1676
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1677
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1678
    public class CT_Path2DClose
1679
    {
1680
    }
1681

1682

1683
    [Serializable]
1684
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1685
    public enum ST_PathFillMode
1686
    {
1687

1688

1689
        none,
1690

1691

1692
        norm,
1693

1694

1695
        lighten,
1696

1697

1698
        lightenLess,
1699

1700

1701
        darken,
1702

1703

1704
        darkenLess,
1705
    }
1706

1707

1708
    [Serializable]
1709
    //[System.Diagnostics.DebuggerStepThrough]
1710
    [System.ComponentModel.DesignerCategory("code")]
1711
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1712
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1713
    public class CT_Path2D
1714
    {
1715

1716
        //private object[] itemsField;
1717

1718
        //private ItemsChoiceType[] itemsElementNameField;
1719

1720
        private long wField;
1721

1722
        private long hField;
1723

1724
        private ST_PathFillMode fillField;
1725

1726
        private bool strokeField;
1727

1728
        private bool extrusionOkField;
1729

1730
		private CT_Path2DMoveTo moveToFeild = null;
1731

1732
		private List<CT_Path2DCubicBezierTo> cubicBezToLst = null;
1733

1734
		public static CT_Path2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1735
        {
1736
            if (node == null)
1737
                return null;
1738
            CT_Path2D ctObj = new CT_Path2D();
1739
            ctObj.w = XmlHelper.ReadLong(node.Attributes["w"]);
1740
            ctObj.h = XmlHelper.ReadLong(node.Attributes["h"]);
1741
            if (node.Attributes["fill"] != null)
1742
                ctObj.fill = (ST_PathFillMode)Enum.Parse(typeof(ST_PathFillMode), node.Attributes["fill"].Value);
1743
            ctObj.stroke = XmlHelper.ReadBool(node.Attributes["stroke"], true);
1744
            ctObj.extrusionOk = XmlHelper.ReadBool(node.Attributes["extrusionOk"]);
1745
            foreach(XmlNode childNode in node.ChildNodes)
1746
            {
1747
            //    if(childNode.LocalName == "ItemsElementName")
1748
            //        ctObj.ItemsElementName = ItemsChoiceType[].Parse(childNode, namespaceManager);
1749
                if(childNode.LocalName == "moveTo")
1750
                    ctObj.moveToFeild = CT_Path2DMoveTo.Parse(childNode, namespaceManager);
1751
				if(childNode.LocalName == "cubicBezTo")
1752
                    ctObj.cubicBezToLst.Add( CT_Path2DCubicBezierTo.Parse(childNode, namespaceManager));
1753
			}
1754
			return ctObj;
1755
        }
1756

1757

1758

1759
        internal void Write(StreamWriter sw, string nodeName)
1760
        {
1761
            sw.Write(string.Format("<a:{0}", nodeName));
1762
            XmlHelper.WriteAttribute(sw, "w", this.w);
1763
            XmlHelper.WriteAttribute(sw, "h", this.h);
1764
            XmlHelper.WriteAttribute(sw, "fill", this.fill.ToString());
1765
            XmlHelper.WriteAttribute(sw, "stroke", this.stroke);
1766
            XmlHelper.WriteAttribute(sw, "extrusionOk", this.extrusionOk);
1767
            sw.Write(">");
1768
			//if (this.ItemsElementName != null)
1769
			//    this.ItemsElementName.Write(sw, "ItemsElementName");
1770
			if(this.moveToFeild != null)
1771
				moveToFeild.Write(sw, "moveTo");
1772
			if(cubicBezToLst.Count > 0) {
1773
				foreach(CT_Path2DCubicBezierTo cub in cubicBezToLst) {
1774
					cub.Write(sw, "cubicBezTo");
1775
				}
1776
			}
1777
			sw.Write(string.Format("</a:{0}>", nodeName));
1778
        }
1779

1780
        public CT_Path2D()
1781
        {
1782
            this.wField = ((long)(0));
1783
            this.hField = ((long)(0));
1784
            this.fillField = ST_PathFillMode.norm;
1785
            this.strokeField = true;
1786
            this.extrusionOkField = true;
1787

1788
			this.cubicBezToLst = new List<CT_Path2DCubicBezierTo>();
1789
		}
1790

1791

1792
        //[XmlElement("arcTo", typeof(CT_Path2DArcTo))]
1793
        //[XmlElement("close", typeof(CT_Path2DClose))]
1794
        //[XmlElement("cubicBezTo", typeof(CT_Path2DCubicBezierTo))]
1795
        //[XmlElement("lnTo", typeof(CT_Path2DLineTo))]
1796
        //[XmlElement("moveTo", typeof(CT_Path2DMoveTo))]
1797
        //[XmlElement("quadBezTo", typeof(CT_Path2DQuadBezierTo))]
1798
        //[XmlChoiceIdentifier("ItemsElementName")]
1799
        //public object[] Items
1800
        //{
1801
        //    get
1802
        //    {
1803
        //        return this.itemsField;
1804
        //    }
1805
        //    set
1806
        //    {
1807
        //        this.itemsField = value;
1808
        //    }
1809
        //}
1810

1811

1812
        //[XmlElement("ItemsElementName")]
1813
        //[XmlIgnore]
1814
        //public ItemsChoiceType[] ItemsElementName
1815
        //{
1816
        //    get
1817
        //    {
1818
        //        return this.itemsElementNameField;
1819
        //    }
1820
        //    set
1821
        //    {
1822
        //        this.itemsElementNameField = value;
1823
        //    }
1824
        //}
1825

1826
        public CT_Path2DMoveTo moveto { get => moveToFeild; set => moveToFeild = value; }
1827
        public List<CT_Path2DCubicBezierTo> cubicBezTo { get => this.cubicBezToLst; }
1828

1829
        [XmlAttribute]
1830
        [DefaultValue(typeof(long), "0")]
1831
        public long w
1832
        {
1833
            get
1834
            {
1835
                return this.wField;
1836
            }
1837
            set
1838
            {
1839
                this.wField = value;
1840
            }
1841
        }
1842

1843

1844
        [XmlAttribute]
1845
        [DefaultValue(typeof(long), "0")]
1846
        public long h
1847
        {
1848
            get
1849
            {
1850
                return this.hField;
1851
            }
1852
            set
1853
            {
1854
                this.hField = value;
1855
            }
1856
        }
1857

1858

1859
        [XmlAttribute]
1860
        [DefaultValue(ST_PathFillMode.norm)]
1861
        public ST_PathFillMode fill
1862
        {
1863
            get
1864
            {
1865
                return this.fillField;
1866
            }
1867
            set
1868
            {
1869
                this.fillField = value;
1870
            }
1871
        }
1872

1873

1874
        [XmlAttribute]
1875
        [DefaultValue(true)]
1876
        public bool stroke
1877
        {
1878
            get
1879
            {
1880
                return this.strokeField;
1881
            }
1882
            set
1883
            {
1884
                this.strokeField = value;
1885
            }
1886
        }
1887

1888

1889
        [XmlAttribute]
1890
        [DefaultValue(true)]
1891
        public bool extrusionOk
1892
        {
1893
            get
1894
            {
1895
                return this.extrusionOkField;
1896
            }
1897
            set
1898
            {
1899
                this.extrusionOkField = value;
1900
            }
1901
        }
1902
    }
1903

1904

1905
    [Serializable]
1906
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IncludeInSchema = false)]
1907
    public enum ItemsChoiceType
1908
    {
1909

1910

1911
        arcTo,
1912

1913

1914
        close,
1915

1916

1917
        cubicBezTo,
1918

1919

1920
        lnTo,
1921

1922

1923
        moveTo,
1924

1925

1926
        quadBezTo,
1927
    }
1928

1929

1930
    [Serializable]
1931
    //[System.Diagnostics.DebuggerStepThrough]
1932
    [System.ComponentModel.DesignerCategory("code")]
1933
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1934
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1935
    public class CT_Path2DList
1936
    {
1937

1938
        private List<CT_Path2D> pathField;
1939

1940

1941
        //[XmlElement("path", Order = 0)]
1942
        public List<CT_Path2D> path
1943
        {
1944
            get
1945
            {
1946
                return this.pathField;
1947
            }
1948
            set
1949
            {
1950
                this.pathField = value;
1951
            }
1952
        }
1953

1954
        internal static CT_Path2DList Parse(XmlNode node, XmlNamespaceManager namespaceManager)
1955
        {
1956
            CT_Path2DList pathList = new CT_Path2DList();
1957
            pathList.path = new List<CT_Path2D>();
1958
            foreach (XmlNode childNode in node.ChildNodes)
1959
            {
1960
                if (childNode.LocalName == "path")
1961
                    pathList.pathField.Add(CT_Path2D.Parse(childNode, namespaceManager));
1962
            }
1963
            return pathList;
1964
        }
1965

1966

1967

1968
        internal void Write(StreamWriter sw, string nodeName)
1969
        {
1970
            sw.Write("<a:{0}>", nodeName);
1971
            if (this.pathField != null)
1972
            {
1973
                foreach (CT_Path2D gg in pathField)
1974
                {
1975
                    gg.Write(sw, "path");
1976
                }
1977
            }
1978
            sw.Write("</a:{0}>", nodeName);
1979

1980
        }
1981
    }
1982

1983

1984
    [Serializable]
1985
    //[System.Diagnostics.DebuggerStepThrough]
1986
    [System.ComponentModel.DesignerCategory("code")]
1987
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
1988
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
1989
    public class CT_PresetGeometry2D
1990
    {
1991

1992
        private CT_GeomGuideList avLstField;
1993

1994
        private ST_ShapeType prstField;
1995

1996
        public CT_GeomGuideList AddNewAvLst()
1997
        {
1998
            this.avLstField = new CT_GeomGuideList();
1999
            return this.avLstField;
2000
        }
2001

2002
        public static CT_PresetGeometry2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2003
        {
2004
            if (node == null)
2005
                return null;
2006
            CT_PresetGeometry2D ctObj = new CT_PresetGeometry2D();
2007
            if (node.Attributes["prst"] != null)
2008
                ctObj.prst = (ST_ShapeType)Enum.Parse(typeof(ST_ShapeType), node.Attributes["prst"].Value);
2009
            if (node.ChildNodes != null)
2010
            {
2011
                foreach (XmlNode childNode in node.ChildNodes)
2012
                {
2013
                    if (childNode.LocalName == "avLst")
2014
                    {
2015
                        ctObj.avLstField = CT_GeomGuideList.Parse(childNode, namespaceManager);
2016
                    }
2017
                }
2018
            }
2019
            return ctObj;
2020
        }
2021

2022

2023

2024
        internal void Write(StreamWriter sw, string nodeName)
2025
        {
2026
            sw.Write(string.Format("<a:{0}", nodeName));
2027
            XmlHelper.WriteAttribute(sw, "prst", this.prst.ToString());
2028
            sw.Write(">");
2029
            if (this.avLst != null)
2030
            {
2031
                avLst.Write(sw, "avLst");
2032
            }
2033
            sw.Write(string.Format("</a:{0}>", nodeName));
2034
        }
2035

2036

2037

2038
        [XmlElement(Order = 0)]
2039
        public CT_GeomGuideList avLst
2040
        {
2041
            get
2042
            {
2043
                return this.avLstField;
2044
            }
2045
            set
2046
            {
2047
                this.avLstField =value;
2048
            }
2049
        }
2050

2051

2052
        [XmlAttribute]
2053
        public ST_ShapeType prst
2054
        {
2055
            get
2056
            {
2057
                return this.prstField;
2058
            }
2059
            set
2060
            {
2061
                this.prstField = value;
2062
            }
2063
        }
2064
    }
2065

2066

2067
    [Serializable]
2068
    //[System.Diagnostics.DebuggerStepThrough]
2069
    [System.ComponentModel.DesignerCategory("code")]
2070
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
2071
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
2072
    public class CT_PresetTextShape
2073
    {
2074
        public static CT_PresetTextShape Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2075
        {
2076
            if (node == null)
2077
                return null;
2078
            CT_PresetTextShape ctObj = new CT_PresetTextShape();
2079
            if (node.Attributes["prst"] != null)
2080
                ctObj.prst = (ST_TextShapeType)Enum.Parse(typeof(ST_TextShapeType), node.Attributes["prst"].Value);
2081
            ctObj.avLst = new List<CT_GeomGuide>();
2082
            foreach (XmlNode childNode in node.ChildNodes)
2083
            {
2084
                if (childNode.LocalName == "avLst")
2085
                    ctObj.avLst.Add(CT_GeomGuide.Parse(childNode, namespaceManager));
2086
            }
2087
            return ctObj;
2088
        }
2089

2090

2091

2092
        internal void Write(StreamWriter sw, string nodeName)
2093
        {
2094
            sw.Write(string.Format("<a:{0}", nodeName));
2095
            XmlHelper.WriteAttribute(sw, "prst", this.prst.ToString());
2096
            sw.Write(">");
2097
            if (this.avLst != null)
2098
            {
2099
                foreach (CT_GeomGuide x in this.avLst)
2100
                {
2101
                    x.Write(sw, "avLst");
2102
                }
2103
            }
2104
            sw.Write(string.Format("</a:{0}>", nodeName));
2105
        }
2106

2107
        private List<CT_GeomGuide> avLstField;
2108

2109
        private ST_TextShapeType prstField;
2110

2111
        [XmlArray(Order = 0)]
2112
        [XmlArrayItem("gd", IsNullable = false)]
2113
        public List<CT_GeomGuide> avLst
2114
        {
2115
            get
2116
            {
2117
                return this.avLstField;
2118
            }
2119
            set
2120
            {
2121
                this.avLstField = value;
2122
            }
2123
        }
2124

2125

2126
        [XmlAttribute]
2127
        public ST_TextShapeType prst
2128
        {
2129
            get
2130
            {
2131
                return this.prstField;
2132
            }
2133
            set
2134
            {
2135
                this.prstField = value;
2136
            }
2137
        }
2138
    }
2139

2140

2141
    [Serializable]
2142
    //[System.Diagnostics.DebuggerStepThrough]
2143
    [System.ComponentModel.DesignerCategory("code")]
2144
    [XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]
2145
    [XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]
2146
    public class CT_CustomGeometry2D
2147
    {
2148

2149
        private CT_GeomGuideList avLstField;
2150

2151
        private CT_GeomGuideList gdLstField;
2152

2153
        private List<object> ahLstField;
2154

2155
        private CT_ConnectionSiteList cxnLstField;
2156

2157
        private CT_GeomRect rectField;
2158

2159
        private CT_Path2DList pathLstField;
2160
        public static CT_CustomGeometry2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)
2161
        {
2162
            if (node == null)
2163
                return null;
2164
            CT_CustomGeometry2D ctObj = new CT_CustomGeometry2D();
2165
            ctObj.ahLst = new List<Object>();
2166
            foreach (XmlNode childNode in node.ChildNodes)
2167
            {
2168
                if (childNode.LocalName == "rect")
2169
                    ctObj.rect = CT_GeomRect.Parse(childNode, namespaceManager);
2170
                else if (childNode.LocalName == "avLst")
2171
                    ctObj.avLst = CT_GeomGuideList.Parse(childNode, namespaceManager);
2172
                else if (childNode.LocalName == "gdLst")
2173
                    ctObj.gdLst = CT_GeomGuideList.Parse(childNode, namespaceManager);
2174
                //else if (childNode.LocalName == "ahLst")
2175
                //    ctObj.ahLst.Add(Object.Parse(childNode, namespaceManager));
2176
                else if (childNode.LocalName == "cxnLst")
2177
                    ctObj.cxnLst = CT_ConnectionSiteList.Parse(childNode, namespaceManager);
2178
                else if (childNode.LocalName == "pathLst")
2179
                    ctObj.pathLst = CT_Path2DList.Parse(childNode, namespaceManager);
2180
            }
2181
            return ctObj;
2182
        }
2183

2184

2185

2186
        internal void Write(StreamWriter sw, string nodeName)
2187
        {
2188
            sw.Write(string.Format("<a:{0}", nodeName));
2189
            sw.Write(">");
2190
            if (this.rect != null)
2191
                this.rect.Write(sw, "rect");
2192
            if (this.avLst != null)
2193
            {
2194
                this.avLst.Write(sw, "avLst");
2195
            }
2196
            if (this.gdLst != null)
2197
            {
2198
                this.gdLst.Write(sw, "gdLst");
2199
            }
2200
            if (this.cxnLst != null)
2201
            {
2202
                this.cxnLstField.Write(sw, "cxnLst");
2203
            }
2204
            if (this.pathLst != null)
2205
            {
2206
                this.pathLstField.Write(sw, "pathLst");
2207
            }
2208
            sw.Write(string.Format("</a:{0}>", nodeName));
2209
        }
2210

2211
        [XmlElement(Order = 0)]
2212
        //[XmlArrayItem("gd", IsNullable = false)]
2213
        public CT_GeomGuideList avLst
2214
        {
2215
            get
2216
            {
2217
                return this.avLstField;
2218
            }
2219
            set
2220
            {
2221
                this.avLstField = value;
2222
            }
2223
        }
2224

2225
        [XmlElement(Order = 1)]
2226
        //[XmlArrayItem("gd", IsNullable = false)]
2227
        public CT_GeomGuideList gdLst
2228
        {
2229
            get
2230
            {
2231
                return this.gdLstField;
2232
            }
2233
            set
2234
            {
2235
                this.gdLstField = value;
2236
            }
2237
        }
2238

2239
        [XmlArray(Order = 2)]
2240
        [XmlArrayItem("ahPolar", typeof(CT_PolarAdjustHandle), IsNullable = false)]
2241
        [XmlArrayItem("ahXY", typeof(CT_XYAdjustHandle), IsNullable = false)]
2242
        public List<object> ahLst
2243
        {
2244
            get
2245
            {
2246
                return this.ahLstField;
2247
            }
2248
            set
2249
            {
2250
                this.ahLstField = value;
2251
            }
2252
        }
2253

2254
        [XmlElement(Order = 3)]
2255
        //[XmlArrayItem("cxn", IsNullable = false)]
2256
        public CT_ConnectionSiteList cxnLst
2257
        {
2258
            get
2259
            {
2260
                return this.cxnLstField;
2261
            }
2262
            set
2263
            {
2264
                this.cxnLstField = value;
2265
            }
2266
        }
2267

2268
        [XmlElement(Order = 4)]
2269
        public CT_GeomRect rect
2270
        {
2271
            get
2272
            {
2273
                return this.rectField;
2274
            }
2275
            set
2276
            {
2277
                this.rectField = value;
2278
            }
2279
        }
2280

2281
        [XmlElement(Order = 5)]
2282
        //[XmlArrayItem("path", IsNullable = false)]
2283
        public CT_Path2DList pathLst
2284
        {
2285
            get
2286
            {
2287
                return this.pathLstField;
2288
            }
2289
            set
2290
            {
2291
                this.pathLstField = value;
2292
            }
2293
        }
2294
    }
2295
}
2296

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

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

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

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