diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-05-17 14:48:20 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-05-21 13:31:46 +0200 |
commit | 482231f28aa9c4ef37b55c675044991c6623fe96 (patch) | |
tree | 9ff677d84ad9b8b68898324601b2ac6effb42955 /sw | |
parent | 2820d1367ea99b93ea3e3548613e65dc93ded9d9 (diff) |
tdf#142165 restore a SwShellTableCursor if the orig selection described that
so that we are operating on the same selection that existed when the
dialog was originally launched
we need to avoid the assert of
commit 6db71f70a3b200d4074f6cda8ce445e9861d3296
tdf#140977 drop possible table-cursor before setting the new one
and support the multi-selection of
commit e08b446e46f56e15af58fdd4396afba1a316f9e5
tdf#140257 duplicate entire PaM ring when making copy
and support not scrolling to a different location on changing a table
page break style of
commit 9c61732677d038e32b73fc9fb883aced14c0febf
tdf#135916 just set the target table as selection
and keep making it possible to remove aa page break on a table of
commit 81f91196b98af38e29af451b86c26a893a109abc
tdf#135636 the selection at dialog-launch time is lost by dialog-apply time
all of which is necessitated by
commit c3a085d22742f88e91ff92f319a26d6e8d1d9a98
lokdialog: Convert the Table -> Properties... to async exec.
Change-Id: Ide5f953e63da46a8750e85d623310af0062b048b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115522
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sw')
-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 036274546d04..549e4e14327c 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -596,14 +596,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(); |