public static CT_SheetPr Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_SheetPr ctObj = new CT_SheetPr(); ctObj.syncHorizontal = XmlHelper.ReadBool(node.Attributes["syncHorizontal"]); ctObj.syncVertical = XmlHelper.ReadBool(node.Attributes["syncVertical"]); ctObj.syncRef = XmlHelper.ReadString(node.Attributes["syncRef"]); ctObj.transitionEvaluation = XmlHelper.ReadBool(node.Attributes["transitionEvaluation"]); ctObj.transitionEntry = XmlHelper.ReadBool(node.Attributes["transitionEntry"]); ctObj.published = XmlHelper.ReadBool(node.Attributes["published"]); ctObj.codeName = XmlHelper.ReadString(node.Attributes["codeName"]); ctObj.filterMode = XmlHelper.ReadBool(node.Attributes["filterMode"]); ctObj.enableFormatConditionsCalculation = XmlHelper.ReadBool(node.Attributes["enableFormatConditionsCalculation"]); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "tabColor") { ctObj.tabColor = CT_Color.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "outlinePr") { ctObj.outlinePr = CT_OutlinePr.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "pageSetUpPr") { ctObj.pageSetUpPr = CT_PageSetUpPr.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_Colors Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Colors ctObj = new CT_Colors(); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "indexedColors") { ctObj.indexedColors = new List <CT_RgbColor>(); foreach (XmlNode c2Node in childNode.ChildNodes) { ctObj.indexedColors.Add(CT_RgbColor.Parse(c2Node, namespaceManager)); } } else if (childNode.LocalName == "mruColors") { ctObj.mruColors = new List <CT_Color>(); foreach (XmlNode c2Node in childNode.ChildNodes) { ctObj.mruColors.Add(CT_Color.Parse(c2Node, namespaceManager)); } } } return(ctObj); }
public static CT_PatternFill Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_PatternFill ctObj = new CT_PatternFill(); if (node.Attributes["patternType"] != null) { ctObj.patternType = (ST_PatternType)Enum.Parse(typeof(ST_PatternType), node.Attributes["patternType"].Value); } foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "fgColor") { ctObj.fgColor = CT_Color.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "bgColor") { ctObj.bgColor = CT_Color.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_GradientStop Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_GradientStop ctObj = new CT_GradientStop(); ctObj.positionField = XmlHelper.ReadDouble(node.Attributes["position"]); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "color") { ctObj.colorField = CT_Color.Parse(childNode, namespaceManager); break; } } return(ctObj); }
public static CT_BorderPr Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_BorderPr ctObj = new CT_BorderPr(); if (node.Attributes["style"] != null) { ctObj.style = (ST_BorderStyle)Enum.Parse(typeof(ST_BorderStyle), node.Attributes["style"].Value); } foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "color") { ctObj.color = CT_Color.Parse(childNode, namespaceManager); } } return(ctObj); }
public static CT_Font Parse(XmlNode node, XmlNamespaceManager namespaceManager) { if (node == null) { return(null); } CT_Font ctObj = new CT_Font(); ctObj.charset = new List <CT_IntProperty>(); ctObj.family = new List <CT_IntProperty>(); ctObj.b = new List <CT_BooleanProperty>(); ctObj.i = new List <CT_BooleanProperty>(); ctObj.strike = new List <CT_BooleanProperty>(); ctObj.color = new List <CT_Color>(); ctObj.sz = new List <CT_FontSize>(); ctObj.u = new List <CT_UnderlineProperty>(); ctObj.vertAlign = new List <CT_VerticalAlignFontProperty>(); ctObj.scheme = new List <CT_FontScheme>(); foreach (XmlNode childNode in node.ChildNodes) { if (childNode.LocalName == "outline") { ctObj.outline = CT_BooleanProperty.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "shadow") { ctObj.shadow = CT_BooleanProperty.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "condense") { ctObj.condense = CT_BooleanProperty.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "extend") { ctObj.extend = CT_BooleanProperty.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "name") { ctObj.name = CT_FontName.Parse(childNode, namespaceManager); } else if (childNode.LocalName == "charset") { ctObj.charset.Add(CT_IntProperty.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "family") { ctObj.family.Add(CT_IntProperty.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "b") { ctObj.b.Add(CT_BooleanProperty.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "i") { ctObj.i.Add(CT_BooleanProperty.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "strike") { ctObj.strike.Add(CT_BooleanProperty.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "color") { ctObj.color.Add(CT_Color.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "sz") { ctObj.sz.Add(CT_FontSize.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "u") { ctObj.u.Add(CT_UnderlineProperty.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "vertAlign") { ctObj.vertAlign.Add(CT_VerticalAlignFontProperty.Parse(childNode, namespaceManager)); } else if (childNode.LocalName == "scheme") { ctObj.scheme.Add(CT_FontScheme.Parse(childNode, namespaceManager)); } } return(ctObj); }