From d2819832dcd092195c2c2dec5450dba6bd86b045 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 17 May 2022 13:12:49 +0200 Subject: tdf#148869 sw_redlinehide: fix SwView::ExecSpellPopup() How could i forget that MovePara(GoCurrPara, fnParaStart) will move to a previous paragraph when it's already at the start of the current one, it's so intuitive. (regression from commit d814941b31b4f9cc8b6e9bd4ddc5188015529707) Change-Id: Ief9bcd42b7ea78feef50ac42bc93580c29c080b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134468 Tested-by: Michael Stahl Reviewed-by: Michael Stahl (cherry picked from commit e2ff01a08a70a96517287ac9b9e9de6fbfd6a00b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134445 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- sw/source/uibase/uiview/viewling.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index ad7e9e697d04..461f7c8afa58 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -694,9 +694,15 @@ bool SwView::ExecSpellPopup(const Point& rPt) if (pNode) { pCursorShell->Push(); - pCursorShell->MovePara(GoCurrPara, fnParaStart); + if (!pCursorShell->IsSttPara()) + { + pCursorShell->MovePara(GoCurrPara, fnParaStart); + } pCursorShell->SetMark(); - pCursorShell->MovePara(GoCurrPara, fnParaEnd); + if (!pCursorShell->IsEndPara()) + { + pCursorShell->MovePara(GoCurrPara, fnParaEnd); + } aParaText = pCursorShell->GetSelText(); pCursorShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } -- cgit v1.2.3