sc/source/ui/inc/tabview.hxx | 2 ++ sc/source/ui/view/tabview2.cxx | 9 +++++++++ 2 files changed, 11 insertions(+)
New commits: commit cf10e88a7b0d6fb0f2e2ebe3d7079a405f86b379 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Feb 17 10:47:53 2023 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Mon Feb 20 12:20:55 2023 +0000 lok: setup LOK notifier for invalid range error Change-Id: I63fc6fcdec873a9d0c8d54dd6a6f3783f2c15251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147200 Reviewed-by: Henry Castro <hcas...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 0bdc143d3e62..3bacff297714 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -252,6 +252,8 @@ private: void PaintRangeFinderEntry (const ScRangeFindData* pData, SCTAB nTab); + DECL_STATIC_LINK(ScTabView, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); + protected: void UpdateHeaderWidth( const ScVSplitPos* pWhich = nullptr, const SCROW* pPosY = nullptr ); diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 1c2cbd1389e6..226023b2914e 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -1443,6 +1443,11 @@ void ScTabView::MakeDrawLayer() } } +IMPL_STATIC_LINK_NOARG(ScTabView, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) +{ + return GetpApp(); +} + void ScTabView::ErrorMessage(TranslateId pGlobStrId) { if ( SC_MOD()->IsInExecuteDrop() ) @@ -1468,6 +1473,10 @@ void ScTabView::ErrorMessage(TranslateId pGlobStrId) m_xMessageBox.reset(Application::CreateMessageDialog(pParent, VclMessageType::Info, VclButtonsType::Ok, ScResId(pGlobStrId))); + + if (comphelper::LibreOfficeKit::isActive()) + m_xMessageBox->SetInstallLOKNotifierHdl(LINK(this, ScTabView, InstallLOKNotifierHdl)); + weld::Window* pGrabOnClose = bFocus ? pParent : nullptr; m_xMessageBox->runAsync(m_xMessageBox, [this, pGrabOnClose](sal_Int32 /*nResult*/) { m_xMessageBox.reset();