Beispiel #1
0
 public static CT_LineProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_LineProperties ctObj = new CT_LineProperties();
     ctObj.w = XmlHelper.ReadInt(node.Attributes["w"]);
     if (node.Attributes["cap"] != null)
         ctObj.cap = (ST_LineCap)Enum.Parse(typeof(ST_LineCap), node.Attributes["cap"].Value);
     if (node.Attributes["cmpd"] != null)
         ctObj.cmpd = (ST_CompoundLine)Enum.Parse(typeof(ST_CompoundLine), node.Attributes["cmpd"].Value);
     if (node.Attributes["algn"] != null)
         ctObj.algn = (ST_PenAlignment)Enum.Parse(typeof(ST_PenAlignment), node.Attributes["algn"].Value);
     ctObj.custDash = new List<CT_DashStop>();
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "noFill")
             ctObj.noFill = new CT_NoFillProperties();
         else if (childNode.LocalName == "solidFill")
             ctObj.solidFill = CT_SolidColorFillProperties.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "gradFill")
             ctObj.gradFill = CT_GradientFillProperties.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "pattFill")
             ctObj.pattFill = CT_PatternFillProperties.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "prstDash")
             ctObj.prstDash = CT_PresetLineDashProperties.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "round")
             ctObj.round = new CT_LineJoinRound();
         else if (childNode.LocalName == "bevel")
             ctObj.bevel = new CT_LineJoinBevel();
         else if (childNode.LocalName == "miter")
             ctObj.miter = CT_LineJoinMiterProperties.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "headEnd")
             ctObj.headEnd = CT_LineEndProperties.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "tailEnd")
             ctObj.tailEnd = CT_LineEndProperties.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "extLst")
             ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "custDash")
             ctObj.custDash.Add(CT_DashStop.Parse(childNode, namespaceManager));
     }
     return ctObj;
 }
Beispiel #2
0
 public CT_LineProperties AddNewLn()
 {
     this.lnField = new CT_LineProperties();
     return lnField;
 }
Beispiel #3
0
 public CT_TableCellProperties()
 {
     this.extLstField = new CT_OfficeArtExtensionList();
     this.grpFillField = new CT_GroupFillProperties();
     this.pattFillField = new CT_PatternFillProperties();
     this.blipFillField = new CT_BlipFillProperties();
     this.gradFillField = new CT_GradientFillProperties();
     this.solidFillField = new CT_SolidColorFillProperties();
     this.noFillField = new CT_NoFillProperties();
     this.cell3DField = new CT_Cell3D();
     this.lnBlToTrField = new CT_LineProperties();
     this.lnTlToBrField = new CT_LineProperties();
     this.lnBField = new CT_LineProperties();
     this.lnTField = new CT_LineProperties();
     this.lnRField = new CT_LineProperties();
     this.lnLField = new CT_LineProperties();
     this.marLField = 91440;
     this.marRField = 91440;
     this.marTField = 45720;
     this.marBField = 45720;
     this.vertField = ST_TextVerticalType.horz;
     this.anchorField = ST_TextAnchoringType.t;
     this.anchorCtrField = false;
     this.horzOverflowField = ST_TextHorzOverflowType.clip;
 }
Beispiel #4
0
 public CT_TextCharacterProperties()
 {
     this.extLstField = new CT_OfficeArtExtensionList();
     this.hlinkMouseOverField = new CT_Hyperlink();
     this.hlinkClickField = new CT_Hyperlink();
     this.symField = new CT_TextFont();
     this.csField = new CT_TextFont();
     this.eaField = new CT_TextFont();
     this.latinField = new CT_TextFont();
     this.uFillField = new CT_TextUnderlineFillGroupWrapper();
     this.uFillTxField = new CT_TextUnderlineFillFollowText();
     this.uLnField = new CT_LineProperties();
     this.uLnTxField = new CT_TextUnderlineLineFollowText();
     this.highlightField = new CT_Color();
     this.effectDagField = new CT_EffectContainer();
     this.effectLstField = new CT_EffectList();
     this.grpFillField = new CT_GroupFillProperties();
     this.pattFillField = new CT_PatternFillProperties();
     this.blipFillField = new CT_BlipFillProperties();
     this.gradFillField = new CT_GradientFillProperties();
     this.solidFillField = new CT_SolidColorFillProperties();
     this.noFillField = new CT_NoFillProperties();
     this.lnField = new CT_LineProperties();
     this.dirtyField = true;
     this.errField = false;
     this.smtCleanField = true;
     this.smtIdField = ((uint)(0));
 }
 public CT_WholeE2oFormatting()
 {
     this.effectDagField = new CT_EffectContainer();
     this.effectLstField = new CT_EffectList();
     this.lnField = new CT_LineProperties();
 }
Beispiel #6
0
        public static CT_TextCharacterProperties Parse(XmlNode node, XmlNamespaceManager namespaceManager)
        {
            if (node == null)
            {
                return(null);
            }
            CT_TextCharacterProperties ctObj = new CT_TextCharacterProperties();

            ctObj.kumimoji = XmlHelper.ReadBool(node.Attributes["kumimoji"]);
            ctObj.lang     = XmlHelper.ReadString(node.Attributes["lang"]);
            ctObj.altLang  = XmlHelper.ReadString(node.Attributes["altLang"]);
            ctObj.sz       = XmlHelper.ReadInt(node.Attributes["sz"]);
            if (node.Attributes["b"] != null)
            {
                ctObj.b = XmlHelper.ReadBool(node.Attributes["b"]);
            }
            if (node.Attributes["i"] != null)
            {
                ctObj.i = XmlHelper.ReadBool(node.Attributes["i"]);
            }
            if (node.Attributes["u"] != null)
            {
                ctObj.u = (ST_TextUnderlineType)Enum.Parse(typeof(ST_TextUnderlineType), node.Attributes["u"].Value);
            }
            if (node.Attributes["strike"] != null)
            {
                ctObj.strike = (ST_TextStrikeType)Enum.Parse(typeof(ST_TextStrikeType), node.Attributes["strike"].Value);
            }
            ctObj.kern = XmlHelper.ReadInt(node.Attributes["kern"]);
            if (node.Attributes["cap"] != null)
            {
                ctObj.cap = (ST_TextCapsType)Enum.Parse(typeof(ST_TextCapsType), node.Attributes["cap"].Value);
            }
            ctObj.spc        = XmlHelper.ReadInt(node.Attributes["spc"]);
            ctObj.normalizeH = XmlHelper.ReadBool(node.Attributes["normalizeH"]);
            ctObj.baseline   = XmlHelper.ReadInt(node.Attributes["baseline"]);
            ctObj.noProof    = XmlHelper.ReadBool(node.Attributes["noProof"]);
            if (node.Attributes["dirty"] != null)
            {
                ctObj.dirty = XmlHelper.ReadBool(node.Attributes["dirty"]);
            }
            ctObj.err = XmlHelper.ReadBool(node.Attributes["err"]);
            if (node.Attributes["smtClean"] != null)
            {
                ctObj.smtClean = XmlHelper.ReadBool(node.Attributes["smtClean"]);
            }
            ctObj.smtId = XmlHelper.ReadUInt(node.Attributes["smtId"]);
            ctObj.bmk   = XmlHelper.ReadString(node.Attributes["bmk"]);
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.LocalName == "ln")
                {
                    ctObj.ln = CT_LineProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "noFill")
                {
                    ctObj.noFill = new CT_NoFillProperties();
                }
                else if (childNode.LocalName == "solidFill")
                {
                    ctObj.solidFill = CT_SolidColorFillProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "gradFill")
                {
                    ctObj.gradFill = CT_GradientFillProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "blipFill")
                {
                    ctObj.blipFill = CT_BlipFillProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "pattFill")
                {
                    ctObj.pattFill = CT_PatternFillProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "grpFill")
                {
                    ctObj.grpFill = new CT_GroupFillProperties();
                }
                else if (childNode.LocalName == "effectLst")
                {
                    ctObj.effectLst = CT_EffectList.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "effectDag")
                {
                    ctObj.effectDag = CT_EffectContainer.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "highlight")
                {
                    ctObj.highlight = CT_Color.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "uLnTx")
                {
                    ctObj.uLnTx = new CT_TextUnderlineLineFollowText();
                }
                else if (childNode.LocalName == "uLn")
                {
                    ctObj.uLn = CT_LineProperties.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "uFillTx")
                {
                    ctObj.uFillTx = new CT_TextUnderlineFillFollowText();
                }
                else if (childNode.LocalName == "uFill")
                {
                    ctObj.uFill = CT_TextUnderlineFillGroupWrapper.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "latin")
                {
                    ctObj.latin = CT_TextFont.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "ea")
                {
                    ctObj.ea = CT_TextFont.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "cs")
                {
                    ctObj.cs = CT_TextFont.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "sym")
                {
                    ctObj.sym = CT_TextFont.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "hlinkClick")
                {
                    ctObj.hlinkClick = CT_Hyperlink.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "hlinkMouseOver")
                {
                    ctObj.hlinkMouseOver = CT_Hyperlink.Parse(childNode, namespaceManager);
                }
                else if (childNode.LocalName == "extLst")
                {
                    ctObj.extLst = CT_OfficeArtExtensionList.Parse(childNode, namespaceManager);
                }
            }
            return(ctObj);
        }
Beispiel #7
0
 public CT_WholeE2oFormatting()
 {
     this.effectDagField = new CT_EffectContainer();
     this.effectLstField = new CT_EffectList();
     this.lnField        = new CT_LineProperties();
 }