Alt Text and Description for draw shapes?

Creating a macro - Writing a Script - Using the API

Alt Text and Description for draw shapes?

Postby _savage » Fri Jul 12, 2019 8:43 am

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.11 using LO 5.3.6.1, Gentoo Linux using LO 5.3.4.2 headless.
_savage
 
Posts: 167
Joined: Sun Apr 21, 2013 12:55 am

Re: Alt Text and Description for draw shapes?

Postby Bidouille » Fri Jul 12, 2019 8:54 am

_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.
User avatar
Bidouille
Volunteer
 
Posts: 258
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: Alt Text and Description for draw shapes?

Postby _savage » Fri Jul 12, 2019 9:01 am

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.11 using LO 5.3.6.1, Gentoo Linux using LO 5.3.4.2 headless.
_savage
 
Posts: 167
Joined: Sun Apr 21, 2013 12:55 am


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 7 guests