sc/source/ui/inc/tabview.hxx   |    2 ++
 sc/source/ui/view/tabview2.cxx |    9 +++++++++
 2 files changed, 11 insertions(+)

New commits:
commit 780e46839357c1940ac93edb3c3e1a417bd1dd44
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: Thu Apr 6 10:58:14 2023 +0200

    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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150043
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index ca3918aae325..3f270770ec89 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -260,6 +260,8 @@ private:
 
     void            SetZoomPercentFromCommand(sal_uInt16 nZoomPercent);
 
+    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 400ea89b6106..6b1cfef156f7 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();

Reply via email to