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
Context
- Who can tell me more about SfxToolBoxControls and registerControl()? · Winfried Donkers
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.