diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-05-17 13:12:49 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-17 21:26:47 +0200 |
commit | d2819832dcd092195c2c2dec5450dba6bd86b045 (patch) | |
tree | a1b3b837294eaa42f1f045e7a106a256ad032ae7 | |
parent | 611f1e5e6637610295d449c286d3d6981dd735aa (diff) |
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 <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit e2ff01a08a70a96517287ac9b9e9de6fbfd6a00b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134445
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sw/source/uibase/uiview/viewling.cxx | 10 |
1 files 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); } |