summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2023-02-15 23:52:53 +0100
committerMarco Cecchetti <marco.cecchetti@collabora.com>2023-02-20 10:24:04 +0000
commitc3c5a58606081e503e211919a7a089e26f1cd850 (patch)
treeebc4b35c5a9da3af8b24b979149e5d2d737366b1 /vcl/source/window
parent99bb89a2629d3bd68c64e1ecf460ccb37741f6ae (diff)
lok: macro: VBA message dialogs was causing assertion failure
Get VBA MsgBox and VBA Runtime Script Error dialogs to be displayed correctly without causing an assertion failure. Provided a solution that allows VBA MsgBox to be executed in a not-async way so that the VBA script is paused until the message box is closed. Change-Id: Ica7d0d343a0ea4b6a163c1c43572f18a5779a0ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147243 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/builder.cxx5
-rw-r--r--vcl/source/window/dialog.cxx3
2 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 024bb45663e2..191c78059071 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -208,10 +208,11 @@ std::unique_ptr<weld::Builder> Application::CreateInterimBuilder(vcl::Window* pP
}
weld::MessageDialog* Application::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType,
- VclButtonsType eButtonType, const OUString& rPrimaryMessage)
+ VclButtonsType eButtonType, const OUString& rPrimaryMessage,
+ const ILibreOfficeKitNotifier* pNotifier)
{
if (comphelper::LibreOfficeKit::isActive())
- return JSInstanceBuilder::CreateMessageDialog(pParent, eMessageType, eButtonType, rPrimaryMessage);
+ return JSInstanceBuilder::CreateMessageDialog(pParent, eMessageType, eButtonType, rPrimaryMessage, pNotifier);
else
return ImplGetSVData()->mpDefInst->CreateMessageDialog(pParent, eMessageType, eButtonType, rPrimaryMessage);
}
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 0579b61a76ad..ce10e363e0aa 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1124,7 +1124,8 @@ void Dialog::EndDialog( tools::Long nResult )
{
if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
{
- pNotifier->notifyWindow(GetLOKWindowId(), "close");
+ if (mpDialogImpl->m_bLOKTunneling)
+ pNotifier->notifyWindow(GetLOKWindowId(), "close");
ReleaseLOKNotifier();
}
}