Patch from bug #51486 from Mike McEuen (with a few whitespace tweaks) - XWPF support for adding footnotes