public static CT_TextUnderlineFillGroupWrapper Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_TextUnderlineFillGroupWrapper ctObj = new CT_TextUnderlineFillGroupWrapper(); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "noFill") { ctObj.noFill = new CT_NoFillProperties(); } else if (childNode.Name.LocalName == "solidFill") { ctObj.solidFill = CT_SolidColorFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "gradFill") { ctObj.gradFill = CT_GradientFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "blipFill") { ctObj.blipFill = CT_BlipFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "pattFill") { ctObj.pattFill = CT_PatternFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "grpFill") { ctObj.grpFill = new CT_GroupFillProperties(); } } return(ctObj); }
public static CT_TextCharacterProperties Parse(XElement node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_TextCharacterProperties ctObj = new CT_TextCharacterProperties(); ctObj.kumimoji = XmlHelper.ReadBool(node.Attribute("kumimoji")); ctObj.lang = XmlHelper.ReadString(node.Attribute("lang")); ctObj.altLang = XmlHelper.ReadString(node.Attribute("altLang")); ctObj.sz = XmlHelper.ReadInt(node.Attribute("sz")); if (node.Attribute("b") != null) { ctObj.b = XmlHelper.ReadBool(node.Attribute("b")); } if (node.Attribute("i") != null) { ctObj.i = XmlHelper.ReadBool(node.Attribute("i")); } if (node.Attribute("u") != null) { ctObj.u = (ST_TextUnderlineType)Enum.Parse(typeof(ST_TextUnderlineType), node.Attribute("u").Value); } if (node.Attribute("strike") != null) { ctObj.strike = (ST_TextStrikeType)Enum.Parse(typeof(ST_TextStrikeType), node.Attribute("strike").Value); } ctObj.kern = XmlHelper.ReadInt(node.Attribute("kern")); if (node.Attribute("cap") != null) { ctObj.cap = (ST_TextCapsType)Enum.Parse(typeof(ST_TextCapsType), node.Attribute("cap").Value); } ctObj.spc = XmlHelper.ReadInt(node.Attribute("spc")); ctObj.normalizeH = XmlHelper.ReadBool(node.Attribute("normalizeH")); ctObj.baseline = XmlHelper.ReadInt(node.Attribute("baseline")); ctObj.noProof = XmlHelper.ReadBool(node.Attribute("noProof")); if (node.Attribute("dirty") != null) { ctObj.dirty = XmlHelper.ReadBool(node.Attribute("dirty")); } ctObj.err = XmlHelper.ReadBool(node.Attribute("err")); if (node.Attribute("smtClean") != null) { ctObj.smtClean = XmlHelper.ReadBool(node.Attribute("smtClean")); } ctObj.smtId = XmlHelper.ReadUInt(node.Attribute("smtId")); ctObj.bmk = XmlHelper.ReadString(node.Attribute("bmk")); foreach (XElement childNode in node.ChildElements()) { if (childNode.Name.LocalName == "ln") { ctObj.ln = CT_LineProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "noFill") { ctObj.noFill = new CT_NoFillProperties(); } else if (childNode.Name.LocalName == "solidFill") { ctObj.solidFill = CT_SolidColorFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "gradFill") { ctObj.gradFill = CT_GradientFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "blipFill") { ctObj.blipFill = CT_BlipFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "pattFill") { ctObj.pattFill = CT_PatternFillProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "grpFill") { ctObj.grpFill = new CT_GroupFillProperties(); } else if (childNode.Name.LocalName == "effectLst") { ctObj.effectLst = CT_EffectList.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "effectDag") { ctObj.effectDag = CT_EffectContainer.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "highlight") { ctObj.highlight = CT_Color.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "uLnTx") { ctObj.uLnTx = new CT_TextUnderlineLineFollowText(); } else if (childNode.Name.LocalName == "uLn") { ctObj.uLn = CT_LineProperties.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "uFillTx") { ctObj.uFillTx = new CT_TextUnderlineFillFollowText(); } else if (childNode.Name.LocalName == "uFill") { ctObj.uFill = CT_TextUnderlineFillGroupWrapper.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "latin") { ctObj.latin = CT_TextFont.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "ea") { ctObj.ea = CT_TextFont.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "cs") { ctObj.cs = CT_TextFont.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "sym") { ctObj.sym = CT_TextFont.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "hlinkClick") { ctObj.hlinkClick = CT_Hyperlink.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "hlinkMouseOver") { ctObj.hlinkMouseOver = CT_Hyperlink.Parse(childNode, namespaceManager); } else if (childNode.Name.LocalName == "extLst") { ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager); } } return(ctObj); }