summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-04-19 15:53:21 +0200
committerMichael Stahl <mstahl@redhat.com>2017-04-19 15:55:12 +0200
commite0f9dc97490f69fc2f3cdfb6367ac6893c7b170b (patch)
treea436912be4c520bea35d4a18a9abb7bea3a83436 /sw
parent500ffae7c388a12b1d7fca4917ec872fd629392f (diff)
sw: replace buggy OSL_ENSURE in CalcStartEnd()
Actually one case was missing. Change-Id: I08895f730c48d1d4bef6965ff39595ac7db5b42a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docredln.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 0ccc138ce105..ae4f346a9c9e 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1197,13 +1197,16 @@ void SwRangeRedline::CalcStartEnd( sal_uLong nNdIdx, sal_Int32& rStart, sal_Int3
rStart = 0; // Paragraph is completely enclosed
rEnd = COMPLETE_STRING;
}
- else
+ else if (pREnd->nNode == nNdIdx)
{
- OSL_ENSURE( pREnd->nNode == nNdIdx,
- "SwRedlineItr::Seek: GetRedlinePos Error" );
rStart = 0; // Paragraph is overlapped in the beginning
rEnd = pREnd->nContent.GetIndex();
}
+ else // redline ends before paragraph
+ {
+ rStart = COMPLETE_STRING;
+ rEnd = COMPLETE_STRING;
+ }
}
else if( pRStt->nNode == nNdIdx )
{
@@ -1414,7 +1417,6 @@ void SwRangeRedline::DelCopyOfSection(size_t nMyPos)
// current ones can be affected.
const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable();
size_t n = nMyPos;
- OSL_ENSURE( n != USHRT_MAX, "How strange. We don't exist!" );
for( bool bBreak = false; !bBreak && n > 0; )
{
--n;