From f71efcdc4c8525bdf93becfc66b57bccd47f88c4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 12 Mar 2021 12:57:57 +0000 Subject: tdf#140977 drop possible table-cursor before setting the new one Change-Id: I3d278af77886af3413b4a15464c8a52caa9a8e02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112310 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos --- sw/source/uibase/shells/tabsh.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 34d98f61edd9..036274546d04 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -600,6 +600,9 @@ void SwTableShell::Execute(SfxRequest &rReq) pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, &rBindings, &rSh, vCursors](sal_Int32 nResult){ if (RET_OK == nResult) { + if (rSh.IsTableMode()) // tdf#140977 drop possible table-cursor before setting the new one + rSh.TableCursorToCursor(); + rSh.SetSelection(*vCursors->front()); // tdf#135636 set the table selected at dialog launch as current selection const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); -- cgit