summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-05-17 13:12:49 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-05-17 19:02:57 +0200
commite2ff01a08a70a96517287ac9b9e9de6fbfd6a00b (patch)
tree6b7a93d9f64b92d8f44571eb83cc218df30f334e
parent429a960e157f3375e795cdec8f265ace1c5bdc9e (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>
-rw-r--r--sw/source/uibase/uiview/viewling.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 854108274fbe..d7c6fa406a43 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);
}