]> source.dussan.org Git - poi.git/commitdiff
Bug 44431 - HWPFDocument.write destroys fields - seems to be fixed some time ago...
authorSergey Vladimirov <sergey@apache.org>
Sun, 24 Jul 2011 18:40:42 +0000 (18:40 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sun, 24 Jul 2011 18:40:42 +0000 (18:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1150461 13f79535-47bb-0310-9956-ffa450edef68

src/documentation/content/xdocs/status.xml
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestProblems.java

index 7a874d208abecaea9db8e592cabf111b3fddaf53..62fb95d3c49f90c24c298982353d3bea79c4f480 100644 (file)
@@ -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>
index 84feac09947974e8adb12e32a7f84d48834ea68c..a93db00ec5e7190553761f5b33661c1f49a42192 100644 (file)
@@ -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() );
     }
 
     /**