Discussion:
Any Active Work to Improve XWFPFootnote Methods?
Eliot Kimber
2018-07-19 10:12:10 UTC
Permalink
I'm generating footnotes in DOCX and I found the Footnote API insufficient for my needs. I'm working with POI 3.0.0.

I expected to be able to create an XWPFFootnote using e.g. doc.addNewFootnote() or doc.getFootnotes().addNewFootnote() but it doesn't look like those types of methods are implemented. The only thing I could find was addFootnote(CTFtnEdn), which requires constructing the CTFtnEdn directly, which means constructing the CTP and CTR body components directly, as far as I can tell.

There's XWPFFootnotes.addFootnote(XWPFFootnote footnote) but I couldn't find a way to construct a new XWPFFootnote that didn't require that I already have a CTFtnEdn constructed.

Am I missing a way to construct footnotes using the XWPF* classes rather than the underlying CT* classes?

If I'm not missing it, I can do the work to enhance the WXPFFootnote API to do what I want if nobody's already working on it. I've successfully created footnotes using the current API but it's not a good fit with the rest of my code, which is generating XWPF* objects from incoming XML source (a generic simplified word processing document representation).

Cheers,

Eliot
--
Eliot Kimber
http://contrext.com




---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
pj.fanning
2018-07-19 15:41:32 UTC
Permalink
If you could add the missing methods to the XWFPFootnote and submit a pull
request, that would be great.
We'd like to avoid exposing the underlying XMLBeans generated classes
indefinitely.



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Eliot Kimber
2018-07-19 15:53:10 UTC
Permalink
I will pursue it.

Cheers,

E.

--
Eliot Kimber
http://contrext.com


On 7/19/18, 11:41 AM, "pj.fanning" <***@yahoo.com> wrote:

If you could add the missing methods to the XWFPFootnote and submit a pull
request, that would be great.
We'd like to avoid exposing the underlying XMLBeans generated classes
indefinitely.



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Greg Woolsey
2018-07-19 17:52:30 UTC
Permalink
Also, please note that version 3.0.0 is extremely old, and the API has
changed significantly. Further, current source trunk is again much changed
from the current release, 3.17, especially wrt to replacing ints with Enums
when possible.

Any patch would need to be against the current SVN/Git source, which is
nearing completion for a major 4.0 release.
Post by Eliot Kimber
I will pursue it.
Cheers,
E.
--
Eliot Kimber
http://contrext.com
If you could add the missing methods to the XWFPFootnote and submit a pull
request, that would be great.
We'd like to avoid exposing the underlying XMLBeans generated classes
indefinitely.
--
http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
---------------------------------------------------------------------
---------------------------------------------------------------------
Eliot Kimber
2018-07-19 18:13:42 UTC
Permalink
Ah--for some reason I though 3.0.0 was the latest or maybe I just wasn't paying attention to the version.

I'll be sure to work against the latest code.

Cheers,

E.

--
Eliot Kimber
http://contrext.com


On 7/19/18, 1:52 PM, "Greg Woolsey" <***@gmail.com> wrote:

Also, please note that version 3.0.0 is extremely old, and the API has
changed significantly. Further, current source trunk is again much changed
from the current release, 3.17, especially wrt to replacing ints with Enums
when possible.

Any patch would need to be against the current SVN/Git source, which is
nearing completion for a major 4.0 release.
Post by Eliot Kimber
I will pursue it.
Cheers,
E.
--
Eliot Kimber
http://contrext.com
If you could add the missing methods to the XWFPFootnote and submit a pull
request, that would be great.
We'd like to avoid exposing the underlying XMLBeans generated classes
indefinitely.
--
http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org
Eliot Kimber
2018-07-19 19:23:43 UTC
Permalink
I have trunk compiled to 4.0.0-SNAPSHOT jars and deployed to my local Maven repository and my POI-using project's test cases still pass so I think I'm ready to write some POI code...

Thanks for the very clear project documentation for contributors--it was very helpful and let me get going with minimum fuss.

Cheers,

E.
--
Eliot Kimber
http://contrext.com


On 7/19/18, 2:13 PM, "Eliot Kimber" <***@contrext.com> wrote:

Ah--for some reason I though 3.0.0 was the latest or maybe I just wasn't paying attention to the version.

I'll be sure to work against the latest code.

Cheers,

E.

--
Eliot Kimber
http://contrext.com


On 7/19/18, 1:52 PM, "Greg Woolsey" <***@gmail.com> wrote:

Also, please note that version 3.0.0 is extremely old, and the API has
changed significantly. Further, current source trunk is again much changed
from the current release, 3.17, especially wrt to replacing ints with Enums
when possible.

Any patch would need to be against the current SVN/Git source, which is
nearing completion for a major 4.0 release.
Post by Eliot Kimber
I will pursue it.
Cheers,
E.
--
Eliot Kimber
http://contrext.com
If you could add the missing methods to the XWFPFootnote and submit a pull
request, that would be great.
We'd like to avoid exposing the underlying XMLBeans generated classes
indefinitely.
--
http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@poi.apache.org
For additional commands, e-mail: user-***@poi.apache.org

Loading...