poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44431] HWPFDocument.write destroys fields
Date Fri, 14 Nov 2008 16:07:06 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=44431


dnapoletano <domenico.napoletano@exprivia.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |domenico.napoletano@exprivia
                   |                            |.it
             Status|NEEDINFO                    |ASSIGNED




--- Comment #4 from dnapoletano <domenico.napoletano@exprivia.it>  2008-11-14 08:07:05
PST ---
Sorry, but it's still detroying fields...

I've tested last POI version source code (TRUNK revision) with attached
document, trying to read and write the document as is, with the two lines

HWPFDocument doc = new HWPFDocument (new FileInputStream
("/home/jars/Desktop/FieldsTest.doc"));
      doc.write(new FileOutputStream ("/home/jars/Desktop/FieldsTest
after.doc"));

where the document (contained in the FIRST attachment; the SECOND attachment
contains the resaved document) contains:

1) a "num page" field, rendered *correctly*

2) a "num pages" field, rendered *correctly*

3) a "style ref" field, RENDERED AS TEXT: the original text 

   STYLEREF test

   with style "TitoloDocumento", becomes

   "TitoloDocumento"STYLEREF test

4) a "file name" field, RENDERED AS TEXT: the original text (the bare file name
with extension) becomes

FILENAME FieldsTest.doc

5) a "TOC" field, RENDERED AS TEXT: the original TOC content

Heading paragraph in next page  2
Another heading paragraph in further page       3

becomes

TOC \f \o "1-9" \t "Intestazione 1;1" Heading paragraph in next page    2
Another heading paragraph in further page       3ยง


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message