ArrayIndexOutOfBoundsException: -1


When I try to save the attached presentation after editing, this exception occurs:

java.lang.ArrayIndexOutOfBoundsException: -1

I saved the text from two portions of the paragraph into two strings. Then I cleared all the portions from the paragraph and added two new portions with the previously saved text.

Here’s the code I use:

String presentationPath = “bulletin_1393.ppt”;

InputStream inputStream = new FileInputStream(presentationPath);

Presentation presentation = new Presentation(inputStream);


ISlide slide = presentation.getSlides().get_Item(40);

IAutoShape shape = (IAutoShape) slide.getShapes().get_Item(0);

IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(7);
IPortionCollection portions = paragraph.getPortions();
String text1 = portions.get_Item(0).getText();
String text2 = portions.get_Item(1).getText();

portions.add(new Portion(text1));
portions.add(new Portion(text2));“bulletin_1393-aspose.ppt”, SaveFormat.Ppt);

Can you check this?

Hi Zeljko,

Thank you for posting.

I have observed your comments and worked with the presentation file shared by you. I have been able to reproduce the issue. A ticket with ID SLIDESJAVA-35405 has been logged in our issue management system to further investigate and resolve the issue.This thread has been linked with the issue so that you may be notified automatically as soon as the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-35405) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.