Set click event listener

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
psamim
Posts: 2
Joined: Tue Feb 21, 2017 1:04 pm

Set click event listener

Post by psamim »

Hi,

I am trying to write a python script which interacts with an Impress presentation. In Impress I can select a shape, right click on it, and in "interaction" menu, I can set macros to run on shape click.

Can I set listeners for click events for shapes through UNO API?

Thanks, Samim
LibreOffice 5.2 on Archlinux
hubert lambert
Posts: 145
Joined: Mon Jun 13, 2016 10:50 am

Re: Set click event listener

Post by hubert lambert »

Hello,

You need to set the value of the shape property "OnClick" as com.sun.star.presentation.ClickAction.MACRO and put the script uri to be triggered in the property "Bookmark" (see devguide).
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
Post Reply