I'm a new user, and was very happy to see that some support has been added for fast-saved files in 3.8 Beta 4. I'm using the current release of 3.8 Beta 4, dated 28 August 2011.
However, I made a simple fast-save file in Word XP (2002) and tested it using "QuickTest.java" in the HPWF folder inside scratchpad, and it failed. Here's the file:http://dl.dropbox.com/u/39940675/Mary1.doc. It's failing in CHPFormattedDiskPage.java at the line: CHPX chpx = new CHPX( charStartAt, charEndAt, new SprmBuffer(getGrpprl( x ), 0 ) ); In the second text run, the program sees the start of the run as being after the end of the run because the fast save saves an inserted fragment "out-of-sequence" in the Main Stream - the problem appears to be in the algorithm used in org.apache.poi.hwpf.model.CharIndexTranslator.getCharIndex(int bytePos, int startCP). (Also it's not clear to me that Character Positions should be used in org.apache.poi.hwpf.model.CHPX - the documentation of that class warns against it - but this would be the second domino in the row, if it is even a problem). I may be using the wrong code to read my fast-saved file, or perhaps the bug has been fixed in a later bug fix? (I've looked, didn't see any reference to it). I may have a crack at fixing it for my own use, but I'm a real POI newbie and it would be easy to cause problems elsewhere. Any ideas? Thanks, Julian --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
