Hello,
The alternative text title property is lost when a shape is cloned. The following piece of code prints null
instead of Hello!
.
Presentation presentation = new Presentation();
ISlide slide = presentation.getSlides().get_Item(0);
IShape shape = slide.getShapes().addAutoShape(ShapeType.Rectangle, 100, 50, 300, 150);
shape.setAlternativeTextTitle("Hello!");
IShape cloneShape = slide.getShapes().addClone(shape);
System.out.println(cloneShape.getAlternativeTextTitle());
In addition to that, it seems that the alternative text title property is also lost when a presentation is saved (perhaps shapes are cloned during the saving process). Here is my code:
Presentation presentation = new Presentation("D:\\Presentation1.pptx");
ISlide slide = presentation.getSlides().get_Item(0);
IShape shape = slide.getShapes().get_Item(0);
shape.setAlternativeTextTitle("Hello!");
presentation.save("D:\\Presentation1_copy.pptx", SaveFormat.Pptx);
When I open “D:\Presentation1_copy.pptx” in MS Powerpoint, the alternative text title is empty on the first shape.
Could you please fix it? I tried aspose-slides-21.6-jdk16.jar as well as aspose-slides-22.11-jdk16.jar (latest release) but both versions give me the same results.
Thanks for your help.
Regards,
Brice