public static CT_ShapeStyle Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_ShapeStyle ctObj = new CT_ShapeStyle(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "lnRef") { ctObj.lnRef = CT_StyleMatrixReference.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "fillRef") { ctObj.fillRef = CT_StyleMatrixReference.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "effectRef") { ctObj.effectRef = CT_StyleMatrixReference.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "fontRef") { ctObj.fontRef = CT_FontReference.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_FontReference Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_FontReference ctObj = new CT_FontReference(); if (node.Attribute("idx") != null) { ctObj.idx = (ST_FontCollectionIndex)Enum.Parse(typeof(ST_FontCollectionIndex), node.Attribute("idx").Value); } foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "scrgbClr") { ctObj.scrgbClr = CT_ScRgbColor.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "srgbClr") { ctObj.srgbClr = CT_SRgbColor.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "hslClr") { ctObj.hslClr = CT_HslColor.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "sysClr") { ctObj.sysClr = CT_SystemColor.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "schemeClr") { ctObj.schemeClr = CT_SchemeColor.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "prstClr") { ctObj.prstClr = CT_PresetColor.Parse(childNode, namespaceManager); } } return(ctObj); }
public CT_FontReference AddNewFontRef() { this.fontRefField = new CT_FontReference(); return(this.fontRefField); }