diff options
Diffstat (limited to 'sw/source/uibase/shells/tabsh.cxx')
-rw-r--r-- | sw/source/uibase/shells/tabsh.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 9c73c9923a2d..3eb0e9b6ed4f 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -597,14 +597,18 @@ void SwTableShell::Execute(SfxRequest &rReq) auto pRequest = std::make_shared<SfxRequest>(rReq); rReq.Ignore(); // the 'old' request is not relevant any more - auto vCursors = CopyPaMRing(*rSh.GetCursor()); // tdf#135636 make a copy to use at later apply + SwPaM* pCursor = rSh.IsTableMode() ? rSh.GetTableCrs() : rSh.GetCursor(); // tdf#142165 use table cursor if in table mode + auto vCursors = CopyPaMRing(*pCursor); // tdf#135636 make a copy to use at later apply 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 + // tdf#135636 set the table selected at dialog launch as current selection + rSh.SetSelection(*vCursors->front()); // UpdateCursor() will be called which in the case + // of a table selection should recreate a + // SwShellTableCursor const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); |