diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2017-02-18 13:27:28 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-07-11 18:27:52 +0200 |
commit | 4e461f61ac739c6b9ff38c247095ea69b9fb4e21 (patch) | |
tree | 1808ad00de7acfee77e84e4a22a8c759b74ee47d | |
parent | b49779db18fa094f3b2f4166ee93c072d2f117a1 (diff) |
tdf#103355 Hide Notebookbar during slide show
Change-Id: Ie3e1b9f9dfc109ecb48cd384972dfa5a5118c3fa
Reviewed-on: https://gerrit.libreoffice.org/34401
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/38898
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | include/sfx2/notebookbar/SfxNotebookBar.hxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/notebookbar/SfxNotebookBar.cxx | 14 |
3 files changed, 25 insertions, 0 deletions
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx index 471e806d96c3..8792eecf3a4f 100644 --- a/include/sfx2/notebookbar/SfxNotebookBar.hxx +++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx @@ -37,6 +37,11 @@ public: const css::uno::Reference<css::frame::XFrame> & xFrame, const OUString& rUIFile); + /// Method temporarily blocks showing of the NotebookBar + static void LockNotebookBar(); + /// Method restores normal behaviour of the Notebookbar + static void UnlockNotebookBar(); + static void RemoveListeners(SystemWindow* pSysWindow); static void ShowMenubar(bool bShow); @@ -44,6 +49,7 @@ public: private: static bool m_bLock; + static bool m_bHide; DECL_STATIC_LINK(SfxNotebookBar, OpenNotebookbarPopupMenu, NotebookBar*, void); }; diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index cff011ed0dc2..e48126db1870 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -60,6 +60,7 @@ #include <avmedia/mediawindow.hxx> #include <svl/urihelper.hxx> #include <sfx2/docfile.hxx> +#include <sfx2/notebookbar/SfxNotebookBar.hxx> #include "DrawViewShell.hxx" #include "slideshow.hxx" @@ -722,8 +723,12 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) case SID_PRESENTATION_CURRENT_SLIDE: case SID_REHEARSE_TIMINGS: { + sfx2::SfxNotebookBar::LockNotebookBar(); + slideshowhelp::ShowSlideShow(rReq, *GetDoc()); rReq.Ignore (); + + sfx2::SfxNotebookBar::UnlockNotebookBar(); } break; diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index c3821b6d6ff9..00cc7e99c01d 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -35,6 +35,7 @@ using namespace css; #define MENUBAR_STR "private:resource/menubar/menubar" bool SfxNotebookBar::m_bLock = false; +bool SfxNotebookBar::m_bHide = false; static Reference<frame::XLayoutManager> lcl_getLayoutManager( const Reference<frame::XFrame>& xFrame ) { @@ -168,8 +169,21 @@ void SfxNotebookBar::CloseMethod(SystemWindow* pSysWindow) } } +void SfxNotebookBar::LockNotebookBar() +{ + m_bHide = true; +} + +void SfxNotebookBar::UnlockNotebookBar() +{ + m_bHide = false; +} + bool SfxNotebookBar::IsActive() { + if (m_bHide) + return false; + vcl::EnumContext::Application eApp = vcl::EnumContext::Application::Application_Any; if (SfxViewFrame::Current()) |