Loosing Text-

when I’m inserting whole paragraph ina a shape, it’s loosing a part of a paragraph.

shp.getTextFrame().setText(mojaMapa.get(kljuc)); - mojaMapa.get(kljuc)
is a string that contains break characters. Why is this happening and
how can I fix it?

Dear ivica,

Thanks for considering Aspose.Slides for Java.

You are having this problem because input string is having line break characters. You should to split your input string yourself and add paragraphs inside the text frame for each resulting string after split.

The below code snippet illustrates how to split the string having line break characters and add to paragraphs of text frame.

TextFrame tf = shapes.getTextFrame();
String descriptionText = "abcd \n efgh \n ijklm";
Paragraphs paras = tf.getParagraphs();
String delimiters = "\n";
String[] split = descriptionText.split(delimiters);
paras.get(0).getPortions().get(0).setText(split[0]);

for (int i = 1; i < split.length; i++) {
    paras.add(i, new Paragraphs(paras.get(i - 1)));
    paras.get(i).getPortions().clear();
    paras.get(i).getPortions().add(new Portion(paras.get(0).getPortions().get(0)));
    paras.get(i).getPortions().get(0).setText(split[i]);
}