You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/02/03 22:14:04 UTC

DO NOT REPLY [Bug 50717] New: Update of rich text runs causing errors

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: dev@poi.apache.org
        ReportedBy: iset2468@yahoo.com


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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org