summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2017-02-18 13:27:28 +0100
committerSzymon Kłos <eszkadev@gmail.com>2017-02-19 14:28:49 +0000
commitf1af784134b17458b4ca24891d27926feabc67e3 (patch)
tree1e704e7dde8148a4ea5f84ee4a962758d7081e41
parent1f02e9b5a71836aa750d8e6676d2e876cad5e7a2 (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>
-rw-r--r--include/sfx2/notebookbar/SfxNotebookBar.hxx6
-rw-r--r--sd/source/ui/view/drviewse.cxx5
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx14
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 1e0d809efd68..59795acc7ed2 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 2ced9f926204..2976f43a6524 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -37,6 +37,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 )
{
@@ -171,8 +172,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::Any;
if (SfxViewFrame::Current())