npoi
2295 строк · 45.2 Кб
1using System;2using System.Collections.Generic;3using System.ComponentModel;4using System.Xml.Serialization;5using System.Diagnostics;6using System.Xml;7using NPOI.OpenXml4Net.Util;8using System.IO;9
10namespace NPOI.OpenXmlFormats.Dml11{
12
13
14
15[Serializable]16[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]17public enum ST_ShapeType : int18{19none,20
21line,22
23
24lineInv,25
26
27triangle,28
29
30rtTriangle,31
32
33rect,34
35
36diamond,37
38
39parallelogram,40
41
42trapezoid,43
44
45nonIsoscelesTrapezoid,46
47
48pentagon,49
50
51hexagon,52
53
54heptagon,55
56
57octagon,58
59
60decagon,61
62
63dodecagon,64
65
66star4,67
68
69star5,70
71
72star6,73
74
75star7,76
77
78star8,79
80
81star10,82
83
84star12,85
86
87star16,88
89
90star24,91
92
93star32,94
95
96roundRect,97
98
99round1Rect,100
101
102round2SameRect,103
104
105round2DiagRect,106
107
108snipRoundRect,109
110
111snip1Rect,112
113
114snip2SameRect,115
116
117snip2DiagRect,118
119
120plaque,121
122
123ellipse,124
125
126teardrop,127
128
129homePlate,130
131
132chevron,133
134
135pieWedge,136
137
138pie,139
140
141blockArc,142
143
144donut,145
146
147noSmoking,148
149
150rightArrow,151
152
153leftArrow,154
155
156upArrow,157
158
159downArrow,160
161
162stripedRightArrow,163
164
165notchedRightArrow,166
167
168bentUpArrow,169
170
171leftRightArrow,172
173
174upDownArrow,175
176
177leftUpArrow,178
179
180leftRightUpArrow,181
182
183quadArrow,184
185
186leftArrowCallout,187
188
189rightArrowCallout,190
191
192upArrowCallout,193
194
195downArrowCallout,196
197
198leftRightArrowCallout,199
200
201upDownArrowCallout,202
203
204quadArrowCallout,205
206
207bentArrow,208
209
210uturnArrow,211
212
213circularArrow,214
215
216leftCircularArrow,217
218
219leftRightCircularArrow,220
221
222curvedRightArrow,223
224
225curvedLeftArrow,226
227
228curvedUpArrow,229
230
231curvedDownArrow,232
233
234swooshArrow,235
236
237cube,238
239
240can,241
242
243lightningBolt,244
245
246heart,247
248
249sun,250
251
252moon,253
254
255smileyFace,256
257
258irregularSeal1,259
260
261irregularSeal2,262
263
264foldedCorner,265
266
267bevel,268
269
270frame,271
272
273halfFrame,274
275
276corner,277
278
279diagStripe,280
281
282chord,283
284
285arc,286
287
288leftBracket,289
290
291rightBracket,292
293
294leftBrace,295
296
297rightBrace,298
299
300bracketPair,301
302
303bracePair,304
305
306straightConnector1,307
308
309bentConnector2,310
311
312bentConnector3,313
314
315bentConnector4,316
317
318bentConnector5,319
320
321curvedConnector2,322
323
324curvedConnector3,325
326
327curvedConnector4,328
329
330curvedConnector5,331
332
333callout1,334
335
336callout2,337
338
339callout3,340
341
342accentCallout1,343
344
345accentCallout2,346
347
348accentCallout3,349
350
351borderCallout1,352
353
354borderCallout2,355
356
357borderCallout3,358
359
360accentBorderCallout1,361
362
363accentBorderCallout2,364
365
366accentBorderCallout3,367
368
369wedgeRectCallout,370
371
372wedgeRoundRectCallout,373
374
375wedgeEllipseCallout,376
377
378cloudCallout,379
380
381cloud,382
383
384ribbon,385
386
387ribbon2,388
389
390ellipseRibbon,391
392
393ellipseRibbon2,394
395
396leftRightRibbon,397
398
399verticalScroll,400
401
402horizontalScroll,403
404
405wave,406
407
408doubleWave,409
410
411plus,412
413
414flowChartProcess,415
416
417flowChartDecision,418
419
420flowChartInputOutput,421
422
423flowChartPredefinedProcess,424
425
426flowChartInternalStorage,427
428
429flowChartDocument,430
431
432flowChartMultidocument,433
434
435flowChartTerminator,436
437
438flowChartPreparation,439
440
441flowChartManualInput,442
443
444flowChartManualOperation,445
446
447flowChartConnector,448
449
450flowChartPunchedCard,451
452
453flowChartPunchedTape,454
455
456flowChartSummingJunction,457
458
459flowChartOr,460
461
462flowChartCollate,463
464
465flowChartSort,466
467
468flowChartExtract,469
470
471flowChartMerge,472
473
474flowChartOfflineStorage,475
476
477flowChartOnlineStorage,478
479
480flowChartMagneticTape,481
482
483flowChartMagneticDisk,484
485
486flowChartMagneticDrum,487
488
489flowChartDisplay,490
491
492flowChartDelay,493
494
495flowChartAlternateProcess,496
497
498flowChartOffpageConnector,499
500
501actionButtonBlank,502
503
504actionButtonHome,505
506
507actionButtonHelp,508
509
510actionButtonInformation,511
512
513actionButtonForwardNext,514
515
516actionButtonBackPrevious,517
518
519actionButtonEnd,520
521
522actionButtonBeginning,523
524
525actionButtonReturn,526
527
528actionButtonDocument,529
530
531actionButtonSound,532
533
534actionButtonMovie,535
536
537gear6,538
539
540gear9,541
542
543funnel,544
545
546mathPlus,547
548
549mathMinus,550
551
552mathMultiply,553
554
555mathDivide,556
557
558mathEqual,559
560
561mathNotEqual,562
563
564cornerTabs,565
566
567squareTabs,568
569
570plaqueTabs,571
572
573chartX,574
575
576chartStar,577
578
579chartPlus,580}581
582
583[Serializable]584[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]585public enum ST_TextShapeType586{587
588
589textNoShape,590
591
592textPlain,593
594
595textStop,596
597
598textTriangle,599
600
601textTriangleInverted,602
603
604textChevron,605
606
607textChevronInverted,608
609
610textRingInside,611
612
613textRingOutside,614
615
616textArchUp,617
618
619textArchDown,620
621
622textCircle,623
624
625textButton,626
627
628textArchUpPour,629
630
631textArchDownPour,632
633
634textCirclePour,635
636
637textButtonPour,638
639
640textCurveUp,641
642
643textCurveDown,644
645
646textCanUp,647
648
649textCanDown,650
651
652textWave1,653
654
655textWave2,656
657
658textDoubleWave1,659
660
661textWave4,662
663
664textInflate,665
666
667textDeflate,668
669
670textInflateBottom,671
672
673textDeflateBottom,674
675
676textInflateTop,677
678
679textDeflateTop,680
681
682textDeflateInflate,683
684
685textDeflateInflateDeflate,686
687
688textFadeRight,689
690
691textFadeLeft,692
693
694textFadeUp,695
696
697textFadeDown,698
699
700textSlantUp,701
702
703textSlantDown,704
705
706textCascadeUp,707
708
709textCascadeDown,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)]718public class CT_GeomGuide719{720
721private string nameField;722
723private string fmlaField;724
725public static CT_GeomGuide Parse(XmlNode node, XmlNamespaceManager namespaceManager)726{727if (node == null)728return null;729CT_GeomGuide ctObj = new CT_GeomGuide();730ctObj.name = XmlHelper.ReadString(node.Attributes["name"]);731ctObj.fmla = XmlHelper.ReadString(node.Attributes["fmla"]);732return ctObj;733}734
735
736
737internal void Write(StreamWriter sw, string nodeName)738{739sw.Write(string.Format("<a:{0}", nodeName));740XmlHelper.WriteAttribute(sw, "name", this.name);741XmlHelper.WriteAttribute(sw, "fmla", this.fmla);742sw.Write("/>");743}744
745[XmlAttribute(DataType = "token")]746public string name747{748get749{750return this.nameField;751}752set753{754this.nameField = value;755}756}757
758
759[XmlAttribute]760public string fmla761{762get763{764return this.fmlaField;765}766set767{768this.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)]779public class CT_Path2DCubicBezierTo780{781
782private List<CT_AdjPoint2D> pts = null;783
784public static CT_Path2DCubicBezierTo Parse(XmlNode node, XmlNamespaceManager namespaceManager)785{786CT_Path2DCubicBezierTo obj = new CT_Path2DCubicBezierTo();787foreach(XmlNode childNode in node.ChildNodes) {788if(childNode.LocalName == "pt") {789obj.pts.Add(CT_AdjPoint2D.Parse(childNode, namespaceManager));790}791}792return obj;793}794
795internal void Write(StreamWriter sw, string nodeName) {796
797sw.Write("<a:{0}>", nodeName);798foreach(var cub in pts) {799cub.Write(sw, "pt");800}801sw.Write("</a:{0}>", nodeName);802}803
804public CT_Path2DCubicBezierTo() {805pts = new List<CT_AdjPoint2D>();806}807
808[XmlElement("pt", Order = 0)]809public List<CT_AdjPoint2D> pt810{811get812{813return this.pts;814}815set816{817this.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)]828public class CT_AdjPoint2D829{830
831private string xField;832
833private string yField;834
835public static CT_AdjPoint2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)836{837if (node == null)838return null;839CT_AdjPoint2D ctObj = new CT_AdjPoint2D();840ctObj.x = XmlHelper.ReadString(node.Attributes["x"]);841ctObj.y = XmlHelper.ReadString(node.Attributes["y"]);842return ctObj;843}844
845
846
847internal void Write(StreamWriter sw, string nodeName)848{849sw.Write(string.Format("<a:{0}", nodeName));850XmlHelper.WriteAttribute(sw, "x", this.x);851XmlHelper.WriteAttribute(sw, "y", this.y);852sw.Write("/>");853
854}855
856[XmlAttribute]857public string x858{859get860{861return this.xField;862}863set864{865this.xField = value;866}867}868
869
870[XmlAttribute]871public string y872{873get874{875return this.yField;876}877set878{879this.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)]890public class CT_Path2DQuadBezierTo891{892
893private CT_AdjPoint2D[] ptField;894
895
896[XmlElement("pt", Order = 0)]897public CT_AdjPoint2D[] pt898{899get900{901return this.ptField;902}903set904{905this.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)]916public class CT_GeomGuideList917{918
919private List<CT_GeomGuide> gdField;920
921
922[XmlElement("gd", Order = 0)]923public List<CT_GeomGuide> gd924{925get926{927return this.gdField;928}929set930{931this.gdField = value;932}933}934
935internal static CT_GeomGuideList Parse(XmlNode node, XmlNamespaceManager namespaceManager)936{937CT_GeomGuideList avLst = new CT_GeomGuideList();938avLst.gdField = new List<CT_GeomGuide>();939if (node.ChildNodes != null)940{941foreach (XmlNode childNode in node.ChildNodes)942{943if (childNode.LocalName == "gd")944avLst.gdField.Add(CT_GeomGuide.Parse(childNode, namespaceManager));945}946}947return avLst;948}949
950
951
952internal void Write(StreamWriter sw, string nodeName)953{954sw.Write("<a:{0}", nodeName);955if (this.gdField == null||this.gdField.Count==0)956{957sw.Write("/>");958}959else960{961sw.Write(">");962foreach (CT_GeomGuide gg in gdField)963{964gg.Write(sw, "gd");965}966sw.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)]978public class CT_GeomRect979{980
981private string lField;982
983private string tField;984
985private string rField;986
987private string bField;988
989public static CT_GeomRect Parse(XmlNode node, XmlNamespaceManager namespaceManager)990{991if (node == null)992return null;993CT_GeomRect ctObj = new CT_GeomRect();994ctObj.l = XmlHelper.ReadString(node.Attributes["l"]);995ctObj.t = XmlHelper.ReadString(node.Attributes["t"]);996ctObj.r = XmlHelper.ReadString(node.Attributes["r"]);997ctObj.b = XmlHelper.ReadString(node.Attributes["b"]);998return ctObj;999}1000
1001
1002
1003internal void Write(StreamWriter sw, string nodeName)1004{1005sw.Write(string.Format("<a:{0}", nodeName));1006XmlHelper.WriteAttribute(sw, "l", this.l);1007XmlHelper.WriteAttribute(sw, "t", this.t);1008XmlHelper.WriteAttribute(sw, "r", this.r);1009XmlHelper.WriteAttribute(sw, "b", this.b);1010sw.Write("/>");1011}1012
1013[XmlAttribute]1014public string l1015{1016get1017{1018return this.lField;1019}1020set1021{1022this.lField = value;1023}1024}1025
1026
1027[XmlAttribute]1028public string t1029{1030get1031{1032return this.tField;1033}1034set1035{1036this.tField = value;1037}1038}1039
1040
1041[XmlAttribute]1042public string r1043{1044get1045{1046return this.rField;1047}1048set1049{1050this.rField = value;1051}1052}1053
1054
1055[XmlAttribute]1056public string b1057{1058get1059{1060return this.bField;1061}1062set1063{1064this.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)]1075public class CT_XYAdjustHandle1076{1077
1078private CT_AdjPoint2D posField;1079
1080private string gdRefXField;1081
1082private string minXField;1083
1084private string maxXField;1085
1086private string gdRefYField;1087
1088private string minYField;1089
1090private string maxYField;1091
1092[XmlElement(Order = 0)]1093public CT_AdjPoint2D pos1094{1095get1096{1097return this.posField;1098}1099set1100{1101this.posField = value;1102}1103}1104
1105
1106[XmlAttribute(DataType = "token")]1107public string gdRefX1108{1109get1110{1111return this.gdRefXField;1112}1113set1114{1115this.gdRefXField = value;1116}1117}1118
1119
1120[XmlAttribute]1121public string minX1122{1123get1124{1125return this.minXField;1126}1127set1128{1129this.minXField = value;1130}1131}1132
1133
1134[XmlAttribute]1135public string maxX1136{1137get1138{1139return this.maxXField;1140}1141set1142{1143this.maxXField = value;1144}1145}1146
1147
1148[XmlAttribute(DataType = "token")]1149public string gdRefY1150{1151get1152{1153return this.gdRefYField;1154}1155set1156{1157this.gdRefYField = value;1158}1159}1160
1161
1162[XmlAttribute]1163public string minY1164{1165get1166{1167return this.minYField;1168}1169set1170{1171this.minYField = value;1172}1173}1174
1175
1176[XmlAttribute]1177public string maxY1178{1179get1180{1181return this.maxYField;1182}1183set1184{1185this.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)]1196public class CT_PolarAdjustHandle1197{1198
1199private CT_AdjPoint2D posField;1200
1201private string gdRefRField;1202
1203private string minRField;1204
1205private string maxRField;1206
1207private string gdRefAngField;1208
1209private string minAngField;1210
1211private string maxAngField;1212
1213[XmlElement(Order = 0)]1214public CT_AdjPoint2D pos1215{1216get1217{1218return this.posField;1219}1220set1221{1222this.posField = value;1223}1224}1225
1226
1227[XmlAttribute(DataType = "token")]1228public string gdRefR1229{1230get1231{1232return this.gdRefRField;1233}1234set1235{1236this.gdRefRField = value;1237}1238}1239
1240
1241[XmlAttribute]1242public string minR1243{1244get1245{1246return this.minRField;1247}1248set1249{1250this.minRField = value;1251}1252}1253
1254
1255[XmlAttribute]1256public string maxR1257{1258get1259{1260return this.maxRField;1261}1262set1263{1264this.maxRField = value;1265}1266}1267
1268
1269[XmlAttribute(DataType = "token")]1270public string gdRefAng1271{1272get1273{1274return this.gdRefAngField;1275}1276set1277{1278this.gdRefAngField = value;1279}1280}1281
1282
1283[XmlAttribute]1284public string minAng1285{1286get1287{1288return this.minAngField;1289}1290set1291{1292this.minAngField = value;1293}1294}1295
1296
1297[XmlAttribute]1298public string maxAng1299{1300get1301{1302return this.maxAngField;1303}1304set1305{1306this.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)]1317public class CT_ConnectionSite1318{1319
1320private CT_AdjPoint2D posField;1321
1322private string angField;1323public static CT_ConnectionSite Parse(XmlNode node, XmlNamespaceManager namespaceManager)1324{1325if (node == null)1326return null;1327CT_ConnectionSite ctObj = new CT_ConnectionSite();1328ctObj.ang = XmlHelper.ReadString(node.Attributes["ang"]);1329foreach (XmlNode childNode in node.ChildNodes)1330{1331if (childNode.LocalName == "pos")1332ctObj.pos = CT_AdjPoint2D.Parse(childNode, namespaceManager);1333}1334return ctObj;1335}1336
1337
1338
1339internal void Write(StreamWriter sw, string nodeName)1340{1341sw.Write(string.Format("<a:{0}", nodeName));1342XmlHelper.WriteAttribute(sw, "ang", this.ang);1343sw.Write(">");1344if (this.pos != null)1345this.pos.Write(sw, "pos");1346sw.Write(string.Format("</a:{0}>", nodeName));1347}1348
1349[XmlElement(Order = 0)]1350public CT_AdjPoint2D pos1351{1352get1353{1354return this.posField;1355}1356set1357{1358this.posField = value;1359}1360}1361
1362
1363[XmlAttribute]1364public string ang1365{1366get1367{1368return this.angField;1369}1370set1371{1372this.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)]1383public class CT_AdjustHandleList1384{1385
1386private object[] itemsField;1387
1388
1389[XmlElement("ahPolar", typeof(CT_PolarAdjustHandle), Order = 0)]1390[XmlElement("ahXY", typeof(CT_XYAdjustHandle), Order = 0)]1391public object[] Items1392{1393get1394{1395return this.itemsField;1396}1397set1398{1399this.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)]1410public class CT_ConnectionSiteList1411{1412
1413private List<CT_ConnectionSite> cxnField;1414
1415
1416//[XmlElement("cxn", Order = 0)]1417public List<CT_ConnectionSite> cxn1418{1419get1420{1421return this.cxnField;1422}1423set1424{1425this.cxnField = value;1426}1427}1428internal static CT_ConnectionSiteList Parse(XmlNode node, XmlNamespaceManager namespaceManager)1429{1430CT_ConnectionSiteList cxnLst = new CT_ConnectionSiteList();1431cxnLst.cxnField = new List<CT_ConnectionSite>();1432foreach (XmlNode childNode in node.ChildNodes)1433{1434if (childNode.LocalName == "cxn")1435cxnLst.cxnField.Add(CT_ConnectionSite.Parse(childNode, namespaceManager));1436}1437return cxnLst;1438}1439
1440
1441
1442internal void Write(StreamWriter sw, string nodeName)1443{1444sw.Write("<a:{0}>", nodeName);1445if (this.cxnField != null)1446{1447foreach (CT_ConnectionSite gg in cxnField)1448{1449gg.Write(sw, "cxn");1450}1451}1452sw.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)]1463public class CT_Connection1464{1465
1466private uint idField;1467
1468private uint idxField;1469public static CT_Connection Parse(XmlNode node, XmlNamespaceManager namespaceManager)1470{1471if (node == null)1472return null;1473CT_Connection ctObj = new CT_Connection();1474ctObj.id = XmlHelper.ReadUInt(node.Attributes["id"]);1475ctObj.idx = XmlHelper.ReadUInt(node.Attributes["idx"]);1476return ctObj;1477}1478
1479
1480
1481internal void Write(StreamWriter sw, string nodeName)1482{1483sw.Write(string.Format("<a:{0}", nodeName));1484XmlHelper.WriteAttribute(sw, "id", this.id);1485XmlHelper.WriteAttribute(sw, "idx", this.idx, true);1486sw.Write("/>");1487}1488
1489
1490[XmlAttribute]1491public uint id1492{1493get1494{1495return this.idField;1496}1497set1498{1499this.idField = value;1500}1501}1502
1503
1504[XmlAttribute]1505public uint idx1506{1507get1508{1509return this.idxField;1510}1511set1512{1513this.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)]1524public class CT_Path2DMoveTo1525{1526
1527private CT_AdjPoint2D ptField = null;1528public CT_Path2DMoveTo()1529{1530this.ptField = new CT_AdjPoint2D();1531}1532
1533public static CT_Path2DMoveTo Parse(XmlNode node, XmlNamespaceManager namespaceManager)1534{1535CT_Path2DMoveTo obj = new CT_Path2DMoveTo();1536foreach(XmlNode childNode in node.ChildNodes) {1537if(childNode.LocalName == "pt") {1538obj.ptField = CT_AdjPoint2D.Parse(childNode, namespaceManager);1539}1540}1541return obj;1542}1543
1544internal void Write(StreamWriter sw, string nodeName) {1545
1546sw.Write("<a:{0}>", nodeName);1547
1548if(this.ptField != null) {1549this.ptField.Write(sw, "pt");1550}1551sw.Write("</a:{0}>", nodeName);1552}1553
1554[XmlElement(Order = 0)]1555public CT_AdjPoint2D pt1556{1557get1558{1559return this.ptField;1560}1561set1562{1563this.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)]1574public class CT_Path2DLineTo1575{1576
1577private CT_AdjPoint2D ptField;1578
1579public CT_Path2DLineTo()1580{1581this.ptField = new CT_AdjPoint2D();1582}1583
1584[XmlElement(Order = 0)]1585public CT_AdjPoint2D pt1586{1587get1588{1589return this.ptField;1590}1591set1592{1593this.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)]1604public class CT_Path2DArcTo1605{1606
1607private string wrField;1608
1609private string hrField;1610
1611private string stAngField;1612
1613private string swAngField;1614
1615
1616[XmlAttribute]1617public string wR1618{1619get1620{1621return this.wrField;1622}1623set1624{1625this.wrField = value;1626}1627}1628
1629
1630[XmlAttribute]1631public string hR1632{1633get1634{1635return this.hrField;1636}1637set1638{1639this.hrField = value;1640}1641}1642
1643
1644[XmlAttribute]1645public string stAng1646{1647get1648{1649return this.stAngField;1650}1651set1652{1653this.stAngField = value;1654}1655}1656
1657
1658[XmlAttribute]1659public string swAng1660{1661get1662{1663return this.swAngField;1664}1665set1666{1667this.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)]1678public class CT_Path2DClose1679{1680}1681
1682
1683[Serializable]1684[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]1685public enum ST_PathFillMode1686{1687
1688
1689none,1690
1691
1692norm,1693
1694
1695lighten,1696
1697
1698lightenLess,1699
1700
1701darken,1702
1703
1704darkenLess,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)]1713public class CT_Path2D1714{1715
1716//private object[] itemsField;1717
1718//private ItemsChoiceType[] itemsElementNameField;1719
1720private long wField;1721
1722private long hField;1723
1724private ST_PathFillMode fillField;1725
1726private bool strokeField;1727
1728private bool extrusionOkField;1729
1730private CT_Path2DMoveTo moveToFeild = null;1731
1732private List<CT_Path2DCubicBezierTo> cubicBezToLst = null;1733
1734public static CT_Path2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)1735{1736if (node == null)1737return null;1738CT_Path2D ctObj = new CT_Path2D();1739ctObj.w = XmlHelper.ReadLong(node.Attributes["w"]);1740ctObj.h = XmlHelper.ReadLong(node.Attributes["h"]);1741if (node.Attributes["fill"] != null)1742ctObj.fill = (ST_PathFillMode)Enum.Parse(typeof(ST_PathFillMode), node.Attributes["fill"].Value);1743ctObj.stroke = XmlHelper.ReadBool(node.Attributes["stroke"], true);1744ctObj.extrusionOk = XmlHelper.ReadBool(node.Attributes["extrusionOk"]);1745foreach(XmlNode childNode in node.ChildNodes)1746{1747// if(childNode.LocalName == "ItemsElementName")1748// ctObj.ItemsElementName = ItemsChoiceType[].Parse(childNode, namespaceManager);1749if(childNode.LocalName == "moveTo")1750ctObj.moveToFeild = CT_Path2DMoveTo.Parse(childNode, namespaceManager);1751if(childNode.LocalName == "cubicBezTo")1752ctObj.cubicBezToLst.Add( CT_Path2DCubicBezierTo.Parse(childNode, namespaceManager));1753}1754return ctObj;1755}1756
1757
1758
1759internal void Write(StreamWriter sw, string nodeName)1760{1761sw.Write(string.Format("<a:{0}", nodeName));1762XmlHelper.WriteAttribute(sw, "w", this.w);1763XmlHelper.WriteAttribute(sw, "h", this.h);1764XmlHelper.WriteAttribute(sw, "fill", this.fill.ToString());1765XmlHelper.WriteAttribute(sw, "stroke", this.stroke);1766XmlHelper.WriteAttribute(sw, "extrusionOk", this.extrusionOk);1767sw.Write(">");1768//if (this.ItemsElementName != null)1769// this.ItemsElementName.Write(sw, "ItemsElementName");1770if(this.moveToFeild != null)1771moveToFeild.Write(sw, "moveTo");1772if(cubicBezToLst.Count > 0) {1773foreach(CT_Path2DCubicBezierTo cub in cubicBezToLst) {1774cub.Write(sw, "cubicBezTo");1775}1776}1777sw.Write(string.Format("</a:{0}>", nodeName));1778}1779
1780public CT_Path2D()1781{1782this.wField = ((long)(0));1783this.hField = ((long)(0));1784this.fillField = ST_PathFillMode.norm;1785this.strokeField = true;1786this.extrusionOkField = true;1787
1788this.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[] Items1800//{1801// get1802// {1803// return this.itemsField;1804// }1805// set1806// {1807// this.itemsField = value;1808// }1809//}1810
1811
1812//[XmlElement("ItemsElementName")]1813//[XmlIgnore]1814//public ItemsChoiceType[] ItemsElementName1815//{1816// get1817// {1818// return this.itemsElementNameField;1819// }1820// set1821// {1822// this.itemsElementNameField = value;1823// }1824//}1825
1826public CT_Path2DMoveTo moveto { get => moveToFeild; set => moveToFeild = value; }1827public List<CT_Path2DCubicBezierTo> cubicBezTo { get => this.cubicBezToLst; }1828
1829[XmlAttribute]1830[DefaultValue(typeof(long), "0")]1831public long w1832{1833get1834{1835return this.wField;1836}1837set1838{1839this.wField = value;1840}1841}1842
1843
1844[XmlAttribute]1845[DefaultValue(typeof(long), "0")]1846public long h1847{1848get1849{1850return this.hField;1851}1852set1853{1854this.hField = value;1855}1856}1857
1858
1859[XmlAttribute]1860[DefaultValue(ST_PathFillMode.norm)]1861public ST_PathFillMode fill1862{1863get1864{1865return this.fillField;1866}1867set1868{1869this.fillField = value;1870}1871}1872
1873
1874[XmlAttribute]1875[DefaultValue(true)]1876public bool stroke1877{1878get1879{1880return this.strokeField;1881}1882set1883{1884this.strokeField = value;1885}1886}1887
1888
1889[XmlAttribute]1890[DefaultValue(true)]1891public bool extrusionOk1892{1893get1894{1895return this.extrusionOkField;1896}1897set1898{1899this.extrusionOkField = value;1900}1901}1902}1903
1904
1905[Serializable]1906[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IncludeInSchema = false)]1907public enum ItemsChoiceType1908{1909
1910
1911arcTo,1912
1913
1914close,1915
1916
1917cubicBezTo,1918
1919
1920lnTo,1921
1922
1923moveTo,1924
1925
1926quadBezTo,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)]1935public class CT_Path2DList1936{1937
1938private List<CT_Path2D> pathField;1939
1940
1941//[XmlElement("path", Order = 0)]1942public List<CT_Path2D> path1943{1944get1945{1946return this.pathField;1947}1948set1949{1950this.pathField = value;1951}1952}1953
1954internal static CT_Path2DList Parse(XmlNode node, XmlNamespaceManager namespaceManager)1955{1956CT_Path2DList pathList = new CT_Path2DList();1957pathList.path = new List<CT_Path2D>();1958foreach (XmlNode childNode in node.ChildNodes)1959{1960if (childNode.LocalName == "path")1961pathList.pathField.Add(CT_Path2D.Parse(childNode, namespaceManager));1962}1963return pathList;1964}1965
1966
1967
1968internal void Write(StreamWriter sw, string nodeName)1969{1970sw.Write("<a:{0}>", nodeName);1971if (this.pathField != null)1972{1973foreach (CT_Path2D gg in pathField)1974{1975gg.Write(sw, "path");1976}1977}1978sw.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)]1989public class CT_PresetGeometry2D1990{1991
1992private CT_GeomGuideList avLstField;1993
1994private ST_ShapeType prstField;1995
1996public CT_GeomGuideList AddNewAvLst()1997{1998this.avLstField = new CT_GeomGuideList();1999return this.avLstField;2000}2001
2002public static CT_PresetGeometry2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)2003{2004if (node == null)2005return null;2006CT_PresetGeometry2D ctObj = new CT_PresetGeometry2D();2007if (node.Attributes["prst"] != null)2008ctObj.prst = (ST_ShapeType)Enum.Parse(typeof(ST_ShapeType), node.Attributes["prst"].Value);2009if (node.ChildNodes != null)2010{2011foreach (XmlNode childNode in node.ChildNodes)2012{2013if (childNode.LocalName == "avLst")2014{2015ctObj.avLstField = CT_GeomGuideList.Parse(childNode, namespaceManager);2016}2017}2018}2019return ctObj;2020}2021
2022
2023
2024internal void Write(StreamWriter sw, string nodeName)2025{2026sw.Write(string.Format("<a:{0}", nodeName));2027XmlHelper.WriteAttribute(sw, "prst", this.prst.ToString());2028sw.Write(">");2029if (this.avLst != null)2030{2031avLst.Write(sw, "avLst");2032}2033sw.Write(string.Format("</a:{0}>", nodeName));2034}2035
2036
2037
2038[XmlElement(Order = 0)]2039public CT_GeomGuideList avLst2040{2041get2042{2043return this.avLstField;2044}2045set2046{2047this.avLstField =value;2048}2049}2050
2051
2052[XmlAttribute]2053public ST_ShapeType prst2054{2055get2056{2057return this.prstField;2058}2059set2060{2061this.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)]2072public class CT_PresetTextShape2073{2074public static CT_PresetTextShape Parse(XmlNode node, XmlNamespaceManager namespaceManager)2075{2076if (node == null)2077return null;2078CT_PresetTextShape ctObj = new CT_PresetTextShape();2079if (node.Attributes["prst"] != null)2080ctObj.prst = (ST_TextShapeType)Enum.Parse(typeof(ST_TextShapeType), node.Attributes["prst"].Value);2081ctObj.avLst = new List<CT_GeomGuide>();2082foreach (XmlNode childNode in node.ChildNodes)2083{2084if (childNode.LocalName == "avLst")2085ctObj.avLst.Add(CT_GeomGuide.Parse(childNode, namespaceManager));2086}2087return ctObj;2088}2089
2090
2091
2092internal void Write(StreamWriter sw, string nodeName)2093{2094sw.Write(string.Format("<a:{0}", nodeName));2095XmlHelper.WriteAttribute(sw, "prst", this.prst.ToString());2096sw.Write(">");2097if (this.avLst != null)2098{2099foreach (CT_GeomGuide x in this.avLst)2100{2101x.Write(sw, "avLst");2102}2103}2104sw.Write(string.Format("</a:{0}>", nodeName));2105}2106
2107private List<CT_GeomGuide> avLstField;2108
2109private ST_TextShapeType prstField;2110
2111[XmlArray(Order = 0)]2112[XmlArrayItem("gd", IsNullable = false)]2113public List<CT_GeomGuide> avLst2114{2115get2116{2117return this.avLstField;2118}2119set2120{2121this.avLstField = value;2122}2123}2124
2125
2126[XmlAttribute]2127public ST_TextShapeType prst2128{2129get2130{2131return this.prstField;2132}2133set2134{2135this.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)]2146public class CT_CustomGeometry2D2147{2148
2149private CT_GeomGuideList avLstField;2150
2151private CT_GeomGuideList gdLstField;2152
2153private List<object> ahLstField;2154
2155private CT_ConnectionSiteList cxnLstField;2156
2157private CT_GeomRect rectField;2158
2159private CT_Path2DList pathLstField;2160public static CT_CustomGeometry2D Parse(XmlNode node, XmlNamespaceManager namespaceManager)2161{2162if (node == null)2163return null;2164CT_CustomGeometry2D ctObj = new CT_CustomGeometry2D();2165ctObj.ahLst = new List<Object>();2166foreach (XmlNode childNode in node.ChildNodes)2167{2168if (childNode.LocalName == "rect")2169ctObj.rect = CT_GeomRect.Parse(childNode, namespaceManager);2170else if (childNode.LocalName == "avLst")2171ctObj.avLst = CT_GeomGuideList.Parse(childNode, namespaceManager);2172else if (childNode.LocalName == "gdLst")2173ctObj.gdLst = CT_GeomGuideList.Parse(childNode, namespaceManager);2174//else if (childNode.LocalName == "ahLst")2175// ctObj.ahLst.Add(Object.Parse(childNode, namespaceManager));2176else if (childNode.LocalName == "cxnLst")2177ctObj.cxnLst = CT_ConnectionSiteList.Parse(childNode, namespaceManager);2178else if (childNode.LocalName == "pathLst")2179ctObj.pathLst = CT_Path2DList.Parse(childNode, namespaceManager);2180}2181return ctObj;2182}2183
2184
2185
2186internal void Write(StreamWriter sw, string nodeName)2187{2188sw.Write(string.Format("<a:{0}", nodeName));2189sw.Write(">");2190if (this.rect != null)2191this.rect.Write(sw, "rect");2192if (this.avLst != null)2193{2194this.avLst.Write(sw, "avLst");2195}2196if (this.gdLst != null)2197{2198this.gdLst.Write(sw, "gdLst");2199}2200if (this.cxnLst != null)2201{2202this.cxnLstField.Write(sw, "cxnLst");2203}2204if (this.pathLst != null)2205{2206this.pathLstField.Write(sw, "pathLst");2207}2208sw.Write(string.Format("</a:{0}>", nodeName));2209}2210
2211[XmlElement(Order = 0)]2212//[XmlArrayItem("gd", IsNullable = false)]2213public CT_GeomGuideList avLst2214{2215get2216{2217return this.avLstField;2218}2219set2220{2221this.avLstField = value;2222}2223}2224
2225[XmlElement(Order = 1)]2226//[XmlArrayItem("gd", IsNullable = false)]2227public CT_GeomGuideList gdLst2228{2229get2230{2231return this.gdLstField;2232}2233set2234{2235this.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)]2242public List<object> ahLst2243{2244get2245{2246return this.ahLstField;2247}2248set2249{2250this.ahLstField = value;2251}2252}2253
2254[XmlElement(Order = 3)]2255//[XmlArrayItem("cxn", IsNullable = false)]2256public CT_ConnectionSiteList cxnLst2257{2258get2259{2260return this.cxnLstField;2261}2262set2263{2264this.cxnLstField = value;2265}2266}2267
2268[XmlElement(Order = 4)]2269public CT_GeomRect rect2270{2271get2272{2273return this.rectField;2274}2275set2276{2277this.rectField = value;2278}2279}2280
2281[XmlElement(Order = 5)]2282//[XmlArrayItem("path", IsNullable = false)]2283public CT_Path2DList pathLst2284{2285get2286{2287return this.pathLstField;2288}2289set2290{2291this.pathLstField = value;2292}2293}2294}2295}
2296