From f9b62506b22c3eb885ffd5a4ec8025c33df7b2d4 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 12 Mar 2014 17:28:10 +0100 Subject: fdo#75110 SwEditShell::DeleteSel fix start of selection when bSelAll == true Change-Id: I3e8ce585b29619061b18ab1ab8f0cf6c7d421074 --- sw/source/core/edit/eddel.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sw/source/core') diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 3f5fe7cf7a13..c751a36c6fbc 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -89,9 +89,14 @@ void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo ) } else { + SwPaM aPam(rPam); + if (bSelectAll) + // Selection starts at the first para of the first cell, but we + // want to delete the table node before the first cell as well. + aPam.Start()->nNode = aPam.Start()->nNode.GetNode().FindTableNode()->GetIndex(); // delete everything - GetDoc()->DeleteAndJoin( rPam ); - SaveTblBoxCntnt( rPam.GetPoint() ); + GetDoc()->DeleteAndJoin( aPam ); + SaveTblBoxCntnt( aPam.GetPoint() ); } // Selection is not needed anymore -- cgit v1.2.1