public XWPFFootnote(CT_FtnEdn note, XWPFFootnotes xFootnotes) { footnotes = xFootnotes; ctFtnEdn = note; document = xFootnotes.GetXWPFDocument(); Init(); }
public void TestAddFootnotesToDocument() { XWPFDocument docOut = new XWPFDocument(); int noteId = 1; XWPFFootnotes footnotes = docOut.CreateFootnotes(); CT_FtnEdn ctNote = new CT_FtnEdn(); ctNote.id = (noteId.ToString()); ctNote.type = (ST_FtnEdn.normal); footnotes.AddFootnote(ctNote); XWPFDocument docIn = XWPFTestDataSamples.WriteOutAndReadBack(docOut); XWPFFootnote note = docIn.GetFootnoteByID(noteId); Assert.AreEqual(note.GetCTFtnEdn().type, ST_FtnEdn.normal); }