https://issues.apache.org/bugzilla/show_bug.cgi?id=45001
Summary: Range.insertBefore() and Range.delete() fail with
Unicode characters
Product: POI
Version: 3.0-dev
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: HWPF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Created an attachment (id=21966)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=21966)
patch to Range, FileInformationBlock, and TextPiece to address problem
described above (see bug text for limitations of patch)
When OpenOffice.org creates MS Word 97 formatted *.doc files, it uses Unicode.
When Range.insertBefore() and Range.delete() are used with these multi-byte
representations, a couple of different problems occur:
1. The indices are not calculated correctly so delete() seems to delete
arbitrary characters or fail with IndexOutOfBoundsExceptions
2. For the same reason, insertBefore() seems to insert text at an arbitrary
position and subsequent operations fail with IndexOutOfBoundsExceptions
There is a marginally related problem with these operations; they do not update
FileInformationBlock.CCPText, and this throws OpenOffice.org for a loop. It
stops reading character text prematurely and renders document headers and
footers incorrectly.
(see attachment for a partial patch to address both problems; note that the
patch does not address overloaded versions of insertBefore(), nor does it
address insertAfter())
--
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]