Hi I’m having couple of questions regarding the hyperlink.
When i add new portion and set hyperlink with no action, I proceed to save file ass pptx and ppt, in ppt file link doesn’t have proper formatting while in pptx it has. You can see that in the picture hyperlinkFormating.JPG (52.2 KB)
code for ppt:
Presentation presentation = new Presentation();
ISlide sld = (ISlide) presentation.getSlides().get_Item(0);
IAutoShape ashp = sld.getShapes().addAutoShape(ShapeType.Rectangle, 150, 75, 150, 50);
ashp.addTextFrame(“link portion”);
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().setHyperlinkClick(Hyperlink.getNoAction());
presentation.save(“savedppt.ppt”, SaveFormat.Ppt);
code for pptx:
Presentation presentation = new Presentation();
ISlide sld = (ISlide) presentation.getSlides().get_Item(0);
IAutoShape ashp = sld.getShapes().addAutoShape(ShapeType.Rectangle, 150, 75, 150, 50);
ashp.addTextFrame(“link portion”);
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().setHyperlinkClick(Hyperlink.getNoAction());
presentation.save(“savedpptx.pptx”, SaveFormat.Pptx);
I also have issue with this presentation: 002_Transborder_BeekeepersMktStrategy_25_11_14.ppt.zip (1.8 MB)
there are links on 3d slide that has type JumpSpecificSlide and target slide is null. Is that okay?
picture:hyperlink.JPG (100.7 KB)
code:
String presentationPath = “002_Transborder_BeekeepersMktStrategy_25_11_14.ppt”;
Presentation presentation = new Presentation(presentationPath);
AutoShape shape = (AutoShape) presentation.getSlides().get_Item(2).getShapes().get_Item(0);
IPortionCollection portions = shape.getTextFrame().getParagraphs().get_Item(0).getPortions();
IPortion portion = portions.get_Item(0);
IHyperlink hyperlink = portion.createPortionFormatEffective().getHyperlinkClick();
assertEquals(HyperlinkActionType.JumpSpecificSlide,hyperlink.getActionType());
assertNull(hyperlink.getTargetSlide());
Can you please check this out?
Thanks,
Zeljko.