npoi
1495 строк · 38.9 Кб
1
2using NPOI.OpenXml4Net.Util;3using System;4using System.Collections.Generic;5using System.ComponentModel;6using System.IO;7using System.Text;8using System.Xml;9using System.Xml.Serialization;10
11namespace NPOI.OpenXmlFormats.Dml12{
13
14
15[Serializable]16[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]17[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=false)]18public enum ST_TextAnchoringType {19
20
21t,22
23
24ctr,25
26
27b,28
29
30just,31
32
33dist,34}35
36
37[Serializable]38[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]39[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=false)]40public enum ST_TextVertOverflowType {41
42
43overflow,44
45
46ellipsis,47
48
49clip,50}51
52
53[Serializable]54[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]55[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=false)]56public enum ST_TextHorzOverflowType {57
58
59overflow,60
61
62clip,63}64
65
66[Serializable]67[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]68[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=false)]69public enum ST_TextVerticalType {70
71
72horz,73
74
75vert,76
77
78vert270,79
80
81wordArtVert,82
83
84eaVert,85
86
87mongolianVert,88
89
90wordArtVertRtl,91}92
93
94[Serializable]95[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]96[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=false)]97public enum ST_TextWrappingType {98
99
100none,101
102
103square,104}105
106
107[Serializable]108
109[System.ComponentModel.DesignerCategory("code")]110[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]111[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=true)]112public class CT_TextListStyle {113
114private CT_TextParagraphProperties defPPrField;115
116private CT_TextParagraphProperties lvl1pPrField;117
118private CT_TextParagraphProperties lvl2pPrField;119
120private CT_TextParagraphProperties lvl3pPrField;121
122private CT_TextParagraphProperties lvl4pPrField;123
124private CT_TextParagraphProperties lvl5pPrField;125
126private CT_TextParagraphProperties lvl6pPrField;127
128private CT_TextParagraphProperties lvl7pPrField;129
130private CT_TextParagraphProperties lvl8pPrField;131
132private CT_TextParagraphProperties lvl9pPrField;133
134private CT_OfficeArtExtensionList extLstField;135
136public static CT_TextListStyle Parse(XmlNode node, XmlNamespaceManager namespaceManager)137{138if (node == null)139return null;140CT_TextListStyle ctObj = new CT_TextListStyle();141foreach (XmlNode childNode in node.ChildNodes)142{143if (childNode.LocalName == "defPPr")144ctObj.defPPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);145else if (childNode.LocalName == "lvl1pPr")146ctObj.lvl1pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);147else if (childNode.LocalName == "lvl2pPr")148ctObj.lvl2pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);149else if (childNode.LocalName == "lvl3pPr")150ctObj.lvl3pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);151else if (childNode.LocalName == "lvl4pPr")152ctObj.lvl4pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);153else if (childNode.LocalName == "lvl5pPr")154ctObj.lvl5pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);155else if (childNode.LocalName == "lvl6pPr")156ctObj.lvl6pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);157else if (childNode.LocalName == "lvl7pPr")158ctObj.lvl7pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);159else if (childNode.LocalName == "lvl8pPr")160ctObj.lvl8pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);161else if (childNode.LocalName == "lvl9pPr")162ctObj.lvl9pPr = CT_TextParagraphProperties.Parse(childNode, namespaceManager);163else if (childNode.LocalName == "extLst")164ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);165}166return ctObj;167}168
169
170
171internal void Write(StreamWriter sw, string nodeName)172{173sw.Write(string.Format("<a:{0}", nodeName));174sw.Write(">");175if (this.defPPr != null)176this.defPPr.Write(sw, "defPPr");177if (this.lvl1pPr != null)178this.lvl1pPr.Write(sw, "lvl1pPr");179if (this.lvl2pPr != null)180this.lvl2pPr.Write(sw, "lvl2pPr");181if (this.lvl3pPr != null)182this.lvl3pPr.Write(sw, "lvl3pPr");183if (this.lvl4pPr != null)184this.lvl4pPr.Write(sw, "lvl4pPr");185if (this.lvl5pPr != null)186this.lvl5pPr.Write(sw, "lvl5pPr");187if (this.lvl6pPr != null)188this.lvl6pPr.Write(sw, "lvl6pPr");189if (this.lvl7pPr != null)190this.lvl7pPr.Write(sw, "lvl7pPr");191if (this.lvl8pPr != null)192this.lvl8pPr.Write(sw, "lvl8pPr");193if (this.lvl9pPr != null)194this.lvl9pPr.Write(sw, "lvl9pPr");195if (this.extLst != null)196this.extLst.Write(sw, "extLst");197sw.Write(string.Format("</a:{0}>", nodeName));198}199
200public CT_TextParagraphProperties defPPr {201get {202return this.defPPrField;203}204set {205this.defPPrField = value;206}207}208
209
210public CT_TextParagraphProperties lvl1pPr {211get {212return this.lvl1pPrField;213}214set {215this.lvl1pPrField = value;216}217}218
219
220public CT_TextParagraphProperties lvl2pPr {221get {222return this.lvl2pPrField;223}224set {225this.lvl2pPrField = value;226}227}228
229
230public CT_TextParagraphProperties lvl3pPr {231get {232return this.lvl3pPrField;233}234set {235this.lvl3pPrField = value;236}237}238
239
240public CT_TextParagraphProperties lvl4pPr {241get {242return this.lvl4pPrField;243}244set {245this.lvl4pPrField = value;246}247}248
249
250public CT_TextParagraphProperties lvl5pPr {251get {252return this.lvl5pPrField;253}254set {255this.lvl5pPrField = value;256}257}258
259
260public CT_TextParagraphProperties lvl6pPr {261get {262return this.lvl6pPrField;263}264set {265this.lvl6pPrField = value;266}267}268
269
270public CT_TextParagraphProperties lvl7pPr {271get {272return this.lvl7pPrField;273}274set {275this.lvl7pPrField = value;276}277}278
279
280public CT_TextParagraphProperties lvl8pPr {281get {282return this.lvl8pPrField;283}284set {285this.lvl8pPrField = value;286}287}288
289
290public CT_TextParagraphProperties lvl9pPr {291get {292return this.lvl9pPrField;293}294set {295this.lvl9pPrField = value;296}297}298
299
300public CT_OfficeArtExtensionList extLst {301get {302return this.extLstField;303}304set {305this.extLstField = value;306}307}308}309
310
311[Serializable]312
313[System.ComponentModel.DesignerCategory("code")]314[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]315[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=true)]316public class CT_TextNormalAutofit {317
318private int fontScaleField;319
320private int lnSpcReductionField;321
322public CT_TextNormalAutofit() {323this.fontScaleField = 100000;324this.lnSpcReductionField = 0;325}326public static CT_TextNormalAutofit Parse(XmlNode node, XmlNamespaceManager namespaceManager)327{328if (node == null)329return null;330CT_TextNormalAutofit ctObj = new CT_TextNormalAutofit();331ctObj.fontScale = XmlHelper.ReadInt(node.Attributes["fontScale"]);332ctObj.lnSpcReduction = XmlHelper.ReadInt(node.Attributes["lnSpcReduction"]);333return ctObj;334}335
336
337
338internal void Write(StreamWriter sw, string nodeName)339{340sw.Write(string.Format("<a:{0}", nodeName));341XmlHelper.WriteAttribute(sw, "fontScale", this.fontScale);342XmlHelper.WriteAttribute(sw, "lnSpcReduction", this.lnSpcReduction);343sw.Write(">");344sw.Write(string.Format("</a:{0}>", nodeName));345}346
347[XmlAttribute]348[DefaultValue(100000)]349public int fontScale {350get {351return this.fontScaleField;352}353set {354this.fontScaleField = value;355}356}357
358
359[XmlAttribute]360[DefaultValue(0)]361public int lnSpcReduction {362get {363return this.lnSpcReductionField;364}365set {366this.lnSpcReductionField = value;367}368}369}370
371
372[Serializable]373
374[System.ComponentModel.DesignerCategory("code")]375[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]376[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=true)]377public class CT_TextShapeAutofit {378}379
380
381[Serializable]382
383[System.ComponentModel.DesignerCategory("code")]384[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]385[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=true)]386public class CT_TextNoAutofit {387}388
389
390[Serializable]391
392[System.ComponentModel.DesignerCategory("code")]393[XmlType(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main")]394[XmlRoot(Namespace = "http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable = true)]395public class CT_TextBodyProperties396{397
398private CT_PresetTextShape prstTxWarpField;399
400private CT_TextNoAutofit noAutofitField;401
402private CT_TextNormalAutofit normAutofitField;403
404private CT_TextShapeAutofit spAutoFitField;405
406private CT_Scene3D scene3dField;407
408private CT_Shape3D sp3dField;409
410private CT_FlatText flatTxField;411
412private CT_OfficeArtExtensionList extLstField;413
414private int rotField;415
416private bool rotFieldSpecified;417
418private bool spcFirstLastParaField;419
420private bool spcFirstLastParaFieldSpecified;421
422private ST_TextVertOverflowType vertOverflowField;423
424private bool vertOverflowFieldSpecified;425
426private ST_TextHorzOverflowType horzOverflowField;427
428private bool horzOverflowFieldSpecified;429
430private ST_TextVerticalType vertField;431
432private bool vertFieldSpecified;433
434private ST_TextWrappingType wrapField;435
436private bool wrapFieldSpecified;437
438private int lInsField;439
440private bool lInsFieldSpecified;441
442private int tInsField;443
444private bool tInsFieldSpecified;445
446private int rInsField;447
448private bool rInsFieldSpecified;449
450private int bInsField;451
452private bool bInsFieldSpecified;453
454private int numColField;455
456private bool numColFieldSpecified;457
458private int spcColField;459
460private bool spcColFieldSpecified;461
462private bool rtlColField;463
464private bool rtlColFieldSpecified;465
466private bool fromWordArtField;467
468private bool fromWordArtFieldSpecified;469
470private ST_TextAnchoringType anchorField;471
472private bool anchorFieldSpecified;473
474private bool anchorCtrField;475
476private bool anchorCtrFieldSpecified;477
478private bool forceAAField;479
480private bool forceAAFieldSpecified;481
482private bool uprightField;483
484private bool compatLnSpcField;485
486private bool compatLnSpcFieldSpecified;487
488public CT_TextBodyProperties()489{490this.uprightField = false;491this.vertField = ST_TextVerticalType.horz;492this.wrapField = ST_TextWrappingType.none;493this.spcFirstLastParaField = false;494}495public static CT_TextBodyProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)496{497if (node == null)498return null;499CT_TextBodyProperties ctObj = new CT_TextBodyProperties();500ctObj.rotFieldSpecified = node.Attributes["rot"] != null;501ctObj.rotField = XmlHelper.ReadInt(node.Attributes["rot"]);502ctObj.spcFirstLastPara = XmlHelper.ReadBool(node.Attributes["spcFirstLastPara"]);503
504ctObj.vertOverflowFieldSpecified = node.Attributes["vertOverflow"] != null;505if (node.Attributes["vertOverflow"] != null)506ctObj.vertOverflowField = (ST_TextVertOverflowType)Enum.Parse(typeof(ST_TextVertOverflowType), node.Attributes["vertOverflow"].Value);507ctObj.horzOverflowFieldSpecified = node.Attributes["horzOverflow"] != null;508if (node.Attributes["horzOverflow"] != null)509ctObj.horzOverflowField = (ST_TextHorzOverflowType)Enum.Parse(typeof(ST_TextHorzOverflowType), node.Attributes["horzOverflow"].Value);510ctObj.vertFieldSpecified = node.Attributes["vert"] != null;511if (node.Attributes["vert"] != null)512ctObj.vertField = (ST_TextVerticalType)Enum.Parse(typeof(ST_TextVerticalType), node.Attributes["vert"].Value);513ctObj.wrapFieldSpecified = node.Attributes["wrap"] != null;514if (node.Attributes["wrap"] != null)515ctObj.wrapField = (ST_TextWrappingType)Enum.Parse(typeof(ST_TextWrappingType), node.Attributes["wrap"].Value);516ctObj.lIns = XmlHelper.ReadInt(node.Attributes["lIns"], 91440);517ctObj.tIns = XmlHelper.ReadInt(node.Attributes["tIns"], 45720);518ctObj.rIns = XmlHelper.ReadInt(node.Attributes["rIns"], 91440);519ctObj.bIns = XmlHelper.ReadInt(node.Attributes["bIns"], 45720);520ctObj.numCol = XmlHelper.ReadInt(node.Attributes["numCol"]);521ctObj.spcCol = XmlHelper.ReadInt(node.Attributes["spcCol"]);522ctObj.rtlCol = XmlHelper.ReadBool(node.Attributes["rtlCol"]);523ctObj.fromWordArt = XmlHelper.ReadBool(node.Attributes["fromWordArt"]);524ctObj.anchorFieldSpecified = node.Attributes["anchor"] != null;525if (node.Attributes["anchor"] != null)526ctObj.anchorField = (ST_TextAnchoringType)Enum.Parse(typeof(ST_TextAnchoringType), node.Attributes["anchor"].Value);527ctObj.anchorCtr = XmlHelper.ReadBool(node.Attributes["anchorCtr"]);528ctObj.forceAA = XmlHelper.ReadBool(node.Attributes["forceAA"]);529ctObj.upright = XmlHelper.ReadBool(node.Attributes["upright"]);530ctObj.compatLnSpc = XmlHelper.ReadBool(node.Attributes["compatLnSpc"]);531foreach (XmlNode childNode in node.ChildNodes)532{533if (childNode.LocalName == "prstTxWarp")534ctObj.prstTxWarp = CT_PresetTextShape.Parse(childNode, namespaceManager);535else if (childNode.LocalName == "noAutofit")536ctObj.noAutofit = new CT_TextNoAutofit();537else if (childNode.LocalName == "normAutofit")538ctObj.normAutofit = CT_TextNormalAutofit.Parse(childNode, namespaceManager);539else if (childNode.LocalName == "spAutoFit")540ctObj.spAutoFit = new CT_TextShapeAutofit();541else if (childNode.LocalName == "scene3d")542ctObj.scene3d = CT_Scene3D.Parse(childNode, namespaceManager);543else if (childNode.LocalName == "sp3d")544ctObj.sp3d = CT_Shape3D.Parse(childNode, namespaceManager);545else if (childNode.LocalName == "flatTx")546ctObj.flatTx = CT_FlatText.Parse(childNode, namespaceManager);547else if (childNode.LocalName == "extLst")548ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);549}550return ctObj;551}552
553
554
555internal void Write(StreamWriter sw, string nodeName)556{557sw.Write(string.Format("<a:{0}", nodeName));558if(this.rotFieldSpecified)559XmlHelper.WriteAttribute(sw, "rot", this.rotField,true);560if(spcFirstLastPara)561XmlHelper.WriteAttribute(sw, "spcFirstLastPara", this.spcFirstLastPara);562if(this.vertOverflowFieldSpecified)563XmlHelper.WriteAttribute(sw, "vertOverflow", this.vertOverflowField.ToString());564if(this.horzOverflowFieldSpecified)565XmlHelper.WriteAttribute(sw, "horzOverflow", this.horzOverflowField.ToString());566if(this.vertFieldSpecified)567XmlHelper.WriteAttribute(sw, "vert", this.vert.ToString());568if(this.wrapFieldSpecified && this.wrap == ST_TextWrappingType.none)569XmlHelper.WriteAttribute(sw, "wrap", this.wrap.ToString());570XmlHelper.WriteAttribute(sw, "lIns", this.lIns, 91440);571XmlHelper.WriteAttribute(sw, "tIns", this.tIns, 45720);572XmlHelper.WriteAttribute(sw, "rIns", this.rIns, 91440);573XmlHelper.WriteAttribute(sw, "bIns", this.bIns, 45720);574XmlHelper.WriteAttribute(sw, "numCol", this.numCol);575XmlHelper.WriteAttribute(sw, "spcCol", this.spcCol);576XmlHelper.WriteAttribute(sw, "rtlCol", this.rtlCol);577XmlHelper.WriteAttribute(sw, "fromWordArt", this.fromWordArt, false);578if(this.anchorFieldSpecified)579XmlHelper.WriteAttribute(sw, "anchor", this.anchorField.ToString());580XmlHelper.WriteAttribute(sw, "anchorCtr", this.anchorCtr, false);581XmlHelper.WriteAttribute(sw, "forceAA", this.forceAA, false);582if(upright)583XmlHelper.WriteAttribute(sw, "upright", this.upright);584if (compatLnSpc)585XmlHelper.WriteAttribute(sw, "compatLnSpc", this.compatLnSpc);586sw.Write(">");587if (this.prstTxWarp != null)588this.prstTxWarp.Write(sw, "prstTxWarp");589if (this.noAutofit != null)590sw.Write("<a:noAutofit/>");591if (this.normAutofit != null)592this.normAutofit.Write(sw, "normAutofit");593if (this.spAutoFit != null)594sw.Write("<a:spAutoFit/>");595if (this.scene3d != null)596this.scene3d.Write(sw, "scene3d");597if (this.sp3d != null)598this.sp3d.Write(sw, "sp3d");599if (this.flatTx != null)600this.flatTx.Write(sw, "flatTx");601if (this.extLst != null)602this.extLst.Write(sw, "extLst");603sw.Write(string.Format("</a:{0}>", nodeName));604}605
606public CT_PresetTextShape prstTxWarp607{608get609{610return this.prstTxWarpField;611}612set613{614this.prstTxWarpField = value;615}616}617
618public CT_TextNoAutofit noAutofit619{620get621{622return this.noAutofitField;623}624set625{626this.noAutofitField = value;627}628}629
630public CT_TextNormalAutofit normAutofit631{632get633{634return this.normAutofitField;635}636set637{638this.normAutofitField = value;639}640}641public CT_TextShapeAutofit spAutoFit642{643get644{645return this.spAutoFitField;646}647set648{649this.spAutoFitField = value;650}651}652
653
654public CT_Scene3D scene3d655{656get657{658return this.scene3dField;659}660set661{662this.scene3dField = value;663}664}665
666
667public CT_Shape3D sp3d668{669get670{671return this.sp3dField;672}673set674{675this.sp3dField = value;676}677}678
679
680public CT_FlatText flatTx681{682get683{684return this.flatTxField;685}686set687{688this.flatTxField = value;689}690}691
692
693public CT_OfficeArtExtensionList extLst694{695get696{697return this.extLstField;698}699set700{701this.extLstField = value;702}703}704
705
706[XmlAttribute]707public int rot708{709get710{711return this.rotField;712}713set714{715this.rotField = value;716this.rotFieldSpecified = true;717}718}719
720
721[XmlIgnore]722public bool rotSpecified723{724get725{726return this.rotFieldSpecified;727}728set729{730this.rotFieldSpecified = value;731}732}733
734
735[XmlAttribute]736public bool spcFirstLastPara737{738get739{740return this.spcFirstLastParaField;741}742set743{744this.spcFirstLastParaField = value;745this.spcFirstLastParaFieldSpecified = value;746}747}748
749
750[XmlIgnore]751public bool spcFirstLastParaSpecified752{753get754{755return this.spcFirstLastParaFieldSpecified;756}757set758{759this.spcFirstLastParaFieldSpecified = value;760}761}762
763
764[XmlAttribute]765public ST_TextVertOverflowType vertOverflow766{767get768{769return this.vertOverflowField;770}771set772{773this.vertOverflowField = value;774this.vertOverflowFieldSpecified = true;775}776}777
778
779[XmlIgnore]780public bool vertOverflowSpecified781{782get783{784return this.vertOverflowFieldSpecified;785}786set787{788this.vertOverflowFieldSpecified = value;789}790}791
792
793[XmlAttribute]794public ST_TextHorzOverflowType horzOverflow795{796get797{798return this.horzOverflowField;799}800set801{802this.horzOverflowField = value;803this.horzOverflowFieldSpecified = true;804}805}806
807
808[XmlIgnore]809public bool horzOverflowSpecified810{811get812{813return this.horzOverflowFieldSpecified;814}815set816{817this.horzOverflowFieldSpecified = value;818}819}820
821
822[XmlAttribute]823public ST_TextVerticalType vert824{825get826{827return this.vertField;828}829set830{831this.vertField = value;832this.vertFieldSpecified = true;833}834}835
836
837[XmlIgnore]838public bool vertSpecified839{840get841{842return this.vertFieldSpecified;843}844set845{846this.vertFieldSpecified = value;847}848}849
850
851[XmlAttribute]852public ST_TextWrappingType wrap853{854get855{856return this.wrapField;857}858set859{860this.wrapField = value;861this.wrapFieldSpecified = true;862}863}864
865
866[XmlIgnore]867public bool wrapSpecified868{869get870{871return this.wrapFieldSpecified;872}873set874{875this.wrapFieldSpecified = value;876}877}878
879
880[XmlAttribute]881public int lIns882{883get884{885return this.lInsField;886}887set888{889this.lInsField = value;890this.lInsFieldSpecified = value == 91440 ? false : true;891}892}893
894
895[XmlIgnore]896public bool lInsSpecified897{898get899{900return this.lInsFieldSpecified;901}902set903{904this.lInsFieldSpecified = value;905}906}907
908
909[XmlAttribute]910public int tIns911{912get913{914return this.tInsField;915}916set917{918this.tInsField = value;919this.tInsFieldSpecified = value == 45720 ? false : true;920}921}922
923
924[XmlIgnore]925public bool tInsSpecified926{927get928{929return this.tInsFieldSpecified;930}931set932{933this.tInsFieldSpecified = value;934}935}936
937
938[XmlAttribute]939public int rIns940{941get942{943return this.rInsField;944}945set946{947this.rInsField = value;948this.rInsFieldSpecified = value == 91440 ? false : true;949}950}951
952
953[XmlIgnore]954public bool rInsSpecified955{956get957{958return this.rInsFieldSpecified;959}960set961{962this.rInsFieldSpecified = value;963}964}965
966
967[XmlAttribute]968public int bIns969{970get971{972return this.bInsField;973}974set975{976this.bInsField = value;977this.bInsFieldSpecified = value == 45720 ? false : true;978}979}980
981
982[XmlIgnore]983public bool bInsSpecified984{985get986{987return this.bInsFieldSpecified;988}989set990{991this.bInsFieldSpecified = value;992}993}994
995
996[XmlAttribute]997public int numCol998{999get1000{1001return this.numColField;1002}1003set1004{1005this.numColField = value;1006this.numColFieldSpecified = true;1007}1008}1009
1010
1011[XmlIgnore]1012public bool numColSpecified1013{1014get1015{1016return this.numColFieldSpecified;1017}1018set1019{1020this.numColFieldSpecified = value;1021}1022}1023
1024
1025[XmlAttribute]1026public int spcCol1027{1028get1029{1030return this.spcColField;1031}1032set1033{1034this.spcColField = value;1035this.spcColFieldSpecified = true;1036}1037}1038
1039
1040[XmlIgnore]1041public bool spcColSpecified1042{1043get1044{1045return this.spcColFieldSpecified;1046}1047set1048{1049this.spcColFieldSpecified = value;1050}1051}1052
1053
1054[XmlAttribute]1055public bool rtlCol1056{1057get1058{1059return this.rtlColField;1060}1061set1062{1063this.rtlColField = value;1064this.rtlColFieldSpecified = value;1065}1066}1067
1068
1069[XmlIgnore]1070public bool rtlColSpecified1071{1072get1073{1074return this.rtlColFieldSpecified;1075}1076set1077{1078this.rtlColFieldSpecified = value;1079}1080}1081
1082
1083[XmlAttribute]1084public bool fromWordArt1085{1086get1087{1088return this.fromWordArtField;1089}1090set1091{1092this.fromWordArtField = value;1093this.fromWordArtFieldSpecified = value;1094}1095}1096
1097
1098[XmlIgnore]1099public bool fromWordArtSpecified1100{1101get1102{1103return this.fromWordArtFieldSpecified;1104}1105set1106{1107this.fromWordArtFieldSpecified = value;1108}1109}1110
1111
1112[XmlAttribute]1113public ST_TextAnchoringType anchor1114{1115get1116{1117return this.anchorField;1118}1119set1120{1121this.anchorField = value;1122this.anchorFieldSpecified = true;1123}1124}1125
1126
1127[XmlIgnore]1128public bool anchorSpecified1129{1130get1131{1132return this.anchorFieldSpecified;1133}1134set1135{1136this.anchorFieldSpecified = value;1137}1138}1139
1140
1141[XmlAttribute]1142public bool anchorCtr1143{1144get1145{1146return this.anchorCtrField;1147}1148set1149{1150this.anchorCtrField = value;1151this.anchorCtrFieldSpecified = value;1152}1153}1154
1155
1156[XmlIgnore]1157public bool anchorCtrSpecified1158{1159get1160{1161return this.anchorCtrFieldSpecified;1162}1163set1164{1165this.anchorCtrFieldSpecified = value;1166}1167}1168
1169
1170[XmlAttribute]1171public bool forceAA1172{1173get1174{1175return this.forceAAField;1176}1177set1178{1179this.forceAAField = value;1180this.forceAAFieldSpecified = value;1181}1182}1183
1184
1185[XmlIgnore]1186public bool forceAASpecified1187{1188get1189{1190return this.forceAAFieldSpecified;1191}1192set1193{1194this.forceAAFieldSpecified = value;1195}1196}1197
1198
1199[XmlAttribute]1200[DefaultValue(false)]1201public bool upright1202{1203get1204{1205return this.uprightField;1206}1207set1208{1209this.uprightField = value;1210}1211}1212
1213
1214[XmlAttribute]1215public bool compatLnSpc1216{1217get1218{1219return this.compatLnSpcField;1220}1221set1222{1223this.compatLnSpcField = value;1224this.compatLnSpcFieldSpecified = value;1225}1226}1227
1228
1229[XmlIgnore]1230public bool compatLnSpcSpecified1231{1232get1233{1234return this.compatLnSpcFieldSpecified;1235}1236set1237{1238this.compatLnSpcFieldSpecified = value;1239}1240}1241
1242public void UnsetTIns()1243{1244this.tInsFieldSpecified = false;1245}1246
1247public void UnsetVertOverflow()1248{1249this.vertOverflowFieldSpecified = false;1250}1251
1252public void UnsetVert()1253{1254this.vertFieldSpecified = false;1255}1256
1257public bool IsSetVert()1258{1259return this.vertFieldSpecified;1260}1261
1262public bool IsSetBIns()1263{1264return this.bInsFieldSpecified;1265}1266
1267public bool IsSetLIns()1268{1269return this.lInsFieldSpecified;1270}1271
1272public bool IsSetRIns()1273{1274return this.rInsFieldSpecified;1275}1276
1277public bool IsSetTIns()1278{1279return this.tInsFieldSpecified;1280}1281
1282public void UnsetBIns()1283{1284this.bInsFieldSpecified = false;1285}1286
1287public void UnsetLIns()1288{1289this.lInsFieldSpecified = false;1290}1291
1292public void UnsetRIns()1293{1294this.rInsFieldSpecified = false;1295}1296
1297public bool IsSetSpAutoFit()1298{1299return this.spAutoFitField != null;1300}1301
1302public bool IsSetNoAutofit()1303{1304return this.noAutofitField != null;1305}1306
1307public bool IsSetNormAutofit()1308{1309return this.normAutofitField != null;1310}1311
1312public void UnsetSpAutoFit()1313{1314this.spAutoFitField = null;1315}1316
1317public void UnsetNoAutofit()1318{1319this.noAutofitField = null;1320}1321
1322public void UnsetNormAutofit()1323{1324this.normAutofitField = null;1325}1326
1327public CT_TextNoAutofit AddNewNoAutofit()1328{1329this.noAutofitField = new CT_TextNoAutofit();1330return this.noAutofitField;1331}1332
1333public CT_TextNormalAutofit AddNewNormAutofit()1334{1335this.normAutofitField = new CT_TextNormalAutofit();1336return this.normAutofitField;1337}1338
1339public CT_TextShapeAutofit AddNewSpAutoFit()1340{1341this.spAutoFitField = new CT_TextShapeAutofit();1342return this.spAutoFitField;1343}1344
1345public void UnsetHorzOverflow()1346{1347this.horzOverflowFieldSpecified = false;1348}1349
1350public bool IsSetHorzOverflow()1351{1352return this.horzOverflowFieldSpecified;1353}1354
1355
1356public bool IsSetVertOverflow()1357{1358return this.vertOverflowFieldSpecified;1359}1360
1361public bool IsSetAnchor()1362{1363return this.anchorFieldSpecified;1364}1365
1366public void UnsetAnchor()1367{1368this.anchorFieldSpecified = false;1369}1370
1371public bool IsSetWrap()1372{1373return this.wrapFieldSpecified;1374}1375public void UnsetWrap()1376{1377this.wrapFieldSpecified = false;1378}1379}1380
1381
1382[Serializable]1383
1384[System.ComponentModel.DesignerCategory("code")]1385[XmlType(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main")]1386[XmlRoot(Namespace="http://schemas.openxmlformats.org/drawingml/2006/main", IsNullable=true)]1387public class CT_TextBody {1388
1389private CT_TextBodyProperties bodyPrField;1390
1391private CT_TextListStyle lstStyleField;1392
1393private List<CT_TextParagraph> pField;1394
1395public static CT_TextBody Parse(XmlNode node, XmlNamespaceManager namespaceManager)1396{1397if (node == null)1398return null;1399CT_TextBody ctObj = new CT_TextBody();1400ctObj.p = new List<CT_TextParagraph>();1401foreach (XmlNode childNode in node.ChildNodes)1402{1403if (childNode.LocalName == "bodyPr")1404ctObj.bodyPr = CT_TextBodyProperties.Parse(childNode, namespaceManager);1405else if (childNode.LocalName == "lstStyle")1406ctObj.lstStyle = CT_TextListStyle.Parse(childNode, namespaceManager);1407else if (childNode.LocalName == "p")1408ctObj.p.Add(CT_TextParagraph.Parse(childNode, namespaceManager));1409}1410return ctObj;1411}1412
1413
1414
1415internal void Write(StreamWriter sw, string nodeName)1416{1417sw.Write(string.Format("<a:{0}", nodeName));1418sw.Write(">");1419if (this.bodyPr != null)1420this.bodyPr.Write(sw, "bodyPr");1421if (this.lstStyle != null)1422this.lstStyle.Write(sw, "lstStyle");1423foreach (CT_TextParagraph x in this.p)1424{1425x.Write(sw, "p");1426}1427sw.Write(string.Format("</a:{0}>", nodeName));1428}1429
1430public void SetPArray(CT_TextParagraph[] array)1431{1432pField = new List<CT_TextParagraph>(array);1433}1434public CT_TextParagraph AddNewP()1435{1436if (this.pField == null)1437pField = new List<CT_TextParagraph>();1438CT_TextParagraph tp = new CT_TextParagraph();1439pField.Add(tp);1440return tp;1441}1442public CT_TextBodyProperties AddNewBodyPr()1443{1444this.bodyPrField = new CT_TextBodyProperties();1445return this.bodyPrField;1446}1447public CT_TextListStyle AddNewLstStyle()1448{1449this.lstStyleField=new CT_TextListStyle();1450return this.lstStyleField;1451}1452
1453public CT_TextBodyProperties bodyPr {1454get {1455return this.bodyPrField;1456}1457set {1458this.bodyPrField = value;1459}1460}1461
1462
1463public CT_TextListStyle lstStyle {1464get {1465return this.lstStyleField;1466}1467set {1468this.lstStyleField = value;1469}1470}1471public override string ToString()1472{1473if (p == null||p.Count==0)1474return string.Empty;1475StringBuilder sb = new StringBuilder();1476foreach (CT_TextParagraph tp in p)1477{1478foreach (CT_RegularTextRun tr in tp.r)1479{1480sb.Append(tr.t);1481}1482}1483return sb.ToString();1484}1485
1486[XmlElement("p")]1487public List<CT_TextParagraph> p {1488get {1489return this.pField;1490}1491set {1492this.pField = value;1493}1494}1495}1496}
1497