From 23ae9e8b907d224f51b5af24c79e31f5a9c18d25 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Wed, 19 Aug 2020 18:55:27 +0200 Subject: tdf#135721 sw: fix spell check context menu deleting flys Kind of similar to e1629c210ad78310e3d48c0756723134a27b89df but the problem is at a higher level: SwTextShell::Execute() with SID_SPELLCHECK_APPLY_SUGGESTION should not DelLeft() + Insert() but just Replace(). (regression from 28b77c89dfcafae82cf2a6d85731b643ff9290e5) Change-Id: I78487c7841ba22ccc6751240a8e55e08a86fba32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101014 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit ec579354af954867b829e7d08e4d752518c83728) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101072 Reviewed-by: Thorsten Behrens --- sw/source/uibase/lingu/olmenu.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 902974516fd9..40585351333e 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -675,9 +675,8 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) m_pSh->StartUndo(SwUndoId::UI_REPLACE, &aRewriter); m_pSh->StartAction(); - m_pSh->DelLeft(); - m_pSh->Insert( aTmp ); + m_pSh->Replace(aTmp, false); /* #102505# EndAction/EndUndo moved down since insertion of temporary auto correction is now undoable two and -- cgit