Page 1 of 1
Context menu selection
Posted: Wed Apr 11, 2018 8:33 pm
by Fraz627
I am playing around with the context menu interceptor.
how would I determine which context menu is being selected, I guess what I'm trying to get at
is would like to know if I selected the tab context menu or cell context menu so the correct one could be modified.
Thanks
Re: Context menu selection
Posted: Wed Apr 11, 2018 11:16 pm
by JeJe
Doesn't the interceptor give you the menu so you can look at the first menu item and its text or commandURL?
Edit... this tells you about the resource identifiers...
https://wiki.openoffice.org/wiki/User:A ... ementation
Re: Context menu selection
Posted: Wed May 23, 2018 2:05 pm
by Sébastien C
I understand that this does not exactly answer your specific question of whether this or that contextual menu is called.
I hear just as well that
this code snippet is (partially) in French. But
G****** Tr******* is your friend.
And you use the formula "
I am playing around [...]".
So maybe this little gem will bring water to your mill for "
playing"...
Re: Context menu selection
Posted: Thu May 24, 2018 9:47 am
by JeJe
I've been playing around with Sébastien C's linked to code (thanks, may use this myself - method works with writer too and it seems to be okay with calling your own custom menu and setting the context menu to CANCELLED)
In the Function ThisDocument_notifyContextMenuExecute try this
Code: Select all
dim nn
set nn = oATContainer.getbyindex(0)
msgbox nn.commandurl
'I get the result:
'tab context menu - slot 26269
'cell - slot 26067
http://www.openoffice.org/api/docs/comm ... igger.html
(.text causes a crash)