public CT_EffectStyleItem() { this.sp3dField = new CT_Shape3D(); this.scene3dField = new CT_Scene3D(); this.effectDagField = new CT_EffectContainer(); this.effectLstField = new CT_EffectList(); }
public static CT_Shape3D Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Shape3D ctObj = new CT_Shape3D(); ctObj.z = XmlHelper.ReadLong(node.Attributes["z"]); ctObj.extrusionH = XmlHelper.ReadLong(node.Attributes["extrusionH"]); ctObj.contourW = XmlHelper.ReadLong(node.Attributes["contourW"]); if (node.Attributes["prstMaterial"] != null) { ctObj.prstMaterial = (ST_PresetMaterialType)Enum.Parse(typeof(ST_PresetMaterialType), node.Attributes["prstMaterial"].Value); } foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "bevelT") { ctObj.bevelT = CT_Bevel.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "bevelB") { ctObj.bevelB = CT_Bevel.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "extrusionClr") { ctObj.extrusionClr = CT_Color.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "contourClr") { ctObj.contourClr = CT_Color.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "extLst") { ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_TextBodyProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_TextBodyProperties ctObj = new CT_TextBodyProperties(); ctObj.rot = XmlHelper.ReadInt(node.Attributes["rot"]); ctObj.spcFirstLastPara = XmlHelper.ReadBool(node.Attributes["spcFirstLastPara"]); if (node.Attributes["vertOverflow"] != null) { ctObj.vertOverflow = (ST_TextVertOverflowType)Enum.Parse(typeof(ST_TextVertOverflowType), node.Attributes["vertOverflow"].Value); } if (node.Attributes["horzOverflow"] != null) { ctObj.horzOverflow = (ST_TextHorzOverflowType)Enum.Parse(typeof(ST_TextHorzOverflowType), node.Attributes["horzOverflow"].Value); } if (node.Attributes["vert"] != null) { ctObj.vert = (ST_TextVerticalType)Enum.Parse(typeof(ST_TextVerticalType), node.Attributes["vert"].Value); } if (node.Attributes["wrap"] != null) { ctObj.wrap = (ST_TextWrappingType)Enum.Parse(typeof(ST_TextWrappingType), node.Attributes["wrap"].Value); } ctObj.lIns = XmlHelper.ReadInt(node.Attributes["lIns"]); ctObj.tIns = XmlHelper.ReadInt(node.Attributes["tIns"]); ctObj.rIns = XmlHelper.ReadInt(node.Attributes["rIns"]); ctObj.bIns = XmlHelper.ReadInt(node.Attributes["bIns"]); ctObj.numCol = XmlHelper.ReadInt(node.Attributes["numCol"]); ctObj.spcCol = XmlHelper.ReadInt(node.Attributes["spcCol"]); ctObj.rtlCol = XmlHelper.ReadBool(node.Attributes["rtlCol"]); ctObj.fromWordArt = XmlHelper.ReadBool(node.Attributes["fromWordArt"]); if (node.Attributes["anchor"] != null) { ctObj.anchor = (ST_TextAnchoringType)Enum.Parse(typeof(ST_TextAnchoringType), node.Attributes["anchor"].Value); } ctObj.anchorCtr = XmlHelper.ReadBool(node.Attributes["anchorCtr"]); ctObj.forceAA = XmlHelper.ReadBool(node.Attributes["forceAA"]); ctObj.upright = XmlHelper.ReadBool(node.Attributes["upright"]); ctObj.compatLnSpc = XmlHelper.ReadBool(node.Attributes["compatLnSpc"]); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "prstTxWarp") { ctObj.prstTxWarp = CT_PresetTextShape.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "noAutofit") { ctObj.noAutofit = new CT_TextNoAutofit(); } else if (childNode.LocalName == "normAutofit") { ctObj.normAutofit = CT_TextNormalAutofit.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "spAutoFit") { ctObj.spAutoFit = new CT_TextShapeAutofit(); } else if (childNode.LocalName == "scene3d") { ctObj.scene3d = CT_Scene3D.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "sp3d") { ctObj.sp3d = CT_Shape3D.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "flatTx") { ctObj.flatTx = CT_FlatText.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "extLst") { ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_Shape3D Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) return null; CT_Shape3D ctObj = new CT_Shape3D(); ctObj.z = XmlHelper.ReadLong(node.Attributes["z"]); ctObj.extrusionH = XmlHelper.ReadLong(node.Attributes["extrusionH"]); ctObj.contourW = XmlHelper.ReadLong(node.Attributes["contourW"]); if (node.Attributes["prstMaterial"] != null) ctObj.prstMaterial = (ST_PresetMaterialType)Enum.Parse(typeof(ST_PresetMaterialType), node.Attributes["prstMaterial"].Value); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "bevelT") ctObj.bevelT = CT_Bevel.Parse(childNode, namespaceManager); else if (childNode.LocalName == "bevelB") ctObj.bevelB = CT_Bevel.Parse(childNode, namespaceManager); else if (childNode.LocalName == "extrusionClr") ctObj.extrusionClr = CT_Color.Parse(childNode, namespaceManager); else if (childNode.LocalName == "contourClr") ctObj.contourClr = CT_Color.Parse(childNode, namespaceManager); else if (childNode.LocalName == "extLst") ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager); } return ctObj; }