summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-03-08 13:54:08 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-03-09 10:42:53 +0100
commitd814941b31b4f9cc8b6e9bd4ddc5188015529707 (patch)
tree9cad5d94e4e8527c11db6a4c664b6a512f953b60 /sw
parent53560aa06462f1cf04d69acafed20da971bc5c27 (diff)
sw_redlinehide: get text from shell, not node in ExecSpellPopup()
Change-Id: I0160c4927a2f5e71f5025c2162a103f67ed03723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131209 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/uiview/viewling.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 93b2d5577da9..854108274fbe 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -692,7 +692,14 @@ bool SwView::ExecSpellPopup(const Point& rPt)
// get paragraph text
OUString aParaText;
if (pNode)
- aParaText = pNode->GetText(); // this may include hidden text but that should be Ok
+ {
+ pCursorShell->Push();
+ pCursorShell->MovePara(GoCurrPara, fnParaStart);
+ pCursorShell->SetMark();
+ pCursorShell->MovePara(GoCurrPara, fnParaEnd);
+ aParaText = pCursorShell->GetSelText();
+ pCursorShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
else
{
OSL_FAIL("text node expected but not found" );