[Libreoffice-commits] core.git: sfx2/source
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 7 20:19:15 UTC 2021
sfx2/source/appl/app.cxx | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
New commits:
commit bb91e70bfb25d678560184ddcc294ff9fbb377af
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Mar 2 19:35:01 2021 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Wed Apr 7 22:18:33 2021 +0200
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 <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113689
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 78358b32fe22..bad0e60b41b4 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -28,6 +28,7 @@
#include <svl/svdde.hxx>
#include <unotools/configmgr.hxx>
#include <com/sun/star/frame/XFrame.hpp>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
@@ -405,6 +406,26 @@ 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;
+ xBox.reset(Application::CreateMessageDialog(
+ pViewFrame->GetWindow().GetFrameWeld(),
+ VclMessageType::Error,
+ VclButtonsType::Ok,
+ aError,
+ true));
+
+ xBox->runAsync(xBox, [](sal_Int32 /*nResult*/) {});
+ }
+ return true;
+ }
+
#ifndef DISABLE_DYNLOADING
basicide_handle_basic_error pSymbol = reinterpret_cast<basicide_handle_basic_error>(sfx2::getBasctlFunction("basicide_handle_basic_error"));
More information about the Libreoffice-commits
mailing list