diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-03-20 09:54:28 +0100 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-03-27 10:44:10 +0200 |
commit | f7de9714b00dd618544cf561d5ee45354623b947 (patch) | |
tree | 1ceb5940ae87ac45199c67ab510ac3626de78378 /include | |
parent | 04630f26d06c4d3ec22b2a8b97e6a5e69cc70d5e (diff) |
tdf#115786: Fix reopening undocked sidebar
while trying hard to keep tdf#88241 fixed. Had to introduce yet
another bool variable as now that previously active sidebar deck
is remembered (= it is visible when floating window opens) it's
impossible to tell whether sidebar was already opened or not
Change-Id: If2c9edfa2f9beb400537b106d3094f256b0cc183
Reviewed-on: https://gerrit.libreoffice.org/51866
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/sidebar/SidebarController.hxx | 4 | ||||
-rw-r--r-- | include/sfx2/sidebar/SidebarDockingWindow.hxx | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index 32340fe2c017..50e91097ca67 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -146,6 +146,8 @@ public: void SwitchToDeck(const OUString& rsDeckId); void SwitchToDefaultDeck(); + bool WasFloatingDeckClosed() const { return mbFloatingDeckClosed; } + void SetFloatingDeckClosed(bool bWasClosed) { mbFloatingDeckClosed = bWasClosed; } void CreateDeck(const OUString& rDeckId); void CreateDeck(const OUString& rDeckId, const Context& rContext, bool bForceCreate = false); @@ -192,6 +194,8 @@ private: ::boost::optional<bool> mbIsDeckRequestedOpen; ::boost::optional<bool> mbIsDeckOpen; + bool mbFloatingDeckClosed; + /** Before the deck is closed the sidebar width is saved into this variable, so that it can be restored when the deck is reopened. */ diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx b/include/sfx2/sidebar/SidebarDockingWindow.hxx index 3467df71c7b3..2bff73a3eb77 100644 --- a/include/sfx2/sidebar/SidebarDockingWindow.hxx +++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx @@ -37,6 +37,7 @@ public: virtual ~SidebarDockingWindow() override; virtual void dispose() override; virtual bool EventNotify(NotifyEvent& rEvent) override; + virtual bool Close() override; using SfxDockingWindow::Close; |