sfx2/source/appl/app.cxx |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

New commits:
commit 5b81748d9ef6c57b45bfbd7e4c5790491a97c294
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Tue Mar 2 19:35:01 2021 -0400
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Mon Mar 8 16:50:55 2021 +0100

    lok: show error message dialog for VBA macros
    
    It creates and exclusive message dialog to show
    the VBA errors to client side.
    
    Otherwise the IDE window to show the source code
    and the error message is not supported yet.
    
    Change-Id: Ie74f911b109cb13aebd39de2cb8e899d779c1cf1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111854
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 14885d95710d..d2e437b758b6 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -433,7 +433,28 @@ IMPL_STATIC_LINK( SfxApplication, 
GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBas
     return false;
 #else
 
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        OUString aError;
+        std::unique_ptr<ErrorInfo> pErrorInfo = 
ErrorInfo::GetErrorInfo(StarBASIC::GetErrorCode());
+        if (ErrorStringFactory::CreateString(pErrorInfo.get(), aError))
+        {
+            const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+            std::shared_ptr<weld::MessageDialog> xBox(
+                Application::CreateMessageDialog(
+                    pViewFrame->GetWindow().GetFrameWeld(),
+                    VclMessageType::Error,
+                    VclButtonsType::Ok,
+                    aError,
+                    true));
+
+            xBox->runAsync(xBox, [](sal_Int32 /*nResult*/) {});
+        }
+        return true;
+    }
+
 #ifndef DISABLE_DYNLOADING
+
     // load basctl module
     osl::Module aMod;
     aMod.loadRelative(&thisModule, SVLIBRARY("basctl"));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to