[Libreoffice-commits] core.git: sfx2/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Apr 5 19:36:15 UTC 2020
sfx2/source/notebookbar/SfxNotebookBar.cxx | 2 +-
sfx2/source/view/viewfrm.cxx | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 68c96a54fef93b9f735aeb6c9ae07171e934132a
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Sat Apr 4 17:36:22 2020 -0800
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Apr 5 21:35:37 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>
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.
More information about the Libreoffice-commits
mailing list