summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-02 19:58:08 -0400
committerHenry Castro <hcastro@collabora.com>2021-04-07 23:02:38 +0200
commit55ad47b89282ec7c9cd1d3506cad3df0681d61a6 (patch)
tree1881a83be352594b9b8e197544853307f7f12d48
parentbb91e70bfb25d678560184ddcc294ff9fbb377af (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 824aaa0c81d8..1258ee54d432 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -46,6 +46,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>
@@ -1319,10 +1320,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: */