setText on Master Slide makes it completely blank

Hello,

I downloaded the latest Java version of Aspose.Powerpoint and I am having some difficulty setting the text on one of the TextFrames in its Master Slide.

I have two TextFrames on the Master Slide and I want to replace the text in both of them with different strings. I can modify the first TextFrame successfully. After I modify the second TextFrame though, the entire Master Slide turns blank.

I am doing: textframe.getParagraphs().get(0).getPortions().get(0).setText(newText), which is exactly like many of your examples.

I have attached the Powerpoint pressentation to this posting and a Java program to a reply that will show you the problem. (Can you attach more than one file?) To run the test program, put the ppt file and java class in the same directory and then run the program. It will generate another Powerpoint presentation called "output.ppt". If you comment out the second replacement (on line 31), everything works as expected.

Is there something wrong with my code or the Powerpoint presentation?

Thank you,

Randy Stegbauer

Here is the attachment. Is a ZIP file OK to use?

Thank you,
Randy Stegbauer

Dear Randy,



Your code is ok. I tried it also with .Net version and got the same problem.

It’s something wrong with PNumber text frame.

I deleted it, created another one with the same text and your code works now.

Alexey,

Thank you for the quick response. You suggestion, of course, worked perfectly.

Out of curiosity, how can we avoid this problem in the first place? In other words, what was wrong with the original PNumber Text Frame?

Thank you,
Randy Stegbauer

Dear Randy,



I couldn’t understand yet but I will investigate it more closely.

I hope it’s very rare thing because you are the first who reported such error.