[Libreoffice-commits] core.git: cui/source

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 7 21:03:22 UTC 2021


 cui/source/dialogs/scriptdlg.cxx |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 55ad47b89282ec7c9cd1d3506cad3df0681d61a6
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Mar 2 19:58:08 2021 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Wed Apr 7 23:02:38 2021 +0200

    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 at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113686
    Tested-by: Jenkins
    Reviewed-by: Henry Castro <hcastro at collabora.com>

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: */


More information about the Libreoffice-commits mailing list