sc/source/ui/dbgui/sortkeydlg.cxx | 8 +++++++- sc/source/ui/inc/sortkeydlg.hxx | 2 ++ sw/source/ui/index/cnttab.cxx | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-)
New commits: commit 19f331ca6aa87a438b1eeabef72978ddbfb0e747 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Oct 6 10:40:38 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Oct 6 14:42:48 2020 +0200 reparent to nothing to break gtk ownership cycle which is our usual solution, instead of using less common flag Change-Id: I9dd54a161df53a5b6ffb0b7655e510a6cc4c4824 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104018 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx index db218cf8678f..ec81bda34fc1 100644 --- a/sc/source/ui/dbgui/sortkeydlg.cxx +++ b/sc/source/ui/dbgui/sortkeydlg.cxx @@ -13,13 +13,19 @@ ScSortKeyItem::ScSortKeyItem(weld::Container* pParent) : m_xBuilder(Application::CreateBuilder(pParent, "modules/scalc/ui/sortkey.ui")) - , m_xFrame(m_xBuilder->weld_frame("SortKeyFrame", true)) + , m_xFrame(m_xBuilder->weld_frame("SortKeyFrame")) , m_xLbSort(m_xBuilder->weld_combo_box("sortlb")) , m_xBtnUp(m_xBuilder->weld_radio_button("up")) , m_xBtnDown(m_xBuilder->weld_radio_button("down")) + , m_pParent(pParent) { } +ScSortKeyItem::~ScSortKeyItem() +{ + m_pParent->move(m_xFrame.get(), nullptr); +} + void ScSortKeyItem::DisableField() { m_xFrame->set_sensitive(false); diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx index 1ac699970d4c..85b6da332e20 100644 --- a/sc/source/ui/inc/sortkeydlg.hxx +++ b/sc/source/ui/inc/sortkeydlg.hxx @@ -23,8 +23,10 @@ struct ScSortKeyItem std::unique_ptr<weld::ComboBox> m_xLbSort; std::unique_ptr<weld::RadioButton> m_xBtnUp; std::unique_ptr<weld::RadioButton> m_xBtnDown; + weld::Container* m_pParent; ScSortKeyItem(weld::Container* pParent); + ~ScSortKeyItem(); void DisableField(); void EnableField(); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 8fa6ae0e21d6..0d7454f2410a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1393,7 +1393,7 @@ public: , aFormToken(rToken) , bNextControl(false) , m_pParent(pTokenWin) - , m_xEntry(m_xBuilder->weld_entry("entry", true)) + , m_xEntry(m_xBuilder->weld_entry("entry")) { m_xEntry->connect_changed(LINK(this, SwTOXEdit, ModifyHdl)); m_xEntry->connect_key_press(LINK(this, SwTOXEdit, KeyInputHdl)); @@ -1401,6 +1401,11 @@ public: m_xEntry->set_tooltip_text(m_pParent->CreateQuickHelp(rToken)); } + virtual ~SwTOXEdit() override + { + m_pParent->get_child_container()->move(m_xEntry.get(), nullptr); + } + virtual WindowType GetType() const override { return WindowType::EDIT; @@ -1549,13 +1554,18 @@ public: , aFormToken(rToken) , bNextControl(false) , m_pParent(pTokenWin) - , m_xButton(m_xBuilder->weld_toggle_button("button", true)) + , m_xButton(m_xBuilder->weld_toggle_button("button")) { m_xButton->connect_key_press(LINK(this, SwTOXButton, KeyInputHdl)); m_xButton->connect_focus_in(LINK(this, SwTOXButton, FocusInHdl)); m_xButton->set_tooltip_text(m_pParent->CreateQuickHelp(rToken)); } + virtual ~SwTOXButton() override + { + m_pParent->get_child_container()->move(m_xButton.get(), nullptr); + } + virtual WindowType GetType() const override { return WindowType::PUSHBUTTON; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits