You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2011/10/05 23:26:49 UTC
svn commit: r1179449 - in /poi/trunk/src:
documentation/content/xdocs/status.xml
ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
Author: nick
Date: Wed Oct 5 21:26:49 2011
New Revision: 1179449
URL: http://svn.apache.org/viewvc?rev=1179449&view=rev
Log:
Fix bug #51950 - XWPF may not always have footnotes in a document
Modified:
poi/trunk/src/documentation/content/xdocs/status.xml
poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1179449&r1=1179448&r2=1179449&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Wed Oct 5 21:26:49 2011
@@ -34,6 +34,7 @@
<changes>
<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">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>
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java?rev=1179449&r1=1179448&r2=1179449&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java Wed Oct 5 21:26:49 2011
@@ -351,15 +351,20 @@ public class XWPFDocument extends POIXML
}
public XWPFFootnote getFootnoteByID(int id) {
- return footnotes.getFootnoteById(id);
+ if(footnotes == null) return null;
+ return footnotes.getFootnoteById(id);
}
public XWPFFootnote getEndnoteByID(int id) {
- return endnotes.get(id);
+ if(endnotes == null) return null;
+ return endnotes.get(id);
}
public List<XWPFFootnote> getFootnotes() {
- return footnotes.getFootnotesList();
+ if(footnotes == null) {
+ return Collections.emptyList();
+ }
+ return footnotes.getFootnotesList();
}
public XWPFHyperlink[] getHyperlinks() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org