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 2013/06/19 01:39:32 UTC
svn commit: r1494379 - in /poi/trunk/src/ooxml:
java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java
Author: nick
Date: Tue Jun 18 23:39:31 2013
New Revision: 1494379
URL: http://svn.apache.org/r1494379
Log:
Fix the footnote doubling, and then enable the rest of the SDT tests from Tim Allison from bug #54849
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java
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=1494379&r1=1494378&r2=1494379&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 Tue Jun 18 23:39:31 2013
@@ -237,11 +237,6 @@ public class XWPFDocument extends POIXML
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());
Modified: poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java?rev=1494379&r1=1494378&r2=1494379&view=diff
==============================================================================
--- poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java (original)
+++ poi/trunk/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFSDT.java Tue Jun 18 23:39:31 2013
@@ -43,8 +43,7 @@ public final class TestXWPFSDT extends T
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);
@@ -70,8 +69,6 @@ public final class TestXWPFSDT extends T
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++){
@@ -79,7 +76,6 @@ public final class TestXWPFSDT extends T
assertEquals(i+ ": " + contents[i], contents[i], sdt.getContent().toString());
}
-*/
}
public void testFailureToGetSDTAsCell() throws Exception{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org