tdf#135916 just set the target table as selection
don't save and restore the cursor when the format is applied
Change-Id: I320b714193b604cb480a517add4a4a61f5a5128e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103436
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 04dfbda..d2e2380 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -600,7 +600,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, &rBindings, &rSh, xPaM](sal_Int32 nResult){
if (RET_OK == nResult)
{
rSh.Push(); // save current cursor on stack
rSh.SetSelection(*xPaM); // tdf#135636 set the table selected at dialog launch as current selection
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
@@ -610,8 +609,6 @@ void SwTableShell::Execute(SfxRequest &rReq)
pRequest->Done(*pOutSet);
ItemSetToTableParam(*pOutSet, rSh);
rSh.Pop(SwCursorShell::PopMode::DeleteCurrent); // restore cursor from stack
}
rBindings.Update(SID_RULER_BORDERS);