summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-31 11:03:35 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-09-01 13:39:35 +0200
commit9ee0dbd54a60b07ff692a842e49942e56f762f92 (patch)
tree016e136db102bf4aa697365cce4771c46b9b6419 /sc
parentc6ccf624dad2095aff50d2b939fd3b0b7743ca68 (diff)
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@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview3.cxx17
1 files changed, 11 insertions, 6 deletions
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