示例#1
0
        /**
         * add a new AbstractNum and return its AbstractNumID
         * @param abstractNum
         */
        public string AddAbstractNum(XWPFAbstractNum abstractNum)
        {
            int pos = abstractNums.Count;

            if (abstractNum.GetAbstractNum() != null)
            { // Use the current CTAbstractNum if it exists
                ctNumbering.AddNewAbstractNum().Set(abstractNum.GetAbstractNum());
            }
            else
            {
                ctNumbering.AddNewAbstractNum();
                abstractNum.GetAbstractNum().abstractNumId = pos.ToString();
                ctNumbering.SetAbstractNumArray(pos, abstractNum.GetAbstractNum());
            }
            abstractNums.Add(abstractNum);
            return(abstractNum.GetAbstractNum().abstractNumId);
        }
示例#2
0
        public string AddAbstractNum(XWPFAbstractNum abstractNum)
        {
            int count = this.abstractNums.Count;

            if (abstractNum.GetAbstractNum() != null)
            {
                this.ctNumbering.AddNewAbstractNum().Set(abstractNum.GetAbstractNum());
            }
            else
            {
                this.ctNumbering.AddNewAbstractNum();
                abstractNum.GetAbstractNum().abstractNumId = count.ToString();
                this.ctNumbering.SetAbstractNumArray(count, abstractNum.GetAbstractNum());
            }
            this.abstractNums.Add(abstractNum);
            return(abstractNum.GetAbstractNum().abstractNumId);
        }
示例#3
0
        public string AddAbstractNum()
        {
            XWPFAbstractNum xwpfAbstractNum = new XWPFAbstractNum(this.ctNumbering.AddNewAbstractNum(), this);

            xwpfAbstractNum.AbstractNumId  = this.abstractNums.Count.ToString();
            xwpfAbstractNum.MultiLevelType = MultiLevelType.HybridMultilevel;
            xwpfAbstractNum.InitLvl();
            this.abstractNums.Add(xwpfAbstractNum);
            return(xwpfAbstractNum.GetAbstractNum().abstractNumId);
        }
示例#4
0
        /// <summary>
        /// Add a new AbstractNum
        /// </summary>
        /// <returns></returns>
        /// @author antony liu
        public string AddAbstractNum()
        {
            CT_AbstractNum  ctAbstractNum = ctNumbering.AddNewAbstractNum();
            XWPFAbstractNum abstractNum   = new XWPFAbstractNum(ctAbstractNum, this);

            abstractNum.AbstractNumId  = abstractNums.Count.ToString();
            abstractNum.MultiLevelType = MultiLevelType.HybridMultilevel;
            abstractNum.InitLvl();
            abstractNums.Add(abstractNum);
            return(abstractNum.GetAbstractNum().abstractNumId);
        }
示例#5
0
 /// <summary>
 /// Add a new AbstractNum
 /// </summary>
 /// <returns></returns>
 /// @author antony liu
 public string AddAbstractNum()
 {
     CT_AbstractNum ctAbstractNum = ctNumbering.AddNewAbstractNum();
     XWPFAbstractNum abstractNum = new XWPFAbstractNum(ctAbstractNum, this);
     abstractNum.AbstractNumId = abstractNums.Count.ToString();
     abstractNum.MultiLevelType = MultiLevelType.HybridMultilevel;
     abstractNum.InitLvl();
     abstractNums.Add(abstractNum);
     return abstractNum.GetAbstractNum().abstractNumId;
 }
示例#6
0
 /**
  * add a new AbstractNum and return its AbstractNumID 
  * @param abstractNum
  */
 public string AddAbstractNum(XWPFAbstractNum abstractNum)
 {
     int pos = abstractNums.Count;
     if (abstractNum.GetAbstractNum() != null)
     { // Use the current CTAbstractNum if it exists
         ctNumbering.AddNewAbstractNum().Set(abstractNum.GetAbstractNum());
     }
     else
     {
         ctNumbering.AddNewAbstractNum();
         abstractNum.GetAbstractNum().abstractNumId = pos.ToString();
         ctNumbering.SetAbstractNumArray(pos, abstractNum.GetAbstractNum());
     }
     abstractNums.Add(abstractNum);
     return abstractNum.GetAbstractNum().abstractNumId;
 }