Bug 44431 - HWPFDocument.write destroys fields - seems to be fixed some time ago, but other bugs prevented to see it.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1150461 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
01036a1f1e
commit
a8e015ab9f
@ -34,6 +34,7 @@
|
||||
|
||||
<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>
|
||||
|
@ -458,26 +458,22 @@ public final class TestProblems extends HWPFTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* [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() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user