ASF Bugzilla – Attachment 22479 Details for
Bug 45686
Multible calls of TextRun.changeTextInRichTextRun causes Exception
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
sample source code
source.txt (text/plain), 745 bytes, created by
Thorsten
on 2008-08-25 08:36:40 UTC
(
hide
)
Description:
sample source code
Filename:
MIME Type:
Creator:
Thorsten
Created:
2008-08-25 08:36:40 UTC
Size:
745 bytes
patch
obsolete
>int i = 0; > >for (RichTextRun richTextRun : richTextRuns) { > String textRunText = richTextRun.getText(); > if(i == richTextRuns.size()-1){ > if(textRunText.indexOf("]") == textRunText.length()-1){ > tr.changeTextInRichTextRun(richTextRun, "Hello World"); > }else{ > String oldText = textRunText.substring(textRunText.indexOf("]") +1); > tr.changeTextInRichTextRun(richTextRun, "Hello World" + oldText ); > } > else if(i == 0){ > if(textRunText.indexOf("[") == 0){ > tr.changeTextInRichTextRun(richTextRun, " "); > }else{ > String oldText = textRunText.substring(0,textRunText.indexOf("[")); > tr.changeTextInRichTextRun(richTextRun, oldText); > } > }else{ > tr.changeTextInRichTextRun(richTextRun, " "); > } > i++; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 45686
: 22479