summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-24 14:18:02 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-24 21:30:17 +0200
commit389db2b45c138b8e62499024e31636ba365db676 (patch)
tree925412bbe8c67bf965161f3dcd69af842d7899cc /basctl
parente5f6be4902f1ee0941760630cd0a17d6e1a7b87a (diff)
Resolves: tdf#118572 ensure basic error dialog blocks any other dialog
if a dialog is already running, disable input to it until this error dialog is acknowledged. The other dialog might be running from the script which has the error. Change-Id: I10c437a25bd7c91d37eeb8241bef10709767e499 Reviewed-on: https://gerrit.libreoffice.org/59567 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 9741bdfeaeed..706c602eb124 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -622,7 +622,15 @@ bool ModulWindow::BasicErrorHdl( StarBASIC const * pBasic )
// #i47002#
Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( this );
+ // tdf#118572 make a currently running dialog, regardless of what its modal
+ // to, insensitive to user input until after this error dialog goes away.
+ auto xDialog = Dialog::GetMostRecentExecutingDialog();
+ const bool bToggleEnableInput = xDialog && xDialog->IsInputEnabled();
+ if (bToggleEnableInput)
+ xDialog->EnableInput(false);
ErrorHandler::HandleError(StarBASIC::GetErrorCode(), GetFrameWeld());
+ if (bToggleEnableInput)
+ xDialog->EnableInput(true);
// #i47002#
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );