sd/source/ui/func/futext.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit d37154decd50e8116de8f596fc22fe98f01a3045 Author: Chris <[email protected]> AuthorDate: Sat Mar 7 20:33:35 2026 -0600 Commit: Samuel Mehrbrodt <[email protected]> CommitDate: Mon Mar 9 09:04:25 2026 +0100 tdf#98856: sd: preserve empty text frame when dragging it When a text box is drawn and immediately dragged without typing, FuText::MouseButtonDown called SdrEndTextEdit() without bDontDeleteReally=true in the drag branch, causing the empty new frame to be silently deleted before BegDragObj could move it. Pass bDontDeleteReally=true so the frame survives for the subsequent drag. Change-Id: Ifdaed0b4111973d57461927b52302773dde1470c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201201 Reviewed-by: Samuel Mehrbrodt <[email protected]> Tested-by: Jenkins diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 420cb7c0bfbb..f35d81b2daf8 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -403,7 +403,10 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) if( mpView->IsTextEdit() ) { - mpView->SdrEndTextEdit(); + // Pass bDontDeleteReally=true so that a newly-created, + // still-empty text frame is preserved for the drag that + // follows immediately below (BegDragObj). + mpView->SdrEndTextEdit(/*bDontDeleteReally=*/true); bJustEndedEdit = true; if(aVEvt.mpHdl)
