diff options
author | Jim Raykowski <raykowj@gmail.com> | 2020-04-04 17:36:22 -0800 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-05 21:35:37 +0200 |
commit | 68c96a54fef93b9f735aeb6c9ae07171e934132a (patch) | |
tree | 8e77d81919d42f8368925db4f376f171508096d3 | |
parent | 1e668a4c81f35b646d05b8d168dd5b2785dec6f9 (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>
-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 36c6b14826f4..a784ffb5e100 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -329,7 +329,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 8616da00b358..6267aee23ed1 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -125,6 +125,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 @@ -844,6 +845,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) @@ -1409,6 +1413,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. |