Who can tell me more about SfxToolBoxControls and registerControl()?

Winfried Donkers W.Donkers at dci-electronics.nl
Wed Apr 4 00:08:50 PDT 2012

> Jan Holesovsky wrote (3 april 2012 14:45)
> > The 'split button' is a derived SfxToolBoxControl which triggers an
> > Execute function when the colour is chosen from the colour palette and
> > triggers a virtual Select function when the left half of the button
> > (last used colour) is clicked. According to a comment in
> > /core/sfx2/inx/sfx2/tbxc.hxx (line 179-185) RegisterControl must be
> > used for extra functionality (such as the split button uses).
> >
> git grep advises that they are in the factory functions like
> SwDLL::RegisterControls() in sw/source/ui/app/swmodule.cxx; so in the case
> of the report designer, I'd call it somewhere where it is instantiated - one of
> the create() methods listed in
> reportdesign/source/ui/misc/rptuiservices.cxx, probably.
> But haven't actually tried that - so please report back if this leads to a dead
> end.

Thank you for your help.
I am trying that, but haven't found the module pointer yet (in swmodule SwModule*) that needs to passed to RegisterControl(). Any ideas where to look for that?
And I intend to try first to put RegisterControl in reportdesign/source/ui/misc/toolboxcontroller.cxx, where the buttons are instantiated.


More information about the LibreOffice mailing list