From 0778991057fd4592aacc193a5a30a0ee09a8be18 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 19 Dec 2019 11:16:15 +0000 Subject: sidebar: bring new sidebar commands in-house & be more assertive with sfx2 Force the sidebar to do it's asynchronous things synchronously to help keep things sane. Also emit our (in-process on Android / iOS) context change notification after everyone else got it & updated their panels. Change-Id: If94de6c83f1b783d7deee515fc2ee9a8d3754765 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86088 Tested-by: Jenkins Reviewed-by: Michael Meeks --- include/sfx2/sidebar/AsynchronousCall.hxx | 1 + include/sfx2/sidebar/SidebarController.hxx | 2 ++ include/sfx2/sidebar/SidebarDockingWindow.hxx | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/sfx2/sidebar/AsynchronousCall.hxx b/include/sfx2/sidebar/AsynchronousCall.hxx index b05c90dc86db..b2c868b653ec 100644 --- a/include/sfx2/sidebar/AsynchronousCall.hxx +++ b/include/sfx2/sidebar/AsynchronousCall.hxx @@ -40,6 +40,7 @@ public: void RequestCall(); void CancelRequest(); + void Sync(); private: Action const maAction; diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index e65bceb78b6f..abc122faa709 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -169,6 +169,8 @@ public: void saveDeckState(); + void SyncUpdate(); + private: SidebarController(SidebarDockingWindow* pParentWindow, const SfxViewFrame* pViewFrame); diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx b/include/sfx2/sidebar/SidebarDockingWindow.hxx index 436f5ebce038..d9e3a177a5f5 100644 --- a/include/sfx2/sidebar/SidebarDockingWindow.hxx +++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx @@ -35,7 +35,7 @@ class SidebarController; class SidebarNotifyIdle; -class SidebarDockingWindow final : public SfxDockingWindow +class SFX2_DLLPUBLIC SidebarDockingWindow final : public SfxDockingWindow { public: SidebarDockingWindow(SfxBindings* pBindings, SidebarChildWindow& rChildWindow, @@ -45,6 +45,9 @@ public: virtual bool EventNotify(NotifyEvent& rEvent) override; virtual bool Close() override; + /// Force generation of all panels by completion. + void SyncUpdate(); + void NotifyResize(); using SfxDockingWindow::Close; -- cgit