summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx7
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.