Oh dear, discovered a problem with the fix I think...

If we do something like...

richText[k].setRawText(richText[k].getRawText().replace("[SYSDATE2]",
"REPLACED_DATE2"));

We'll get a string out of bounds exception generated from within the
setRawText method. eg. 

Problem with slide show String index out of range: 51
java.lang.StringIndexOutOfBoundsException: String index out of range: 51
        at java.lang.String.substring(String.java:1765)
        at
org.apache.poi.hslf.usermodel.RichTextRun.getRawText(RichTextRun.java:158)
        at
org.apache.poi.hslf.model.TextRun.changeTextInRichTextRun(TextRun.java:435)
        at
org.apache.poi.hslf.usermodel.RichTextRun.setRawText(RichTextRun.java:174)
        at com.globoforce.scheduled.App.main(App.java:34)

Changing the calls to use getText and setText avoids the string out of
bounds, but loses all formatting so the text, when replaced, is centre
justified and no bullet points.

-- 
View this message in context: 
http://www.nabble.com/Powerpoint%3A-modifying-text-causes-error%3A-Powerpoint-can%27t-read-this-text.-tp17130113p17401765.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to