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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 31 11:44:37 UTC 2020


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

New commits:
commit 82f591a2ec06c680daf41628fe4c352b6a55d545
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 31 11:03:35 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 31 13:43:53 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/+/101703
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 8fcda5a25f0f..2a5fec98d85b 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 )
     SfxLokHelper::notifyDocumentSizeChanged(aViewData.GetViewShell(), sSize, pModel, false);
 }
 
-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();
@@ -478,10 +483,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