[Libreoffice-commits] core.git: Branch 'libreoffice-6-2-0' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Jan 16 13:52:17 UTC 2019


 sw/source/core/txtnode/txtedt.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ba44615ff9492ac2af06fa97c301b3cd4270a9dd
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jan 15 13:27:00 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 16 14:51:48 2019 +0100

    tdf#122722 sw: fix hidden text crash in SwTextFrame::GetCurWord()
    
    A frame that is fully hidden does not have a SwParaPortion,
    see SwTextFrame::Format() early return.
    
    (regression from 9bda4a67565817f0a26f48c4a4b9723894a385f5)
    
    Change-Id: I6b06824e53cef7218b60f60fced8f863adad8b62
    Reviewed-on: https://gerrit.libreoffice.org/66385
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 0623861685dd1c9daa72a1002f5b018d5c5ef03c)
    Reviewed-on: https://gerrit.libreoffice.org/66402
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index d3e640531f79..41e288a74ec8 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -703,7 +703,7 @@ OUString SwTextFrame::GetCurWord(SwPosition const& rPos) const
     OUString const& rText(GetText());
     assert(sal_Int32(nPos) <= rText.getLength()); // invalid index
 
-    if (rText.isEmpty())
+    if (rText.isEmpty() || IsHiddenNow())
         return OUString();
 
     assert(g_pBreakIt && g_pBreakIt->GetBreakIter().is());


More information about the Libreoffice-commits mailing list