]> source.dussan.org Git - poi.git/commitdiff
use new table streams and data streams after write()
authorSergey Vladimirov <sergey@apache.org>
Sun, 24 Jul 2011 18:35:48 +0000 (18:35 +0000)
committerSergey Vladimirov <sergey@apache.org>
Sun, 24 Jul 2011 18:35:48 +0000 (18:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1150458 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/src/org/apache/poi/hwpf/HWPFDocument.java

index c2e5659984e1d55e20307224e1f125efb19de9f0..caed7b82df0ec3cda844066b23669c94dbbc25b3 100644 (file)
@@ -433,11 +433,7 @@ public final class HWPFDocument extends HWPFDocumentCore
    *  separators and footnote separators.
    */
   public Range getHeaderStoryRange() {
-         return new Range(
-                         _cpSplit.getHeaderStoryStart(),
-                         _cpSplit.getHeaderStoryEnd(),
-                         this
-      );
+         return getRange( SubdocumentType.HEADER );
   }
 
   /**
@@ -847,7 +843,14 @@ public final class HWPFDocument extends HWPFDocumentCore
     writeProperties(pfs);
 
     pfs.writeFilesystem(out);
-  }
+
+        /*
+         * since we updated all references in FIB and etc, using new arrays to
+         * access data
+         */
+        this._tableStream = tableStream.toByteArray();
+        this._dataStream = dataBuf;
+    }
 
   public byte[] getDataStream()
   {