sfx2/source/notebookbar/SfxNotebookBar.cxx |    2 +-
 sfx2/source/view/viewfrm.cxx               |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 9efcbef08c406e5d9b9486c28f3979f875953c30
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Sat Apr 4 17:36:22 2020 -0800
Commit:     Xisco Faulí <xiscofa...@libreoffice.org>
CommitDate: Thu Apr 16 11:08:33 2020 +0200

    tdf#131209 reload the notebook bar
    
    Change-Id: Id5a1b63c0f907a8f20406d2fa1c08c1aff34b91c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91702
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit 68c96a54fef93b9f735aeb6c9ae07171e934132a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92184
    Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org>

diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx 
b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index a2d7f1f39b17..8f97aa045918 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -332,7 +332,7 @@ bool SfxNotebookBar::StateMethod(SfxBindings& rBindings, 
const OUString& rUIFile
 {
     SfxFrame& rFrame = rBindings.GetDispatcher_Impl()->GetFrame()->GetFrame();
     return StateMethod(rFrame.GetSystemWindow(), rFrame.GetFrameInterface(), 
rUIFile,
-                       bReloadNotebookbar || 
rBindings.GetDispatcher_Impl()->IsUpdated_Impl());
+                       bReloadNotebookbar);
 }
 
 bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 6029bdc341e3..5a64599e5894 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -143,6 +143,7 @@ using ::com::sun::star::container::XIndexContainer;
 #include <sfx2/minfitem.hxx>
 #include <sfx2/strings.hrc>
 #include "impviewframe.hxx"
+#include <vcl/commandinfoprovider.hxx>
 #include <vcl/svapp.hxx>
 
 #define ShellClass_SfxViewFrame
@@ -860,6 +861,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 
                     UpdateDocument_Impl();
 
+                    if 
(vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame().GetFrameInterface()) 
== "com.sun.star.text.TextDocument")
+                        
sfx2::SfxNotebookBar::ReloadNotebookBar("modules/swriter/ui/");
+
                     try
                     {
                         for (auto const& viewFrame : aViewFrames)
@@ -1425,6 +1429,9 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
                     }
                 }
 
+                if 
(vcl::CommandInfoProvider::GetModuleIdentifier(GetFrame().GetFrameInterface()) 
== "com.sun.star.text.TextDocument")
+                    
sfx2::SfxNotebookBar::ReloadNotebookBar("modules/swriter/ui/");
+
                 if 
(SfxClassificationHelper::IsClassified(m_xObjSh->getDocProperties()))
                 {
                     // Document has BAILS properties, display an infobar 
accordingly.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to