[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 1 11:40:08 UTC 2020


 sc/source/ui/view/tabview3.cxx |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 9ee0dbd54a60b07ff692a842e49942e56f762f92
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 31 11:03:35 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Sep 1 13:39:35 2020 +0200

    tdf#136242 disable changing selection while formula wizard is open
    
    similar to tdf#124975
    
    Change-Id: I926580083fdd1e2a4f9b03243edfccc060bea702
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101705
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index cfff46935dad..cc955f408503 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -444,11 +444,16 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
     }
 }
 
-static bool lcl_IsScSimpleRefDlgOpen(SfxViewFrame* pViewFrm)
+static bool lcl_IsRefDlgOpen(SfxViewFrame* pViewFrm)
 {
-    if (pViewFrm->HasChildWindow(WID_SIMPLE_REF))
+    ScModule* pScMod = SC_MOD();
+    if (!pScMod->IsRefDialogOpen())
+       return false;
+
+    auto nDlgId = pScMod->GetCurRefDlgId();
+    if (pViewFrm->HasChildWindow(nDlgId))
     {
-        SfxChildWindow* pChild = pViewFrm->GetChildWindow(WID_SIMPLE_REF);
+        SfxChildWindow* pChild = pViewFrm->GetChildWindow(nDlgId);
         if (pChild)
         {
             auto xDlgController = pChild->GetController();
@@ -476,10 +481,10 @@ void ScTabView::CheckSelectionTransfer()
 
             pScMod->SetSelectionTransfer( pNew.get() );
 
-            // tdf#124975 changing the calc selection can trigger removal of the
-            // selection of an open ScSimpleRefDlg dialog, so don't inform the
+            // tdf#124975/tdf#136242 changing the calc selection can trigger removal of the
+            // selection of an open RefDlg dialog, so don't inform the
             // desktop clipboard of the changed selection if that dialog is open
-            if (!lcl_IsScSimpleRefDlgOpen(aViewData.GetViewShell()->GetViewFrame()))
+            if (!lcl_IsRefDlgOpen(aViewData.GetViewShell()->GetViewFrame()))
                 pNew->CopyToSelection( GetActiveWin() );                    // may delete pOld
 
             // Log the selection change


More information about the Libreoffice-commits mailing list