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

Jan Holesovsky kendy at suse.cz
Tue Apr 3 05:44:54 PDT 2012

Hi Winfried,

On 2012-04-03 at 10:08 +0200, Winfried Donkers wrote:

> 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).
> The absence of RegisterControl may well be the cause of the problems I
> encounter (the afore-mentioned font color in reportdesign does not
> call registerControl), but I don't understand how and where to apply
> RegisterControl correctly. 
> (the font color button in reportdesign is
> in /core/reportdesign/source/ui/misc/toolboxcontroller.cxx )
> Who can give me advise and or hints?

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.


More information about the LibreOffice mailing list