[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - include/sfx2 sd/source sfx2/source

Szymon Kłos eszkadev at gmail.com
Tue Jul 11 16:28:24 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 4e461f61ac739c6b9ff38c247095ea69b9fb4e21
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>
    Reviewed-on: https://gerrit.libreoffice.org/38898
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

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())


More information about the Libreoffice-commits mailing list