From 787930f5400538766f5bf2fdcffeed2cf51b2a2c Mon Sep 17 00:00:00 2001 From: Szymon Kłos <szymon.klos@collabora.com> Date: Tue, 16 Jun 2020 08:38:04 +0200 Subject: jsdialog: click action for drawing area MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2434bec675559a97e5d251c6d6a958464b6db034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96853 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> --- desktop/source/lib/init.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0c171784d40f..2d043e276a7c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3664,6 +3664,19 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin bContinueWithLOKWindow = true; } } + else if (sControlType == "drawingarea") + { + auto pArea = dynamic_cast<weld::DrawingArea*>(pWidget); + if (pArea) + { + if (sAction == "click") + { + pArea->click(Point(10, 10)); + } + else + bContinueWithLOKWindow = true; + } + } else if (sControlType == "spinfield") { auto pSpinField = dynamic_cast<weld::SpinButton*>(pWidget); -- cgit