mirror of https://github.com/apache/poi.git
Fix bug #51950 - XWPF may not always have footnotes in a document
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1179449 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a45b2cd33f
commit
b9e791ac99
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
<changes>
|
<changes>
|
||||||
<release version="3.8-beta5" date="2011-??-??">
|
<release version="3.8-beta5" date="2011-??-??">
|
||||||
|
<action dev="poi-developers" type="fix">51950 - XWPF fix for footnotes not always being present in a document</action>
|
||||||
<action dev="poi-developers" type="fix">51963 - Correct AreaReference handling of references containing a sheet name which includes a comma</action>
|
<action dev="poi-developers" type="fix">51963 - Correct AreaReference handling of references containing a sheet name which includes a comma</action>
|
||||||
<action dev="poi-developers" type="fix">51955 - XSSFReader supplied StylesTables need to have the theme data available</action>
|
<action dev="poi-developers" type="fix">51955 - XSSFReader supplied StylesTables need to have the theme data available</action>
|
||||||
<action dev="poi-developers" type="fix">51716 - Removed incorrect assert in SXSSFSheet#getSXSSFSheet</action>
|
<action dev="poi-developers" type="fix">51716 - Removed incorrect assert in SXSSFSheet#getSXSSFSheet</action>
|
||||||
|
|
|
@ -351,15 +351,20 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||||
}
|
}
|
||||||
|
|
||||||
public XWPFFootnote getFootnoteByID(int id) {
|
public XWPFFootnote getFootnoteByID(int id) {
|
||||||
return footnotes.getFootnoteById(id);
|
if(footnotes == null) return null;
|
||||||
|
return footnotes.getFootnoteById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public XWPFFootnote getEndnoteByID(int id) {
|
public XWPFFootnote getEndnoteByID(int id) {
|
||||||
return endnotes.get(id);
|
if(endnotes == null) return null;
|
||||||
|
return endnotes.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<XWPFFootnote> getFootnotes() {
|
public List<XWPFFootnote> getFootnotes() {
|
||||||
return footnotes.getFootnotesList();
|
if(footnotes == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
return footnotes.getFootnotesList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public XWPFHyperlink[] getHyperlinks() {
|
public XWPFHyperlink[] getHyperlinks() {
|
||||||
|
|
Loading…
Reference in New Issue