コード例 #1
0
        public string GetIdOfAbstractNum(XWPFAbstractNum abstractNum)
        {
            XWPFAbstractNum xwpfAbstractNum = new XWPFAbstractNum(abstractNum.GetCTAbstractNum().Copy(), this);

            for (int index = 0; index < this.abstractNums.Count; ++index)
            {
                xwpfAbstractNum.GetCTAbstractNum().abstractNumId = index.ToString();
                xwpfAbstractNum.SetNumbering(this);
                if (xwpfAbstractNum.GetCTAbstractNum().ValueEquals(this.abstractNums[index].GetCTAbstractNum()))
                {
                    return(xwpfAbstractNum.GetCTAbstractNum().abstractNumId);
                }
            }
            return((string)null);
        }
コード例 #2
0
ファイル: XWPFNumbering.cs プロジェクト: hiodava/Romero
        /**
         * Compare AbstractNum with abstractNums of this numbering document.
         * If the content of abstractNum Equals with an abstractNum of the List in numbering
         * the Bigint Value of it will be returned.
         * If no equal abstractNum is existing null will be returned
         *
         * @param abstractNum
         * @return  Bigint
         */
        public string GetIdOfAbstractNum(XWPFAbstractNum abstractNum)
        {
            CT_AbstractNum  copy           = (CT_AbstractNum)abstractNum.GetCTAbstractNum().Copy();
            XWPFAbstractNum newAbstractNum = new XWPFAbstractNum(copy, this);
            int             i;

            for (i = 0; i < abstractNums.Count; i++)
            {
                newAbstractNum.GetCTAbstractNum().abstractNumId = i.ToString();
                newAbstractNum.SetNumbering(this);
                if (newAbstractNum.GetCTAbstractNum().ValueEquals(abstractNums[i].GetCTAbstractNum()))
                {
                    return(newAbstractNum.GetCTAbstractNum().abstractNumId);
                }
            }
            return(null);
        }
コード例 #3
0
ファイル: XWPFNumbering.cs プロジェクト: Reinakumiko/npoi
 /**
  * Compare AbstractNum with abstractNums of this numbering document.
  * If the content of abstractNum Equals with an abstractNum of the List in numbering
  * the Bigint Value of it will be returned.
  * If no equal abstractNum is existing null will be returned
  * 
  * @param abstractNum
  * @return 	Bigint
  */
 public string GetIdOfAbstractNum(XWPFAbstractNum abstractNum)
 {
     CT_AbstractNum copy = (CT_AbstractNum)abstractNum.GetCTAbstractNum().Copy();
     XWPFAbstractNum newAbstractNum = new XWPFAbstractNum(copy, this);
     int i;
     for (i = 0; i < abstractNums.Count; i++)
     {
         newAbstractNum.GetCTAbstractNum().abstractNumId = i.ToString();
         newAbstractNum.SetNumbering(this);
         if (newAbstractNum.GetCTAbstractNum().ValueEquals(abstractNums[i].GetCTAbstractNum()))
         {
             return newAbstractNum.GetCTAbstractNum().abstractNumId;
         }
     }
     return null;
 }