[Solved]Toggle check mark in menu items for Python extension

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
jmarch
Posts: 6
Joined: Mon Dec 24, 2018 12:36 am

[Solved]Toggle check mark in menu items for Python extension

Post by jmarch »

[Solved] I'm developing an OpenOffice extension using Python. I would like to toggle on/off a check mark for the menu item when it is selected. I have added my menu items in Addons.xcu, but I'm not sure how to access them in Python code to toggle the check status when they are clicked. Any help would be really appreciated.
Thanks.
Last edited by jmarch on Fri Jan 11, 2019 4:30 pm, edited 2 times in total.
LibreOffice 7.3 on Mac Monterey
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Toggle check mark in menu items for Python extension

Post by hanya »

Post by calling statusChanged with FeatureStateEvent.State = bool in your dispatch object.
So you need dispatch object and you have to receive object which implements css.frame.XStatusListener when your dispatch provider is called.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
jmarch
Posts: 6
Joined: Mon Dec 24, 2018 12:36 am

Re: Toggle check mark in menu items for Python extension

Post by jmarch »

Thanks! That helped a lot. That is working now.
LibreOffice 7.3 on Mac Monterey
Post Reply