sw/source/uibase/uiview/viewling.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 23a6c041560f583fe62ff2669eecd81d37689f39
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Mar 8 13:54:08 2022 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Sat Mar 12 11:15:54 2022 +0100

    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.st...@allotropia.de>
    (cherry picked from commit d814941b31b4f9cc8b6e9bd4ddc5188015529707)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131197
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/sw/source/uibase/uiview/viewling.cxx 
b/sw/source/uibase/uiview/viewling.cxx
index ba3f2df868bf..ad7e9e697d04 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" );

Reply via email to