From 1653bb9bffaa84a40b7d81a8277e887ea28df4e4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 4 Mar 2021 17:22:14 +0000 Subject: remove intermediate containers in sidebars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tested extension sidebars of: a) Wollmux extension sidebars b) Analog Clock Extension demo https://wiki.openoffice.org/wiki/Sidebar_for_Developers#Example:_Analog_Clock_Extension Change-Id: If9729e20526681928137989f01a8ae733a9b0cb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112035 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- svx/source/gallery2/GalleryControl.cxx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'svx/source/gallery2/GalleryControl.cxx') diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index 7ecbffaa90bf..d7b2a969357f 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -25,8 +25,8 @@ namespace svx::sidebar { -GalleryControl::GalleryControl(vcl::Window* pParent) - : PanelLayout(pParent, "GalleryPanel", "svx/ui/sidebargallery.ui", nullptr) +GalleryControl::GalleryControl(weld::Widget* pParent) + : PanelLayout(pParent, "GalleryPanel", "svx/ui/sidebargallery.ui") , mpGallery(Gallery::GetGalleryInstance()) , mxBrowser1(new GalleryBrowser1( *m_xBuilder, @@ -36,26 +36,10 @@ GalleryControl::GalleryControl(vcl::Window* pParent) , mxBrowser2(new GalleryBrowser2(*m_xBuilder, mpGallery)) { mxBrowser1->SelectTheme(0); - m_pInitialFocusWidget = mxBrowser1->GetInitialFocusWidget(); } GalleryControl::~GalleryControl() { - disposeOnce(); -} - -void GalleryControl::dispose() -{ - mxBrowser2.reset(); - mxBrowser1.reset(); - PanelLayout::dispose(); -} - -void GalleryControl::GetFocus() -{ - Window::GetFocus(); - if (mxBrowser1) - mxBrowser1->GrabFocus(); } } // end of namespace svx::sidebar -- cgit