summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-11 14:36:14 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-11 14:36:14 +0100
commitc244d8fee1382d0705dc911895bed4078d1e71cb (patch)
tree8f8a5f23b06b90b72b4b9345bba23b1469e99f82
parent620aef1070b03cce0a88eb45e2f9cdcbc6d5525e (diff)
Yet more nEndInvalid/COMPLETE_STRING fixes
...to fix -fsanitize=signed-integer-overflow Change-Id: I713dabd49b5a6085b2e40510540a20441f0c3541
-rw-r--r--sw/source/core/text/wrong.cxx6
1 files changed, 4 insertions, 2 deletions
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 )