diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-04-15 18:18:27 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-04-16 14:34:10 +0200 |
commit | 2ea6f385d36966de8e30b9a537ac2875075ca9eb (patch) | |
tree | 44574a4defb5ae975c53c1732ef14c0ed899faf4 /sw | |
parent | 8072a926da2a02dfaf3fa848a2976634641a594f (diff) |
tdf#124722 sw_redlinehide: don't set negative SwTextFrame offsets
nLen may be larger than the master SwTextFrame, but its follow can't
have negative offset.
(regression from 0acde7514e666fc04805fd36503bd174162336ca)
Change-Id: I6177c748480cdf61e8f15a7032ba52d3ae2ea52c
Reviewed-on: https://gerrit.libreoffice.org/70816
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 66beb06d3928..90541798c63f 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1856,7 +1856,7 @@ static void lcl_ModifyOfst(SwTextFrame & rFrame, assert(nLen != TextFrameIndex(COMPLETE_STRING)); if (rFrame.IsFollow() && nPos < rFrame.GetOfst()) { - rFrame.ManipOfst( op(rFrame.GetOfst(), nLen) ); + rFrame.ManipOfst( std::max(TextFrameIndex(0), op(rFrame.GetOfst(), nLen)) ); } } |