diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-10-27 10:36:51 -0400 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-26 11:45:41 +0200 |
commit | 82518f1235aea055a6283bb6ce6a8a640959b564 (patch) | |
tree | 84bf4c9bf825bf9260a4189e801fc67892ca9dbc /sfx2 | |
parent | 36088d528a3df82b3fcdf9a8685e53ba2f1cbd16 (diff) |
LOK: sidebar: send close notification on disposing sidebar
Change-Id: Ia8f197d07ba4b6a089571e9ca23b4697d04e7734
Reviewed-on: https://gerrit.libreoffice.org/73510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarDockingWindow.cxx | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 1855b65e61fc..6b3bcc025e0d 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -1118,11 +1118,6 @@ IMPL_LINK(SidebarController, OnMenuItemSelected, Menu*, pMenu, bool) void SidebarController::RequestCloseDeck() { - if (comphelper::LibreOfficeKit::isActive()) - { - mpCurrentDeck->GetLOKNotifier()->notifyWindow(mpCurrentDeck->GetLOKWindowId(), "close"); - } - mbIsDeckRequestedOpen = false; UpdateDeckOpenState(); diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index baba39d49ea3..dfc3d296068d 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -70,6 +70,12 @@ void SidebarDockingWindow::dispose() void SidebarDockingWindow::DoDispose() { + if (comphelper::LibreOfficeKit::isActive()) + { + if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) + pNotifier->notifyWindow(GetLOKWindowId(), "close"); + } + Reference<lang::XComponent> xComponent (static_cast<XWeak*>(mpSidebarController.get()), UNO_QUERY); mpSidebarController.clear(); if (xComponent.is()) @@ -104,10 +110,8 @@ void SidebarDockingWindow::Resize() void SidebarDockingWindow::NotifyResize() { - SAL_WARN("sw", "SfxDockingWindow::Resize: " << reinterpret_cast<sal_IntPtr>(SfxViewShell::Current())); if (comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current()) { - SAL_WARN("sw", "SfxDockingWindow::Resize: Creating!"); if (!GetLOKNotifier()) SetLOKNotifier(SfxViewShell::Current()); @@ -118,7 +122,6 @@ void SidebarDockingWindow::NotifyResize() aItems.emplace_back(std::make_pair("position", Point(GetOutOffXPixel(), GetOutOffYPixel()).toString())); aItems.emplace_back(std::make_pair("size", GetSizePixel().toString())); pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems); - SAL_WARN("sw", "SfxDockingWindow::Resize: Created!"); } } } |