summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-17 17:27:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-19 22:07:19 +0100
commite3a002c53a544de02e5119c5b0a2fd4f972156a8 (patch)
treed6bd55210bb93fdc2aae2e398b63c3dddeb38326 /svx
parente994b3fc3b2c9b7d39a715fc4d9453e06434d457 (diff)
get native gtk widgets in sidebars working
Change-Id: If65aef1249f54a87d7854c3fa2db4319a24a5a05 Reviewed-on: https://gerrit.libreoffice.org/85326 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/PanelLayout.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 105bb1c1d6da..e82c03fdc513 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -30,11 +30,18 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const OUStrin
// VclBuilder will trigger resize and start Idle
if (!bInterimBuilder)
+ {
m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame));
+ if (GetSettings().GetStyleSettings().GetAutoMnemonic())
+ Accelerator::GenerateAutoMnemonicsOnHierarchy(this);
+ }
else
- m_xBuilder.reset(Application::CreateInterimBuilder(this, rUIXMLDescription));
- if (GetSettings().GetStyleSettings().GetAutoMnemonic())
- Accelerator::GenerateAutoMnemonicsOnHierarchy(this);
+ {
+ m_xVclContentArea = VclPtr<VclVBox>::Create(this);
+ m_xVclContentArea->Show();
+ m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription));
+ m_xContainer = m_xBuilder->weld_container(rID);
+ }
}
PanelLayout::~PanelLayout()
@@ -46,7 +53,9 @@ void PanelLayout::dispose()
{
m_bInClose = true;
m_aPanelLayoutIdle.Stop();
+ m_xContainer.reset();
m_xBuilder.reset();
+ m_xVclContentArea.disposeAndClear();
disposeBuilder();
Control::dispose();
}