Missing Value of ecLinkedField Text Portion when Using Aspose.Slides for Java

Hi,

I am writing to you about a problem we encountered in working with MSO PowerPoint document (pptx format) using the Aspose Slides v23.6 library.

Specifically, when we try to remove the portion with field type ecLinkedField, and after that add a new one (portion) like that, the value that can be seen on the source file dissapears.

I am enclosing screenshots, source file and test code for reproducing reported behavior.

Best regards!

Nenad

report.zip (149.5 KB)

@zpredojevic,
Thank you for contacting support. I am working on the issue and will get back to you soon.

@zpredojevic,
I’ve reproduced the problem you described. We apologize for any inconvenience caused.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESJAVA-39402

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@zpredojevic,
Our developers have investigated the case.

The ecLinkedField element is presented in your output presentation, you can open the output file as an archive and check it yourself. Please take a look at the content in slide1.xml: Field.png (8.7 KB).

There is no text on the slide in PowerPoint because the newly created text portion contains no text:

portion = new Portion();
IFieldType fieldType = new FieldType(expectedSecondPortionFieldType);
portion.addField(fieldType); // This method does not add visible text to the slide. This is the internal name of FieldType.
paragraph.getPortions().add(portion);

In the source presentation, this field contains not only the name but also the text: source_pres.png (8.6 KB).

To create a text portion containing text and field in a new presentation, you should also use the setText() method:

portion = new Portion();
IFieldType fieldType = new FieldType(expectedSecondPortionFieldType);
portion.addField(fieldType);
portion.setText("some text here"); // Add text to the text portion
paragraph.getPortions().add(portion);

textAndField.png (16.0 KB)

@andrey.potapov

Yes. I tried to place the text explicitly and it is visible on the slide, but does it make sense to do it that way?
I want to say that this portion is, by its nature, a field. Shouldn’t the value be automatically “generated” according to the information that it is a field and that its type is known?

@zpredojevic,
You create a new text portion, so you must set the text in it yourself. Unfortunately, I don’t have any additional information. We apologize for any inconvenience caused.

@andrey.potapov

OK. If you say it should be like that, that’s how we do it. Thank you for your help.

@zpredojevic,
Thank you for using Aspose.Slides.