Kaydet (Commit) d3031765 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Caolán McNamara

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 9bda4a67)

Change-Id: I6b06824e53cef7218b60f60fced8f863adad8b62
Reviewed-on: https://gerrit.libreoffice.org/66385
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 06238616)
Reviewed-on: https://gerrit.libreoffice.org/66399Reviewed-by: 's avatarXisco Faulí <xiscofauli@libreoffice.org>
Tested-by: 's avatarXisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst cf77d8f5
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment