New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement to XWPFFootnote and related APIs #114

Closed
wants to merge 1 commit into
base: trunk
from

Conversation

Projects
None yet
3 participants
@drmacro

drmacro commented Jul 21, 2018

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.

@asfgit

This comment has been minimized.

Show comment
Hide comment
@asfgit

asfgit Jul 21, 2018

Can one of the admins verify this patch?

asfgit commented Jul 21, 2018

Can one of the admins verify this patch?

@asfgit asfgit closed this in c1fc95c Jul 21, 2018

@pjfanning

This comment has been minimized.

Show comment
Hide comment
@pjfanning

pjfanning Jul 21, 2018

LGTM . Merged with c1fc95c

pjfanning commented Jul 21, 2018

LGTM . Merged with c1fc95c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment