[Libreoffice-commits] core.git: include/sfx2 sd/source sfx2/source
Szymon Kłos
eszkadev at gmail.com
Sun Feb 19 14:29:12 UTC 2017
include/sfx2/notebookbar/SfxNotebookBar.hxx | 6 ++++++
sd/source/ui/view/drviewse.cxx | 5 +++++
sfx2/source/notebookbar/SfxNotebookBar.cxx | 14 ++++++++++++++
3 files changed, 25 insertions(+)
New commits:
commit f1af784134b17458b4ca24891d27926feabc67e3
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Sat Feb 18 13:27:28 2017 +0100
tdf#103355 Hide Notebookbar during slide show
Change-Id: Ie3e1b9f9dfc109ecb48cd384972dfa5a5118c3fa
Reviewed-on: https://gerrit.libreoffice.org/34401
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Szymon Kłos <eszkadev at gmail.com>
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx
index 471e806..8792eec 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 1e0d809..59795ac 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 2ced9f9..2976f43 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())
More information about the Libreoffice-commits
mailing list