[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 1 11:41:41 UTC 2020
sw/source/uibase/shells/tabsh.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit af002a22eea1a3a94649ab5154db55b266696787
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 31 15:23:58 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Sep 1 13:41:09 2020 +0200
tdf#135636 the selection at dialog-launch time is lost by dialog-apply time
since...
commit c3a085d22742f88e91ff92f319a26d6e8d1d9a98
Date: Tue Jan 23 18:13:01 2018 +0100
lokdialog: Convert the Table -> Properties... to async exec.
so save it at launch and temp apply it during ok handler. This is somewhat
similar to tdf#134439
Change-Id: Ia0869307b1a37e5efa1703e68b946793b0ddc91b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101679
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 0348f461f0e0..04dfbda01131 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -596,9 +596,13 @@ void SwTableShell::Execute(SfxRequest &rReq)
auto pRequest = std::make_shared<SfxRequest>(rReq);
rReq.Ignore(); // the 'old' request is not relevant any more
- pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, &rBindings, &rSh](sal_Int32 nResult){
+ auto xPaM(std::make_shared<SwPaM>(*rSh.GetCursor(), nullptr)); // tdf#135636 make a copy to use at later apply
+ 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();
//to record FN_INSERT_TABLE correctly
@@ -606,6 +610,8 @@ 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);
More information about the Libreoffice-commits
mailing list