Пример #1
0
        internal void InitLvl()
        {
            List<CT_Lvl> list = new List<CT_Lvl>();
            for (int i = 0; i < 9; i++)
            {
                CT_Lvl lvl = new CT_Lvl();
                lvl.start.val = "1";
                lvl.tentative = i==0? ST_OnOff.on : ST_OnOff.off;
                lvl.ilvl = i.ToString();
                lvl.lvlJc.val = ST_Jc.left;
                lvl.numFmt.val = ST_NumberFormat.bullet;
                lvl.lvlText.val = lvlText[i % 3].ToString();
                CT_Ind ind = lvl.pPr.AddNewInd();
                ind.left = (420 * (i + 1)).ToString();
                ind.hanging = 420;
                CT_Fonts fonts = lvl.rPr.AddNewRFonts();
                fonts.ascii = "Wingdings";
                fonts.hAnsi = "Wingdings";
                fonts.hint = ST_Hint.@default;

                list.Add(lvl);
            }
            ctAbstractNum.lvl = list;
        }
Пример #2
0
 public CT_NumLvl()
 {
     this.lvlField           = new CT_Lvl();
     this.startOverrideField = new CT_DecimalNumber();
 }
Пример #3
0
 public static CT_Lvl Parse(XmlNode node, XmlNamespaceManager namespaceManager)
 {
     if (node == null)
         return null;
     CT_Lvl ctObj = new CT_Lvl();
     ctObj.ilvl = XmlHelper.ReadString(node.Attributes["w:ilvl"]);
     ctObj.tplc = XmlHelper.ReadBytes(node.Attributes["w:tplc"]);
     if (node.Attributes["w:tentative"] != null)
         ctObj.tentative = (ST_OnOff)Enum.Parse(typeof(ST_OnOff), node.Attributes["w:tentative"].Value);
     foreach (XmlNode childNode in node.ChildNodes)
     {
         if (childNode.LocalName == "start")
             ctObj.start = CT_DecimalNumber.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "numFmt")
             ctObj.numFmt = CT_NumFmt.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "lvlRestart")
             ctObj.lvlRestart = CT_DecimalNumber.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "pStyle")
             ctObj.pStyle = CT_String.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "isLgl")
             ctObj.isLgl = CT_OnOff.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "suff")
             ctObj.suff = CT_LevelSuffix.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "lvlText")
             ctObj.lvlText = CT_LevelText.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "lvlPicBulletId")
             ctObj.lvlPicBulletId = CT_DecimalNumber.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "legacy")
             ctObj.legacy = CT_LvlLegacy.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "lvlJc")
             ctObj.lvlJc = CT_Jc.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "pPr")
             ctObj.pPr = CT_PPr.Parse(childNode, namespaceManager);
         else if (childNode.LocalName == "rPr")
             ctObj.rPr = CT_RPr.Parse(childNode, namespaceManager);
     }
     return ctObj;
 }
Пример #4
0
 public CT_NumLvl()
 {
     this.lvlField = new CT_Lvl();
     this.startOverrideField = new CT_DecimalNumber();
 }