sfx2/source/view/viewfrm.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 43dcd82624a26d7c3a4185469bef60f531999190 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Jan 30 11:47:38 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Jan 30 15:20:17 2024 +0100 reuse xCurrentFrame instead of fetching it again and use the exception safe vcl::CommandInfoProvider::GetModuleIdentifier wrapper. might as well skip the TOTD for the database report as we as the form. Change-Id: If91f571d64878a7bab85b97800d3c60c1397dc2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162745 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index ab6e2ebdda0d..e2dad9605d45 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1522,9 +1522,10 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) const auto xContext = comphelper::getProcessComponentContext(); const auto xModuleManager = css::frame::ModuleManager::create(xContext); switch (vcl::EnumContext::GetApplicationEnum( - xModuleManager->identify(xCurrentFrame))) + vcl::CommandInfoProvider::GetModuleIdentifier(xCurrentFrame))) { case vcl::EnumContext::Application::WriterForm: + case vcl::EnumContext::Application::WriterReport: bIsBaseFormOpen = true; break; default: @@ -1533,7 +1534,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) if (!bIsBaseFormOpen) { // tdf#127946 pass in argument for dialog parent - SfxUnoFrameItem aDocFrame(SID_FILLFRAME, GetFrame().GetFrameInterface()); + SfxUnoFrameItem aDocFrame(SID_FILLFRAME, xCurrentFrame); GetDispatcher()->ExecuteList(SID_TIPOFTHEDAY, SfxCallMode::SLOT, {}, { &aDocFrame }); }