diff options
author | Jim Raykowski <raykowj@gmail.com> | 2020-04-04 17:36:22 -0800 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2020-04-16 11:08:33 +0200 |
commit | 9efcbef08c406e5d9b9486c28f3979f875953c30 (patch) | |
tree | 1aeab55111d63a8cf28ba2313ec5027a3cbdb46f /sfx2 | |
parent | 8bf8808c066704b55d518e807b645b7df11f1b5f (diff) |
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@collabora.co.uk>
(cherry picked from commit 68c96a54fef93b9f735aeb6c9ae07171e934132a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92184
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/notebookbar/SfxNotebookBar.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 7 |
2 files changed, 8 insertions, 1 deletions
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. |