Bug 48065

Summary: Problems with save output of HWPF (losing formatting)
Product: POI Reporter: JSimas <jsimas>
Component: HWPFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Input file
Output file

Description JSimas 2009-10-27 08:32:20 UTC

I'm having problems reading and writing (without changes) to file using the HWPF structure. 

The code i'm using:
     File file = new File("simple.doc"); 
     HWPFDocument document = new HWPFDocument(new FileInputStream(file)); 
     File outputFile = new File("output-" + filename); 
     FileOutputStream outStream = new FileOutputStream(outputFile); 
     try { 
     } finally { 

The output file is completely modified. 

This behavior only occurs in 3.5-FINAL. Using 3.2-Final the output file is ok.

Check the input and output file using 3.5-FINAL.
Comment 1 JSimas 2009-10-27 08:33:19 UTC
Created attachment 24426 [details]
Input file
Comment 2 JSimas 2009-10-27 08:36:31 UTC
Created attachment 24427 [details]
Output file
Comment 3 Harald Kuhn 2010-06-16 06:25:08 UTC
Version 3.6 is also affected
Comment 4 Sergey Vladimirov 2011-07-07 13:14:42 UTC
Seems to be fixed in trunk (possible due to rewriting table parsing code).
Shall be part of 3.8-beta4

Please, reopen if still affected in 3.8beta-4 or later (or trunk).