diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 14:24:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-08-16 17:52:04 +0200 |
commit | 00faf6dd9957890634db94cfc6b8a1108a62a2d2 (patch) | |
tree | b7c6fe9c41663a66720409b6f0d4b76097aa0283 /sw | |
parent | 46b3a2401d371b20bdbfca6a47c09408259d595f (diff) |
tdf#119224 start and end are expected to exist for the scope of this function
Change-Id: I771bce68a2ac923af6a7d54646a2c59ce6f10f7e
Reviewed-on: https://gerrit.libreoffice.org/59176
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 22273e0173e6..14887a9e274f 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2040,13 +2040,15 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) //First obtain the ContentFrames for the start and the end - those are needed //anyway. - SwContentFrame const* pStartFrame = pStartPos->nNode.GetNode(). + SwContentFrame* pStartFrame = pStartPos->nNode.GetNode(). GetContentNode()->getLayoutFrame( this, &rCursor.GetSttPos(), pStartPos ); - SwContentFrame const* pEndFrame = pEndPos->nNode.GetNode(). + SwContentFrame* pEndFrame = pEndPos->nNode.GetNode(). GetContentNode()->getLayoutFrame( this, &rCursor.GetEndPos(), pEndPos ); - OSL_ENSURE( (pStartFrame && pEndFrame), "No ContentFrames found." ); + assert(pStartFrame && pEndFrame && "No ContentFrames found."); + //tdf#119224 start and end are expected to exist for the scope of this function + SwFrameDeleteGuard aStartFrameGuard(pStartFrame), aEndFrameGuard(pEndFrame); //Do not subtract the FlyFrames in which selected Frames lie. SwSortedObjs aSortObjs; |