Bug 48065 - Problems with save output of HWPF (losing formatting)
Summary: Problems with save output of HWPF (losing formatting)
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: 3.5-FINAL
Hardware: PC Windows XP
: P2 normal with 4 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-27 08:32 UTC by JSimas
Modified: 2011-07-07 13:14 UTC (History)
0 users



Attachments
Input file (27.50 KB, application/octet-stream)
2009-10-27 08:33 UTC, JSimas
Details
Output file (21.50 KB, application/octet-stream)
2009-10-27 08:36 UTC, JSimas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JSimas 2009-10-27 08:32:20 UTC
Hello.

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 { 
          document.write(outStream); 
     } finally { 
          outStream.close(); 
     } 

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).