Exemplo n.º 1
0
        public static CT_TextBulletSizePercent Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TextBulletSizePercent ctObj = new CT_TextBulletSizePercent();

            ctObj.val = XmlHelper.ReadInt(node.Attribute("val"));
            return(ctObj);
        }
Exemplo n.º 2
0
 public CT_TextBulletSizePercent AddNewBuSzPct()
 {
     this.buSzPctField = new CT_TextBulletSizePercent();
     return(this.buSzPctField);
 }
Exemplo n.º 3
0
        public static CT_TextParagraphProperties Parse(XElement node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TextParagraphProperties ctObj = new CT_TextParagraphProperties();

            ctObj.marL   = XmlHelper.ReadInt(node.Attribute("marL"));
            ctObj.marR   = XmlHelper.ReadInt(node.Attribute("marR"));
            ctObj.lvl    = XmlHelper.ReadInt(node.Attribute("lvl"));
            ctObj.indent = XmlHelper.ReadInt(node.Attribute("indent"));
            if (node.Attribute("algn") != null)
            {
                ctObj.algn = (ST_TextAlignType)Enum.Parse(typeof(ST_TextAlignType), node.Attribute("algn").Value);
            }
            else
            {
                ctObj.algn = ST_TextAlignType.l;
            }
            ctObj.defTabSz = XmlHelper.ReadInt(node.Attribute("defTabSz"));
            ctObj.rtl      = XmlHelper.ReadBool(node.Attribute("rtl"));
            ctObj.eaLnBrk  = XmlHelper.ReadBool(node.Attribute("eaLnBrk"));
            if (node.Attribute("fontAlgn") != null)
            {
                ctObj.fontAlgn = (ST_TextFontAlignType)Enum.Parse(typeof(ST_TextFontAlignType), node.Attribute("fontAlgn").Value);
            }
            ctObj.latinLnBrk   = XmlHelper.ReadBool(node.Attribute("latinLnBrk"));
            ctObj.hangingPunct = XmlHelper.ReadBool(node.Attribute("hangingPunct"));

            foreach (XElement childNode in node.ChildElements())
            {
                if (childNode.Name.LocalName == "lnSpc")
                {
                    ctObj.lnSpc = CT_TextSpacing.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "spcBef")
                {
                    ctObj.spcBef = CT_TextSpacing.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "spcAft")
                {
                    ctObj.spcAft = CT_TextSpacing.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "buClrTx")
                {
                    ctObj.buClrTx = new CT_TextBulletColorFollowText();
                }
                else if (childNode.Name.LocalName == "buClr")
                {
                    ctObj.buClr = CT_Color.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "buSzTx")
                {
                    ctObj.buSzTx = new CT_TextBulletSizeFollowText();
                }
                else if (childNode.Name.LocalName == "buSzPct")
                {
                    ctObj.buSzPct = CT_TextBulletSizePercent.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "buSzPts")
                {
                    ctObj.buSzPts = CT_TextBulletSizePoint.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "buFontTx")
                {
                    ctObj.buFontTx = new CT_TextBulletTypefaceFollowText();
                }
                else if (childNode.Name.LocalName == "buFont")
                {
                    ctObj.buFont = CT_TextFont.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "buNone")
                {
                    ctObj.buNone = new CT_TextNoBullet();
                }
                else if (childNode.Name.LocalName == "buAutoNum")
                {
                    ctObj.buAutoNum = CT_TextAutonumberBullet.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "buChar")
                {
                    ctObj.buChar = CT_TextCharBullet.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "buBlip")
                {
                    ctObj.buBlip = CT_TextBlipBullet.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "defRPr")
                {
                    ctObj.defRPr = CT_TextCharacterProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
                else if (childNode.Name.LocalName == "tabLst")
                {
                    ctObj.tabLst = CT_TextTabStopList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Exemplo n.º 4
0
 public void UnsetBuSzPct()
 {
     this.buSzPctField = null;
 }