[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sfx2/source

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 16 09:09:02 UTC 2020


 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 <raykowj at gmail.com>
AuthorDate: Sat Apr 4 17:36:22 2020 -0800
Commit:     Xisco Faulí <xiscofauli at 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.grandin at collabora.co.uk>
    (cherry picked from commit 68c96a54fef93b9f735aeb6c9ae07171e934132a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92184
    Reviewed-by: Xisco Faulí <xiscofauli at 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.


More information about the Libreoffice-commits mailing list