if (relation.equals(XWPFRelation.FOOTNOTE.getRelation())) {
this.footnotes = (XWPFFootnotes)p;
this.footnotes.onDocumentRead();
- // Warning - this apparently doubles footnotes - see bug #????
- FootnotesDocument footnotesDocument = FootnotesDocument.Factory.parse(p.getPackagePart().getInputStream());
- for(CTFtnEdn ctFtnEdn : footnotesDocument.getFootnotes().getFootnoteList()) {
- footnotes.addFootnote(ctFtnEdn);
- }
} else if (relation.equals(XWPFRelation.ENDNOTE.getRelation())){
EndnotesDocument endnotesDocument = EndnotesDocument.Factory.parse(p.getPackagePart().getInputStream());
break;
}
}
- // TODO Fix footnotes issues then enable
-// assertEquals("controls size", 12, sdts.size());
+ assertEquals("controls size", 12, sdts.size());
assertEquals("tag", "MyTag", tag);
assertEquals("title", "MyTitle", title);
XWPFDocument doc = XWPFTestDataSamples.openSampleDocument("Bug54849.docx");
List<XWPFSDT> sdts = extractAllSDTs(doc);
- // TODO Fix footnotes issue
-/*
assertEquals("number of sdts", contents.length, sdts.size());
for (int i = 0; i < sdts.size(); i++){//contents.length; i++){
assertEquals(i+ ": " + contents[i], contents[i], sdt.getContent().toString());
}
-*/
}
public void testFailureToGetSDTAsCell() throws Exception{