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>
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 36c6b14..a784ffb5 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 8616da0..6267aee 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.