Hyperlink.getTargetSlide() returns null

Hi,


In the attached presentation, on the second slide, there is an SmartArt shape with some of the nodes containing internal hyperlinks. I tried getTargetSlide() for couple of them, but I got null every time. According to the ActionType value, all of them should link to some other slides.

Here’s the code I use:

String presentationPath = “Sistema muscolare.ppt”;

InputStream inputStream = new FileInputStream(presentationPath);

Presentation presentation = new Presentation(inputStream);

inputStream.close();
ISlide slide = presentation.getSlides().get_Item(1);
ISmartArt smartArt = (ISmartArt) slide.getShapes().get_Item(0);
ISmartArtNode smartArtNode = smartArt.getAllNodes().get_Item(0);
IPortion portion = smartArtNode.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0);
IHyperlink hyperlink = portion.createPortionFormatEffective().getHyperlinkClick();
System.out.println(portion.getText());
System.out.println(hyperlink.getActionType());
System.out.println(hyperlink.getTargetSlide());

Here’s the output:

plastica
8
null

Can you check this?

Thanks,
Zeljko
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-35311 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,

Hi,


I have another presentation with the same issue.

Here’s the code for reproducing it:

String presentationPath = “6._iuc_ju_ethiopia_v2.ppt”;

InputStream inputStream = new FileInputStream(presentationPath);

Presentation presentation = new Presentation(inputStream);

inputStream.close();

ISlide slide = presentation.getSlides().get_Item(17);
ISmartArt smartArt = (ISmartArt) slide.getShapes().get_Item(2);

ISmartArtNode smartArtNode = smartArt.getNodes().get_Item(1);
IPortion portion = smartArtNode.getTextFrame().getParagraphs()
.get_Item(0).getPortions().get_Item(0);
IHyperlink hyperlink = portion.createPortionFormatEffective()
.getHyperlinkClick();

System.out.println(portion.getText());
System.out.println(hyperlink.getActionType());
System.out.println(hyperlink.getTargetSlide());

Here’s the output:

Networking
8
null

Regards,
Zeljko

Hi Zeljko,


I have observed your comments and like to share with you that the issue SLIDESJAVA-35311 has been fixed for Aspose.Slides for Java 16.4.0 and hopefully it will not occur with the file you have just shared with us. But to ensure the fix for the new file, another ticket with ID SLIDESJAVA-35404 has been logged into our issue management system for further investigation and resolution. This thread has been lined with the issue so that you may be notified automatically as soon as the issue will be fixed.

Best Regards,

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


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