Manipulate menu item titles (text) defined in Addons.xcu

The Application Programming Interface and the OASIS Open Document Format

Manipulate menu item titles (text) defined in Addons.xcu

Postby kwalcock » Thu Oct 09, 2014 12:15 pm

I have a very nice addon programmed in C++ and the related menu items are stored in Addons.xcu. The addon would be even nicer if I could adjust the menu item texts as the user works similarly to how the undo, redo, and repeat items function in the edit menu. I can't figure out how to get ahold of the XMenu associated with my addon. From there it seems that I could use setItemText(). Who knows how to get that XMenu and is willing to tell? Thanks.
Apache OpenOffice 4.0.1
Windows, Linux, MacOS
kwalcock
 
Posts: 24
Joined: Thu Oct 09, 2014 11:54 am

Re: Manipulate menu item titles (text) defined in Addons.xcu

Postby kwalcock » Fri Oct 17, 2014 10:55 am

The solution to this was to set the menu item text in featureStateEvent.State. This is the same place a menu item can be enabled or disabled. I just didn't realize that the state is the text. Problem solved. Thanks Ariel.
Apache OpenOffice 4.0.1
Windows, Linux, MacOS
kwalcock
 
Posts: 24
Joined: Thu Oct 09, 2014 11:54 am


Return to UNO API and ODF

Who is online

Users browsing this forum: No registered users and 1 guest