Le 3 nov. 06, à 09:59, Carsten Driesner a écrit :
Julien Galand wrote:
Hi to all,
My add-on has a toolbar created by a .xcu file, with the right
protocol handler declared (as a node
"org.openoffice.Office.ProtocolHandler/HandlerSet" of the
configuration file).
But there is no component registration in the package; in particular
no registration of the implementation of the service of the protocol
handler.
Instead, the service of the protocol handler is registered
dynamically by the executable component of my add-on, therefore
necessarily LATER than OO's reading of the .xcu file.
=> The toolbar items are shown disabled, probably because the
protocol handler service couldn't be instanciated at the time the
toolbar was created.
Is there a way to ask OO to re-scan the toolbar items to bind them to
the protocol handler, which will likely make them enabled ?
Thank you if you have some hint...
Hi Julien,
I think the best solution would be to register your service before any
user interface element is created. This can be done by a Job which
will be activated on application startup. Nevertheless if you want to
re-scan toolbar items, you can use the
com.sun.star.ui.XUIElementSettings interface. It's available for all
configurable user interface elements (menubar, toolbar, statusbar).
See the following Basic macro
Hi Carsten,
It seems that a toolbar created by a .xcu file isn't considered as
"configurable". It doesn't appear in the list returned by
XLayoutManager.getElements.
It is maybe only a UIElement service instead of ConfigurableUIElement.
I am sorry that I cannot tell you more information, a colleague is
working on this and he has decided to give up that path because of this
failure.
But would you know where we have failed ?
Julien Galand
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]