summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2018-02-21 19:58:11 +0100
committerJan Holesovsky <kendy@collabora.com>2018-02-26 12:37:21 +0100
commitb8d5061f54408960177992d0f4be312b7d123167 (patch)
tree94418372d51a2089e7d3d270d08d38f253cd56f2 /sc/source
parentd0faecb02f47cb2165c0e20e3f63e2c2f1af7f19 (diff)
sc lok: Make the Validation "Invalid value." message box working.
Change-Id: Ic0131fa6fc397ae440efed834266b8396aa9e619 Reviewed-on: https://gerrit.libreoffice.org/50160 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/app/inputhdl.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index dcbfba02d73b..bff453de38cd 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2664,8 +2664,12 @@ void ScInputHandler::EnterHandler( ScEnterMode nBlockMode )
if ( pActiveViewSh ) // If it came from MouseButtonDown
pActiveViewSh->StopMarking(); // (the InfoBox consumes the MouseButtonUp)
- //FIXME: We still run into problems if the input is triggered by activating another View
- vcl::Window* pParent = Application::GetDefDialogParent();
+ vcl::Window* pParent = nullptr;
+ if (pActiveViewSh)
+ pParent = &pActiveViewSh->GetViewFrame()->GetWindow();
+ else
+ pParent = Application::GetDefDialogParent();
+
if ( pData->DoError( pParent, aString, aCursorPos ) )
bForget = true; // Do not take over input
}