diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-18 12:14:35 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-27 11:42:38 +0100 |
commit | b6d634d74c0231173d6b43357b7cd3cecb76407d (patch) | |
tree | 8724801896bd7a8f63d414ca391a830a378699bf /vcl/jsdialog/executor.cxx | |
parent | 3000f3ee1ac63deff58fa5725a6f6c2f05aec9bb (diff) |
jsdialog: remember dialog instance & handle close
Change-Id: I1b10d12edfa7ffca1061f50b5219baae1ac3caeb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106706
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/jsdialog/executor.cxx')
-rw-r--r-- | vcl/jsdialog/executor.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 13ffc1a33e06..83d19fd7b657 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -242,6 +242,18 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat } } } + else if (sControlType == "dialog") + { + auto pDialog = dynamic_cast<weld::Dialog*>(pWidget); + if (pDialog) + { + if (sAction == "close") + { + pDialog->response(RET_CANCEL); + return true; + } + } + } } return false; |