Blame SOURCES/0008-Resolves-tdf-137215-restore-original-modality-before.patch

502fc9
From fa0371ce0456bfe355c36df0741ff23daeccb3a3 Mon Sep 17 00:00:00 2001
502fc9
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
502fc9
Date: Tue, 3 Nov 2020 14:04:37 +0000
502fc9
Subject: [PATCH 8/8] Resolves: tdf#137215 restore original modality before
502fc9
 dialog loop ends
502fc9
502fc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105214
502fc9
Tested-by: Jenkins
502fc9
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
502fc9
(cherry picked from commit 022c11602d2101b49724b5cf104cc6c70b5a5e4b)
502fc9
502fc9
Change-Id: I83467e28534b781c51b8d75a023e41f3c6a03903
502fc9
---
502fc9
 sc/source/ui/dbgui/validate.cxx | 8 ++++++++
502fc9
 sc/source/ui/inc/validate.hxx   | 2 ++
502fc9
 2 files changed, 10 insertions(+)
502fc9
502fc9
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
502fc9
index 41bc913db911..73e04cc44706 100644
502fc9
--- a/sc/source/ui/dbgui/validate.cxx
502fc9
+++ b/sc/source/ui/dbgui/validate.cxx
502fc9
@@ -95,6 +95,14 @@ ScValidationDlg::ScValidationDlg(weld::Window* pParent, const SfxItemSet* pArgSe
502fc9
     AddTabPage("erroralert", ScTPValidationError::Create, nullptr);
502fc9
 }
502fc9
 
502fc9
+void ScValidationDlg::EndDialog()
502fc9
+{
502fc9
+    // tdf#137215 ensure original modalality of true is restored before dialog loop ends
502fc9
+    if (m_bOwnRefHdlr)
502fc9
+        RemoveRefDlg(true);
502fc9
+    ScValidationDlgBase::EndDialog();
502fc9
+}
502fc9
+
502fc9
 ScValidationDlg::~ScValidationDlg()
502fc9
 {
502fc9
     if (m_bOwnRefHdlr)
502fc9
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
502fc9
index 2c562717f921..cb88b9e8b40e 100644
502fc9
--- a/sc/source/ui/inc/validate.hxx
502fc9
+++ b/sc/source/ui/inc/validate.hxx
502fc9
@@ -176,6 +176,8 @@ public:
502fc9
 
502fc9
     void            SetModal(bool bModal) { m_xDialog->set_modal(bModal); }
502fc9
 
502fc9
+    virtual void EndDialog() override;
502fc9
+
502fc9
     virtual void            SetReference( const ScRange& rRef, ScDocument* pDoc ) override
502fc9
     {
502fc9
         if ( m_pHandler && m_pSetReferenceHdl )
502fc9
-- 
502fc9
2.28.0
502fc9