Alt Text and Description for draw shapes?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
_savage
Posts: 187
Joined: Sun Apr 21, 2013 12:55 am

Alt Text and Description for draw shapes?

Post by _savage »

When I drop a JPG image in my Writer document, right-click on it, and go into the “Options” tab of the image properties, then I can edit the Name, Alternative Text, and Description for that image. The Alternative next is then accessible through the SwXTextGraphicObject Title property, and the Description through the Description property.

Is it possible to enter an Alt Text and Description for draw shapes as well, and if so, where are those properties stored? I’ve been looking around and can’t find much help… :?

Thanks!
Mac 10.14 using LO 7.2.0.2, Gentoo Linux using LO 7.2.3.2 headless.
Bidouille
Volunteer
Posts: 574
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: Alt Text and Description for draw shapes?

Post by Bidouille »

_savage wrote:Is it possible to enter an Alt Text and Description for draw shapes as well, and if so, where are those properties stored?
Use XRay for inspect this.
This object is a com.sun.star.drawing.XShape.
Logically, you have .Description .Name and .Title properties and setPropertyValue to modify these.
_savage
Posts: 187
Joined: Sun Apr 21, 2013 12:55 am

Re: Alt Text and Description for draw shapes?

Post by _savage »

I’m using MRI for inspection.

When I draw a shape then it seems that that’s a com.sun.star.drawing.ShapeCollection with a single member; that single member is a XShape which indeed sports Description and Title. I’m wondering though, if that collection contains more than one shape then each shape has these properties but not the collection?
Mac 10.14 using LO 7.2.0.2, Gentoo Linux using LO 7.2.3.2 headless.
Post Reply