Skip to content
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

SDT bind and removal extensions for Footnotes and Endnotes #266

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jaboj78
Copy link

@jaboj78 jaboj78 commented Oct 4, 2017

HI,

I hope this pull request is created properly.

I've added some extension to Docx4J SDT binding- and removal- handlers, to support FootnotesPart and EndnotesPart. This makes it possible to bind values in these parts as well as remove SDT's from these parts, if requested in the bind-flags. WML parts for EndnotesPart and FootnotesPart implements ContentAccessor (again..). Docx4J now uses RemoveHandler to remove SDT's from supported parts (Main, Footer, Header, Footnotes, Endnotes)

I hope you'll incorporate these changes in a futurer build, or make a similar extension. I need this extension, to be able to use SDT's in footnotes and endnotes.

Thanks a lot.

  • Jacob

…r FootnotesPart and EndnotesPart. This makes it possible to bind values in these parts as well as remove SDT's from the parts if requested. WML parts for EndnotesPart and FootnotesPart implements ContentAccessor (again..). Docx4J now used RemoveHandler to remove SDT's from supported parts (Main, Footer, Header, Footnotes, Endnotes)
…r FootnotesPart and EndnotesPart. This makes it possible to bind values in these parts as well as remove SDT's from the parts if requested. WML parts for EndnotesPart and FootnotesPart implements ContentAccessor (again..). Docx4J now used RemoveHandler to remove SDT's from supported parts (Main, Footer, Header, Footnotes, Endnotes)
* Convenience method to getJaxbElement().getEndnote()
* @since 2.8.1
*/
public List<Object> getContent() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the look of it, this won't work properly. getContent().add(foo) doesn't add foo to the endnote object

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried to let FootnotePart and EndnotePart implement the same ContentAccessor as FooterPart and HeaderPart, to handle each part in a similar way. In some previous version, the getContent() method has been un-commented. Is it possible to let FootnotePart and EnddnotePart implement ContentAccessor in a proper way?

If it's not possible to let FootnotePart and EndnotePart implement ContentAccessor, this particullar change can be reverted. The most important part, is the ability to update content controls bindings in these parts.

…art now implements ContentAccessor in a proper way. All this to support OpenDope processing of SDTs in Footnotes and Endnotes part
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants