From c244d8fee1382d0705dc911895bed4078d1e71cb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 11 Nov 2014 14:36:14 +0100 Subject: Yet more nEndInvalid/COMPLETE_STRING fixes ...to fix -fsanitize=signed-integer-overflow Change-Id: I713dabd49b5a6085b2e40510540a20441f0c3541 --- sw/source/core/text/wrong.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/text/wrong.cxx b/sw/source/core/text/wrong.cxx index 680c6d050275..145f1a576920 100644 --- a/sw/source/core/text/wrong.cxx +++ b/sw/source/core/text/wrong.cxx @@ -302,7 +302,8 @@ void SwWrongList::Move( sal_Int32 nPos, sal_Int32 nDiff ) else { ShiftLeft( nBeginInvalid, nPos, nEnd ); - ShiftLeft( nEndInvalid, nPos, nEnd ); + if( nEndInvalid != COMPLETE_STRING ) + ShiftLeft( nEndInvalid, nPos, nEnd ); _Invalidate( nPos ? nPos - 1 : nPos, nPos + 1 ); } } @@ -471,7 +472,8 @@ SwWrongList* SwWrongList::SplitList( sal_Int32 nSplitPos ) else { ShiftLeft( nBeginInvalid, 0, nSplitPos ); - ShiftLeft( nEndInvalid, 0, nSplitPos ); + if( nEndInvalid != COMPLETE_STRING ) + ShiftLeft( nEndInvalid, 0, nSplitPos ); _Invalidate( 0, 1 ); } for (nLst = 0; nLst < Count(); ++nLst ) -- cgit