https://issues.apache.org/bugzilla/show_bug.cgi?id=50717

           Summary: Update of rich text runs causing errors
           Product: POI
           Version: 3.7
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSLF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=26602)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26602)
Code snippet showing code that causes error.

When changeTextInRichTextRun(rtRuns[k], updatedText); is called to update the
text in a rich text field, the text the following happens:

Scenario 1 (text is the same length as original)
1. POI performs as expected

Scenario 2 (text is updated to be smaller than the original text)
1. Final text in text run (not rich text run) contains the new value plus the
end characters from the original text up to the length of the original text
2. The formatting on the entire slide is lost
3. If getText is called on the rich text run, a string index out of bounds
error occurs.

Scenario 3 (text is updated to be smaller than the original text)
1. Final text in text run (not in rich text run) contains the truncated new
value to the length of the original text
2. The formatting on the entire slide is lost
3. No string index out of bounds error occurs in this case.

Formatting issues only show up when more than 1 rich text run is modified on
the same PPT slide line and 1 is modified per scenarios 2 or 3 above.

-- 
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]

Reply via email to