From a0b634bf57511f250e0406dc382178a1699804f0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 7 Mar 2016 11:32:57 +0000 Subject: OSL_ENSURE followed by deref -> assert Change-Id: Ib815da2f341096775052d2280d62a210a856fdf8 --- sw/source/core/layout/sectfrm.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sw') diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 8d5555df8adc..781dd96e5436 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -94,7 +94,7 @@ SwSectionFrame::SwSectionFrame( SwSectionFrame &rSect, bool bMaster ) : // frame and its insert in the layout. void SwSectionFrame::Init() { - OSL_ENSURE( GetUpper(), "SwSectionFrame::Init before insertion?!" ); + assert(GetUpper() && "SwSectionFrame::Init before insertion?!"); SWRECTFN( this ) long nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)(); (Frame().*fnRect->fnSetWidth)( nWidth ); @@ -467,7 +467,7 @@ void SwSectionFrame::MergeNext( SwSectionFrame* pNxt ) |*/ bool SwSectionFrame::SplitSect( SwFrame* pFrame, bool bApres ) { - OSL_ENSURE( pFrame, "SplitSect: Why?" ); + assert(pFrame && "SplitSect: Why?"); SwFrame* pOther = bApres ? pFrame->FindNext() : pFrame->FindPrev(); if( !pOther ) return false; @@ -1446,7 +1446,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage ) SwSectionFrame *pSect = FindSctFrame(); bool bWrongPage = false; - OSL_ENSURE( pSect, "GetNextSctLeaf: Missing SectionFrame" ); + assert(pSect && "GetNextSctLeaf: Missing SectionFrame"); // Shortcut for sections with Follows. That's ok, // if no columns or pages (except dummy pages) lie in between. @@ -2555,7 +2555,7 @@ void SwRootFrame::InsertEmptySct( SwSectionFrame* pDel ) void SwRootFrame::_DeleteEmptySct() { - OSL_ENSURE( mpDestroy, "Keine Liste, keine Kekse" ); + assert(mpDestroy && "Keine Liste, keine Kekse"); while( !mpDestroy->empty() ) { SwSectionFrame* pSect = *mpDestroy->begin(); @@ -2587,7 +2587,7 @@ void SwRootFrame::_DeleteEmptySct() void SwRootFrame::_RemoveFromList( SwSectionFrame* pSct ) { - OSL_ENSURE( mpDestroy, "Where's my list?" ); + assert(mpDestroy && "Where's my list?"); mpDestroy->erase( pSct ); } -- cgit