Esempio n. 1
0
        internal static CT_TextTabStopList Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            CT_TextTabStopList ttsl = new CT_TextTabStopList();

            ttsl.tab = new List <CT_TextTabStop>();
            foreach (XmlNode childNode in node)
            {
                if (childNode.LocalName == "tab")
                {
                    ttsl.tab.Add(CT_TextTabStop.Parse(childNode, namespaceManager));
                }
            }
            return(ttsl);
        }
Esempio n. 2
0
        public static CT_TextTabStop Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TextTabStop ctObj = new CT_TextTabStop();

            ctObj.pos = XmlHelper.ReadInt(node.Attributes["pos"]);
            if (node.Attributes["algn"] != null)
            {
                ctObj.algn = (ST_TextTabAlignType)Enum.Parse(typeof(ST_TextTabAlignType), node.Attributes["algn"].Value);
            }
            return(ctObj);
        }
Esempio n. 3
0
 public static CT_TextTabStop Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_TextTabStop ctObj = new CT_TextTabStop();
     ctObj.pos = XmlHelper.ReadInt(node.Attributes["pos"]);
     if (node.Attributes["algn"] != null)
         ctObj.algn = (ST_TextTabAlignType)Enum.Parse(typeof(ST_TextTabAlignType), node.Attributes["algn"].Value);
     return ctObj;
 }
Esempio n. 4
0
        public static CT_TextParagraphProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TextParagraphProperties ctObj = new CT_TextParagraphProperties();

            ctObj.marL   = XmlHelper.ReadInt(node.Attributes["marL"]);
            ctObj.marR   = XmlHelper.ReadInt(node.Attributes["marR"]);
            ctObj.lvl    = XmlHelper.ReadInt(node.Attributes["lvl"]);
            ctObj.indent = XmlHelper.ReadInt(node.Attributes["indent"]);
            if (node.Attributes["algn"] != null)
            {
                ctObj.algn = (ST_TextAlignType)Enum.Parse(typeof(ST_TextAlignType), node.Attributes["algn"].Value);
            }
            ctObj.defTabSz = XmlHelper.ReadInt(node.Attributes["defTabSz"]);
            ctObj.rtl      = XmlHelper.ReadBool(node.Attributes["rtl"]);
            ctObj.eaLnBrk  = XmlHelper.ReadBool(node.Attributes["eaLnBrk"]);
            if (node.Attributes["fontAlgn"] != null)
            {
                ctObj.fontAlgn = (ST_TextFontAlignType)Enum.Parse(typeof(ST_TextFontAlignType), node.Attributes["fontAlgn"].Value);
            }
            ctObj.latinLnBrk   = XmlHelper.ReadBool(node.Attributes["latinLnBrk"]);
            ctObj.hangingPunct = XmlHelper.ReadBool(node.Attributes["hangingPunct"]);
            ctObj.tabLst       = new List <CT_TextTabStop>();
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "lnSpc")
                {
                    ctObj.lnSpc = CT_TextSpacing.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "spcBef")
                {
                    ctObj.spcBef = CT_TextSpacing.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "spcAft")
                {
                    ctObj.spcAft = CT_TextSpacing.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "buClrTx")
                {
                    ctObj.buClrTx = new CT_TextBulletColorFollowText();
                }
                else if (childNode.LocalName == "buClr")
                {
                    ctObj.buClr = CT_Color.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "buSzTx")
                {
                    ctObj.buSzTx = new CT_TextBulletSizeFollowText();
                }
                else if (childNode.LocalName == "buSzPct")
                {
                    ctObj.buSzPct = CT_TextBulletSizePercent.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "buSzPts")
                {
                    ctObj.buSzPts = CT_TextBulletSizePoint.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "buFontTx")
                {
                    ctObj.buFontTx = new CT_TextBulletTypefaceFollowText();
                }
                else if (childNode.LocalName == "buFont")
                {
                    ctObj.buFont = CT_TextFont.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "buNone")
                {
                    ctObj.buNone = new CT_TextNoBullet();
                }
                else if (childNode.LocalName == "buAutoNum")
                {
                    ctObj.buAutoNum = CT_TextAutonumberBullet.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "buChar")
                {
                    ctObj.buChar = CT_TextCharBullet.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "buBlip")
                {
                    ctObj.buBlip = CT_TextBlipBullet.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "defRPr")
                {
                    ctObj.defRPr = CT_TextCharacterProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "tabLst")
                {
                    ctObj.tabLst.Add(CT_TextTabStop.Parse(childNode, namespaceManager));
                }
            }
            return(ctObj);
        }