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

            ctObj.typeface    = XmlHelper.ReadString(node.Attribute("typeface"));
            ctObj.panose      = XmlHelper.ReadBytes(node.Attribute("panose"));
            ctObj.pitchFamily = XmlHelper.ReadSByte(node.Attribute("pitchFamily"));
            if (node.Attribute("charset") != null)
            {
                ctObj.charsetField = XmlHelper.ReadSByte(node.Attribute("charset"));
            }
            return(ctObj);
        }
Esempio n. 2
0
 public CT_TextFont AddNewSym()
 {
     this.symField = new CT_TextFont();
     return(this.symField);
 }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public void UnsetCs()
 {
     this.csField = null;
 }
Esempio n. 5
0
 public void UnsetSym()
 {
     this.symField = null;
 }
Esempio n. 6
0
 public void UnsetLatin()
 {
     this.latinField = null;
 }
Esempio n. 7
0
 public CT_TextFont AddNewLatin()
 {
     this.latinField = new CT_TextFont();
     return(this.latinField);
 }
Esempio n. 8
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);
        }
Esempio n. 9
0
 public void UnsetBuFont()
 {
     this.buFontField = null;
 }
Esempio n. 10
0
 public CT_TextFont AddNewBuFont()
 {
     this.buFontField = new CT_TextFont();
     return(this.buFontField);
 }