summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-06-15 13:13:05 +0200
committerAndras Timar <andras.timar@collabora.com>2023-06-26 09:27:05 +0200
commit03c28615c1bb1c899e72d6363f67f9e85e52a356 (patch)
treeb6926a0bc7e49d3fb44f647af4036b9aa65ae33c /sw
parent280136fb683f4f37474b3c4fdfab6d452ddae3d4 (diff)
tdf#155685 sw: ExtendedSelectAll with tables, group the Undo objects
Change-Id: I2fba70968c97cd9704212cd799b333d2d158a042 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153115 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 5ab4fb27f4232fe0f36cfc079acb065d1712a355) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153131 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/eddel.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index b7997dbafa86..6cbce339615c 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -97,6 +97,12 @@ void SwEditShell::DeleteSel(SwPaM& rPam, bool const isArtificialSelection, bool
SwPaM * pPam = &rPam;
if (oSelectAll)
{
+ if (!oSelectAll->second.empty())
+ {
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UndoArg1, SwResId(STR_MULTISEL));
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::DELETE, &aRewriter);
+ }
// tdf#155685 tables at the end must be deleted separately
for (SwTableNode *const pTable : oSelectAll->second)
{
@@ -113,6 +119,10 @@ void SwEditShell::DeleteSel(SwPaM& rPam, bool const isArtificialSelection, bool
GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPam,
isArtificialSelection ? SwDeleteFlags::ArtificialSelection : SwDeleteFlags::Default);
SaveTableBoxContent( pPam->GetPoint() );
+ if (oSelectAll && !oSelectAll->second.empty())
+ {
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
+ }
}
// Selection is not needed anymore