Kaydet (Commit) 06238616 authored tarafından Michael Stahl's avatar Michael Stahl

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>
üst c9774735
...@@ -703,7 +703,7 @@ OUString SwTextFrame::GetCurWord(SwPosition const& rPos) const ...@@ -703,7 +703,7 @@ OUString SwTextFrame::GetCurWord(SwPosition const& rPos) const
OUString const& rText(GetText()); OUString const& rText(GetText());
assert(sal_Int32(nPos) <= rText.getLength()); // invalid index assert(sal_Int32(nPos) <= rText.getLength()); // invalid index
if (rText.isEmpty()) if (rText.isEmpty() || IsHiddenNow())
return OUString(); return OUString();
assert(g_pBreakIt && g_pBreakIt->GetBreakIter().is()); 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