summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-02 19:58:08 -0400
committerMichael Meeks <michael.meeks@collabora.com>2021-04-09 17:45:27 +0100
commit91ce0453fab671df3cdf1e202a9baed281b2b9e9 (patch)
treefa7c9b8143e3709ee2b5762a7ffd651bcdaf5fc7
parent8d764aab444d45515eb98514cde2e05669549dcf (diff)
lok: async exception dialog messages for VBA macros
Change-Id: Ia713343541f8102de85f7ac57202780afba3da00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111855 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113686 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--cui/source/dialogs/scriptdlg.cxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 78bb8be5d8f8..d00350de7657 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/script/XInvocation.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
+#include <comphelper/lok.hxx>
#include <comphelper/SetFlagContextHelper.hxx>
#include <comphelper/documentinfo.hxx>
#include <comphelper/processfactory.hxx>
@@ -1318,10 +1319,17 @@ IMPL_STATIC_LINK( SvxScriptErrorDialog, ShowDialog, void*, p, void )
if ( message.isEmpty() )
message = CuiResId( RID_SVXSTR_ERROR_TITLE );
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(xData->pParent,
- VclMessageType::Warning, VclButtonsType::Ok, message));
+ std::shared_ptr<weld::MessageDialog> xBox;
+ xBox.reset(Application::CreateMessageDialog(
+ xData->pParent,
+ VclMessageType::Warning,
+ VclButtonsType::Ok,
+ message,
+ comphelper::LibreOfficeKit::isActive()));
+
xBox->set_title(CuiResId(RID_SVXSTR_ERROR_TITLE));
- xBox->run();
+
+ xBox->runAsync(xBox, [](sal_Int32 /*nResult*/) {});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */