diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-05 11:35:17 +0000 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-05-25 12:12:30 +0200 |
commit | 029bdf4736606361863055c3b200ddcc1b07b00d (patch) | |
tree | f1fbbcfa06ea5078d572d55d0acf9cddb44f4ad7 /sd | |
parent | daef7eccd9f5f6fcc3456fa01bce09174de0ecf6 (diff) |
with widget layout we don't need to explicitly track the parent resize
Change-Id: I17e153ecc8b1b79bbbfbbccfe88a46f5905611fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112010
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 20 | ||||
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.hxx | 1 |
2 files changed, 1 insertions, 20 deletions
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 89bd0a6efb64..10c34325817d 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -205,10 +205,6 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell ) aStateChangeLink, Reference<frame::XDispatchProvider>(mrBase.GetController()->getFrame(), UNO_QUERY), ".uno:VerticalTextState"); - - SetSizePixel(GetParent()->GetSizePixel()); - Link<VclWindowEvent&,void> aWindowEventHandlerLink (LINK(this,LayoutMenu,WindowEventHandler)); - GetParent()->AddEventListener(aWindowEventHandlerLink); } LayoutMenu::~LayoutMenu() @@ -241,9 +237,6 @@ void LayoutMenu::Dispose() Clear(); Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,LayoutMenu,EventMultiplexerListener)); mrBase.GetEventMultiplexer()->RemoveEventListener (aLink); - - Link<VclWindowEvent&,void> aWindowEventHandlerLink (LINK(this,LayoutMenu,WindowEventHandler)); - GetParent()->RemoveEventListener(aWindowEventHandlerLink); } AutoLayout LayoutMenu::GetSelectedAutoLayout() const @@ -743,19 +736,6 @@ IMPL_LINK(LayoutMenu, EventMultiplexerListener, ::sd::tools::EventMultiplexerEve } } -IMPL_LINK(LayoutMenu, WindowEventHandler, VclWindowEvent&, rEvent, void) -{ - switch (rEvent.GetId()) - { - case VclEventId::WindowShow: - case VclEventId::WindowResize: - SetSizePixel(GetParent()->GetSizePixel()); - break; - - default: break; - } -} - void LayoutMenu::DataChanged (const DataChangedEvent& /*rEvent*/) { Fill(); diff --git a/sd/source/ui/sidebar/LayoutMenu.hxx b/sd/source/ui/sidebar/LayoutMenu.hxx index a280b3013759..90a7c5751892 100644 --- a/sd/source/ui/sidebar/LayoutMenu.hxx +++ b/sd/source/ui/sidebar/LayoutMenu.hxx @@ -157,6 +157,7 @@ private: DECL_LINK(EventMultiplexerListener, ::sd::tools::EventMultiplexerEvent&, void); DECL_LINK(WindowEventHandler, VclWindowEvent&, void); DECL_LINK(OnMenuItemSelected, Menu*, bool); + void OnMenuItemSelected(std::string_view ident); }; } // end of namespace ::sd::toolpanel |