diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-29 15:56:18 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-12-01 08:43:01 +0100 |
commit | 690b8f193f145353833660101f3cf07643316848 (patch) | |
tree | 9bc2ca1e917d769f170745a2d6802a29d81d371e | |
parent | 17fb4196146f168c4e08b895bfb079533cb71574 (diff) |
sw_redlinehide_4a: fix infinite loop in SwAttrIter::Seek()
It's actually possible for Seek to be invoked with a position that is
neither 0 nor >= the current position:
lcl_CalcOptRepaint(), called from SwTextFormatter::FormatLine(), will
move backwards via some funny heuristic and call GetCharRect(), which
then seeks.
Change-Id: If061a768b9a0155d9a95b190c44e7048312f4ba3
-rw-r--r-- | sw/source/core/text/itratr.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 458212f8fd17..6809322c1fe1 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -350,7 +350,8 @@ bool SwAttrIter::Seek(TextFrameIndex const nNewPos) // sw_redlinehide: Seek(0) must move before the first character, which // has a special case where the first node starts with delete redline. - if ((!nNewPos && (!m_pMergedPara || newPos.first != m_pTextNode)) + if ((!nNewPos && !m_pMergedPara) + || newPos.first != m_pTextNode || newPos.second < m_nPosition) { if (m_pMergedPara) |