[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - include/vcl sc/source vcl/source
Jan Holesovsky
kendy at collabora.com
Thu Feb 22 10:13:43 UTC 2018
include/vcl/dialog.hxx | 4 +++-
sc/source/ui/app/inputhdl.cxx | 8 ++++++--
vcl/source/window/msgbox.cxx | 1 +
3 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 274c86af3ce7e665aee232e4e9fee76fe22af0bd
Author: Jan Holesovsky <kendy at collabora.com>
Date: Wed Feb 21 19:58:11 2018 +0100
sc lok: Make the Validation "Invalid value." message box working.
Change-Id: Ic0131fa6fc397ae440efed834266b8396aa9e619
Reviewed-on: https://gerrit.libreoffice.org/50122
Reviewed-by: Marco Cecchetti <mrcekets at gmail.com>
Tested-by: Marco Cecchetti <mrcekets at gmail.com>
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index b1bdfcfb1cea..980fcadff31c 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -54,7 +54,6 @@ private:
SAL_DLLPRIVATE void RemoveFromDlgList();
SAL_DLLPRIVATE void ImplInitDialogData();
SAL_DLLPRIVATE void ImplInitSettings();
- SAL_DLLPRIVATE inline void ImplLOKNotifier(vcl::Window* pParent);
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
@@ -67,6 +66,9 @@ protected:
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag = InitFlag::Default );
+ /// Find and set the LOK notifier according to the pParent.
+ void ImplLOKNotifier(vcl::Window* pParent);
+
public:
SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; }
virtual void doDeferredInit(WinBits nBits) override;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 48d7fd0eb58d..0a84c9d60584 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2656,8 +2656,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
}
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index ad1031d7ae60..8248e546457f 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -135,6 +135,7 @@ MessBox::MessBox( vcl::Window* pParent, WinBits nStyle,
mbCheck( false ),
maMessText( rMessage )
{
+ ImplLOKNotifier(pParent);
ImplInit( pParent, nStyle | WB_MOVEABLE | WB_HORZ | WB_CENTER );
ImplInitButtons();
More information about the Libreoffice-commits
mailing list