summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-18 12:28:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-19 10:51:12 +0100
commit52a3f07daf2d73f01e7ffd6dfa3d85ad22a8ed6b (patch)
treec4b345ce19a3a7c9ec21f07f2838eedbd6c63d34 /sc
parentb4008306febc147e9f8a3c91102304ec40671a07 (diff)
Related: tdf#125917 remove active editing when we want to replace contents
this addresses comment #6 so that the chosen value is entered in the cell Change-Id: I3b45301e00b2f79038e88c926f15babd49dcc2bf Reviewed-on: https://gerrit.libreoffice.org/83085 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5ff358d7fc6b..45f5181ef243 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1237,6 +1237,11 @@ void ScGridWindow::FilterSelect( sal_uLong nSel )
void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const OUString& rStr )
{
+ ScModule* pScMod = SC_MOD();
+ ScInputHandler* pViewHdl = pScMod->GetInputHdl(pViewData->GetViewShell());
+ if (pViewHdl && pViewData->HasEditView(pViewData->GetActivePart()))
+ pViewHdl->CancelHandler();
+
SCTAB nTab = pViewData->GetTabNo();
ScViewFunc* pView = pViewData->GetView();
pView->EnterData( nCol, nRow, nTab, rStr );