<changes>
<release version="3.8-beta4" date="2011-??-??">
+ <action dev="poi-developers" type="fix">44431 - HWPFDocument.write destroys fields</action>
<action dev="poi-developers" type="fix">50401 - fixed EscherProperty to return property name instead of 'unknown' for complex properties </action>
<action dev="poi-developers" type="add">Initial support for endnotes and footnotes in HWPF</action>
<action dev="poi-developers" type="fix">51470 - avoid exception when cloning XSSF sheets with background images</action>
}
/**
- * [FAILING] Bug 44331 - Output is corrupted
+ * Bug 44331 - HWPFDocument.write destroys fields
*/
- public void test44431() {
- HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile("Bug44431.doc");
- WordExtractor extractor1 = new WordExtractor(doc1);
+ public void test44431()
+ {
+ HWPFDocument doc1 = HWPFTestDataSamples.openSampleFile( "Bug44431.doc" );
+ WordExtractor extractor1 = new WordExtractor( doc1 );
- HWPFDocument doc2 = HWPFTestDataSamples.writeOutAndReadBack(doc1);
- WordExtractor extractor2 = new WordExtractor(doc2);
- try {
- assertEquals(extractor1.getFooterText(), extractor2.getFooterText());
- assertEquals(extractor1.getHeaderText(), extractor2.getHeaderText());
- assertEquals( Arrays.toString( extractor1.getParagraphText() ),
- Arrays.toString( extractor2.getParagraphText() ) );
+ HWPFDocument doc2 = HWPFTestDataSamples.writeOutAndReadBack( doc1 );
+ WordExtractor extractor2 = new WordExtractor( doc2 );
- assertEquals(extractor1.getText(), extractor2.getText());
+ assertEquals( extractor1.getFooterText(), extractor2.getFooterText() );
+ assertEquals( extractor1.getHeaderText(), extractor2.getHeaderText() );
+ assertEquals( Arrays.toString( extractor1.getParagraphText() ),
+ Arrays.toString( extractor2.getParagraphText() ) );
- fixed("44431");
- } catch (AssertionFailedError e) {
- // expected exception
- }
+ assertEquals( extractor1.getText(), extractor2.getText() );
}
/**