From 2ea6f385d36966de8e30b9a537ac2875075ca9eb Mon Sep 17 00:00:00 2001 From: Michael Stahl <Michael.Stahl@cib.de> Date: Mon, 15 Apr 2019 18:18:27 +0200 Subject: 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> --- sw/source/core/text/txtfrm.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw') 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)) ); } } -- cgit