Esempio n. 1
0
        public CT_NumFmt AddNewNumFmt()
        {
            if (this.numFmtField == null)
            {
                this.numFmtField = new List <CT_NumFmt>();
            }
            CT_NumFmt newNumFmt = new CT_NumFmt();

            this.numFmtField.Add(newNumFmt);
            return(newNumFmt);
        }
Esempio n. 2
0
        public static CT_NumFmt Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_NumFmt ctObj = new CT_NumFmt();

            ctObj.numFmtId   = XmlHelper.ReadUInt(node.Attribute("numFmtId"));
            ctObj.formatCode = XmlHelper.ReadString(node.Attribute("formatCode"));
            return(ctObj);
        }
Esempio n. 3
0
        public static CT_NumFmts Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_NumFmts ctObj = new CT_NumFmts();

            ctObj.count  = XmlHelper.ReadUInt(node.Attribute("count"));
            ctObj.numFmt = new List <CT_NumFmt>();
            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "numFmt")
                {
                    ctObj.numFmt.Add(CT_NumFmt.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }
Esempio n. 4
0
        public static CT_Dxf Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_Dxf ctObj = new CT_Dxf();

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "font")
                {
                    ctObj.font = CT_Font.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "numFmt")
                {
                    ctObj.numFmt = CT_NumFmt.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "fill")
                {
                    ctObj.fill = CT_Fill.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "alignment")
                {
                    ctObj.alignment = CT_CellAlignment.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "border")
                {
                    ctObj.border = CT_Border.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "protection")
                {
                    ctObj.protection = CT_CellProtection.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst = CT_ExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }