Hello all,

I am struggling a bit to get various colour buttons (e.g. 
font/background/border colour) working as split buttons, so that the last used 
colour can be applied again right away. See fdo45671 for more details on the 
specific buttons/wishes.

For a lot of buttons I have succeeded to convert them to split buttons, for 
some other buttons I encounter problems. The button on the toolbar is of type 
split button (two buttons in one), but the left part of the button (use last 
used colour) does not work An example, that is present since before my 
interferences is the font color in reportdesign (base).

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)<http://opengrok.libreoffice.org/xref/core/sfx2/inc/sfx2/tbxctrl.hxx#179>
 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<http://opengrok.libreoffice.org/xref/core/reportdesign/source/ui/misc/toolboxcontroller.cxx>
 )

Who can give me advise and or hints?



Winfried

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to