include/sfx2/sidebar/SidebarDockingWindow.hxx | 3 ++ sfx2/source/sidebar/SidebarController.cxx | 2 + sfx2/source/sidebar/SidebarDockingWindow.cxx | 30 ++++++++++++++++++++++++++ 3 files changed, 35 insertions(+)
New commits: commit 7618815f7080acc67a8d1cda1a6fc49797ded364 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Wed Oct 10 06:44:27 2018 -0400 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jul 26 09:52:35 2019 +0200 sfx2: LOK: route the parent sidebar window instead of the deck Change-Id: I0269a67c637afbc63a81405918f620009e681ff6 Reviewed-on: https://gerrit.libreoffice.org/73508 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx b/include/sfx2/sidebar/SidebarDockingWindow.hxx index 3c3059b87d7a..a0da550a020b 100644 --- a/include/sfx2/sidebar/SidebarDockingWindow.hxx +++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx @@ -44,11 +44,14 @@ public: void SetReadyToDrag( bool bStartDrag ) { mbIsReadyToDrag = bStartDrag; } bool IsReadyToDrag() const { return mbIsReadyToDrag; } + void NotifyResize(); + using SfxDockingWindow::Close; protected: // Window overridables virtual void GetFocus() override; + virtual void Resize() override; virtual SfxChildAlignment CheckAlignment ( SfxChildAlignment eCurrentAlignment, diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index b560e01c2a14..1855b65e61fc 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -398,6 +398,8 @@ void SidebarController::NotifyResize() } RestrictWidth(nMinimalWidth); + + mpParentWindow->NotifyResize(); } void SidebarController::ProcessNewWidth (const sal_Int32 nNewWidth) diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 085ea813fa0f..baba39d49ea3 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -22,6 +22,7 @@ #include <sfx2/sidebar/PanelDescriptor.hxx> #include <comphelper/processfactory.hxx> +#include <sfx2/lokhelper.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/viewfrm.hxx> @@ -29,6 +30,7 @@ #include <tools/link.hxx> #include <tools/gen.hxx> #include <vcl/event.hxx> +#include <comphelper/lok.hxx> using namespace css; using namespace css::uno; @@ -93,6 +95,34 @@ bool SidebarDockingWindow::Close() return SfxDockingWindow::Close(); } +void SidebarDockingWindow::Resize() +{ + SfxDockingWindow::Resize(); + + NotifyResize(); +} + +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()); + + if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) + { + std::vector<vcl::LOKPayloadItem> aItems; + aItems.emplace_back("type", "deck"); + 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!"); + } + } +} + SfxChildAlignment SidebarDockingWindow::CheckAlignment ( SfxChildAlignment eCurrentAlignment, SfxChildAlignment eRequestedAlignment) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits