diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-06-01 23:09:26 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-05 10:06:50 +0100 |
commit | 08c24064f94dc6c9da41b81476d3a2178f9d1ffc (patch) | |
tree | 0f032bcb59bdf4f4ddd5931b5a617395420d931b /sfx2 | |
parent | 5e0e3e51e8d9e1e300b49fcc58c29300d1c52e62 (diff) |
sidebar: Allow creation of SidebarToolBoxes via .ui.
Change-Id: If8789fd423a609a18514e5a798df5b5992dac34f
(cherry picked from commit 74221eb249f8c4aaf15c2e1f23651f3fde954767)
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarToolBox.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 291b82f1db08..5039a1a675b0 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -87,14 +87,17 @@ SidebarToolBox::SidebarToolBox (Window* pParentWindow) { SetBackground(Wallpaper()); SetPaintTransparent(true); + SetToolboxButtonSize( TOOLBOX_BUTTONSIZE_SMALL ); #ifdef DEBUG SetText(A2S("SidebarToolBox")); #endif } - - +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSidebarToolBox(Window *pParent) +{ + return new SidebarToolBox(pParent); +} SidebarToolBox::~SidebarToolBox (void) { @@ -120,8 +123,15 @@ SidebarToolBox::~SidebarToolBox (void) } } +void SidebarToolBox::InsertItem(const OUString& rCommand, + const com::sun::star::uno::Reference<com::sun::star::frame::XFrame>& rFrame, + ToolBoxItemBits nBits, sal_uInt16 nPos) +{ + ToolBox::InsertItem(rCommand, rFrame, nBits, nPos); - + CreateController(GetItemId(rCommand), rFrame, 0); + RegisterHandlers(); +} void SidebarToolBox::SetBorderWindow (const Window* pBorderWindow) { |