Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Enhancement to XWPFFootnote and related APIs #114
My first pass at enhancing the XWPFFootnote API.
Adds new methods createParagraph() and createTable()/createTable(rows, cols) to XWPFFootnote.
Adds new methods createFootnote() and removeFootnote() to XWPFDocument and XWPFFootnotes
Adds new method addFootnoteReference(XWPFFootnote) to XWPFParagraph
Creation of new footnote does not add any body elements. However, adding the first paragraph or table automatically creates the required footnote ref run in the first paragraph (adding the paragraph if necessary).
I also made a pass over the javadocs for XWPFFootnote.
I tested with the included unit tests and also in the context of my real-world project that is driving this update. That verifies, for example, that a multi-paragraph footnote with a table works as it should.