tdf#150589 Set cursor to better position after deleting a drawing

object

Cutting a drawing object involves SwWrtShell::DelRight which uses the
drawing object's frame top-left point to set the cursor after
deleting. Delete and Backspace do not use SwWrtShell::DelRight to
delete a drawing object. This patch makes Delete and Backspace
position the cursor like Cut after drawing object delete.

Change-Id: I6dc07eccc8397393a230368a20b0589e6d57a89a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140036
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 766ca0a..71c66a0 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -374,6 +374,8 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
            {
                bDone = true;

                const Point aPt = pSh->GetObjRect().TopLeft(); // tdf#150589

                if( GetView().IsDrawRotate() )
                {
                    pSh->SetDragMode( SdrDragMode::Move );
@@ -399,8 +401,10 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
                if (pSh->IsSelFrameMode())
                {
                    pSh->LeaveSelFrameMode();
                    // #105852# FME
                    // #105852# FME <- perhaps fixed by tdf#150589
                    static_cast<SwEditShell*>(pSh)->SetCursor(aPt);
                }

            }
            break;