summaryrefslogtreecommitdiff
path: root/desktop/source/lib
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2019-12-18 13:31:58 +0000
committerAshod Nakashian <ashnakash@gmail.com>2019-12-23 01:59:45 +0100
commit924c28f355d91bbd7615b98f93c7ae055b43fe00 (patch)
treed04539f443127e5e7fe90b016b53fe2ded48315d /desktop/source/lib
parent42f60e67e53c75d8a2eee9586d6ae8245ea984da (diff)
lok: catch and log exceptions during key / mouse event emission.
Change-Id: I2be8219f6b2648f3f0192caeccf8e8b037634dc2 Reviewed-on: https://gerrit.libreoffice.org/85387 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 46fbc12dac86579708695fddeaf4a3a2f8098955) Reviewed-on: https://gerrit.libreoffice.org/85684 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'desktop/source/lib')
-rw-r--r--desktop/source/lib/init.cxx21
1 files changed, 18 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index afd63dd1f118..b80980994c5a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3222,7 +3222,15 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nChar
return;
}
- pDoc->postKeyEvent(nType, nCharCode, nKeyCode);
+ try
+ {
+ pDoc->postKeyEvent(nType, nCharCode, nKeyCode);
+ }
+ catch (const uno::Exception& exception)
+ {
+ SetLastExceptionMsg(exception.Message);
+ SAL_INFO("lok", "Failed to postKeyEvent " << exception.Message);
+ }
}
static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsigned nWindowId, int nType, const char* pText)
@@ -3703,8 +3711,15 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* pThis, int nType, int nX,
SetLastExceptionMsg("Document doesn't support tiled rendering");
return;
}
-
- pDoc->postMouseEvent(nType, nX, nY, nCount, nButtons, nModifier);
+ try
+ {
+ pDoc->postMouseEvent(nType, nX, nY, nCount, nButtons, nModifier);
+ }
+ catch (const uno::Exception& exception)
+ {
+ SetLastExceptionMsg(exception.Message);
+ SAL_INFO("lok", "Failed to postMouseEvent " << exception.Message);
+ }
}
static void doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)