Laurent Godard wrote:
Hi again
I answer myself as i found ;)
digging into the SDK, i found
ooo_sdk/examples/DevelopersGuide/OfficeDev/DisableCommands
and the java code is totally understandable
I had to adapt to my extension, but globaly, here is the code at the end
of this mail.
No need to restart
so thanks to carsten driesner for its code in the SDK
one thing i have to now find is the name of the Legacy menu entries. Is
it the .uno: names ?
Hi Laurent,
I want to give you some more information about how you can achieve your
goal. Currently your solution with DisableCommands at runtime works for
menus only and this is just an implementation detail. There are no plans
to change the implementation for the OpenOffice.org menus so you are
safe for the next future. Be careful, this solution won't work if you
want to disable toolbar items! It looks like that many people need an
easy solution to disable entries at runtime. I think we should think
about an enhancement that DisableCommands works for every user interface
element. May be you can write me a "Request for enhancement".
A generic solution would be to use a dispatch interceptor which adds
your implementation into the dispatch chain. There you can manipulate
the state of commands as you like. You can find more information in the
Developer's Guide.
Most menu entries uses the .uno: scheme. A list of command URLs for menu
entries can be found here:
http://wiki.services.openoffice.org/wiki/Framework/Article/OpenOffice.org_2.x_Commands
Regards,
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]