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
Context menu selection
Context menu selection
Open Office 4.1 on Windows 10
Re: Context menu selection
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
Edit... this tells you about the resource identifiers...
https://wiki.openoffice.org/wiki/User:A ... ementation
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
- Sébastien C
- Posts: 111
- Joined: Mon Jan 04, 2010 5:06 pm
- Location: Meymac, France
Re: Context menu selection
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"...
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"...
LibreOffice v. 7.3.2.2, under GNU-Linux Mint and, in virtualization and just for tests, LibreOffice v. 7.3.2.2 an OpenOffice v. 4.1.12 under M$-W 10 .
Re: Context menu selection
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
http://www.openoffice.org/api/docs/comm ... igger.html
(.text causes a crash)
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)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)