[Libreoffice-commits] core.git: include/vcl sc/source vcl/source

Jan Holesovsky kendy at collabora.com
Mon Feb 26 11:37:42 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 b8d5061f54408960177992d0f4be312b7d123167
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/50160
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 8695cc4fa632..e53a71782f3a 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -62,7 +62,6 @@ private:
     SAL_DLLPRIVATE void    RemoveFromDlgList();
     SAL_DLLPRIVATE void    ImplInitDialogData();
     SAL_DLLPRIVATE void    ImplInitSettings();
-    SAL_DLLPRIVATE inline  void ImplLOKNotifier(vcl::Window* pParent);
     SAL_DLLPRIVATE VclPtr<vcl::Window> AddBorderWindow(vcl::Window* pParent, WinBits nBits);
 
     virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
@@ -77,6 +76,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 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
             }
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 8fbd0475c57d..efe8bfcfe175 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -130,6 +130,7 @@ MessBox::MessBox(vcl::Window* pParent, MessBoxStyle nMessBoxStyle, WinBits nWinB
     mnMessBoxStyle( nMessBoxStyle ),
     maMessText( rMessage )
 {
+    ImplLOKNotifier(pParent);
     ImplInit(pParent, nWinBits | WB_MOVEABLE | WB_HORZ | WB_CENTER);
     ImplInitButtons();
 


More information about the Libreoffice-commits mailing list