summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-10 16:30:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-10 16:30:46 +0000
commit4f405d8c1ff84a0db35c9a771776d170f628df57 (patch)
tree3329f1bd8a1e2f7aafd3869144018a779a81a32e /sw
parent233da237ad4b593c945903c3b32185a540025516 (diff)
OSL_ENSURE -> assert when followed by unconditional dereference
Change-Id: Ic118450e11ca6a4f705670dd71015ff74072fa05
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/pagechg.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index ceb326969e10..66e85f4225c9 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -542,7 +542,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if( rOldCol != rNewCol )
{
SwLayoutFrm *pB = FindBodyCont();
- OSL_ENSURE( pB, "Seite ohne Body." );
+ assert(pB && "Page without Body.");
pB->ChgColumns( rOldCol, rNewCol );
rInvFlags |= 0x20;
}
@@ -948,7 +948,7 @@ void SwPageFrm::PrepareRegisterChg()
*/
void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** ppPrev )
{
- OSL_ENSURE( pStart, "no starting page." );
+ assert(pStart && "no starting page.");
SwViewShell *pSh = pStart->getRootFrm()->GetCurrShell();
SwViewImp *pImp = pSh ? pSh->Imp() : 0;
@@ -1161,7 +1161,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFtn )
if ( !pDesc )
pDesc = pPrevPage->GetPageDesc()->GetFollow();
- OSL_ENSURE( pDesc, "Missing PageDesc" );
+ assert(pDesc && "Missing PageDesc");
if( !(bWishedOdd ? pDesc->GetRightFmt() : pDesc->GetLeftFmt()) )
bWishedOdd = !bWishedOdd;
bool const bWishedFirst = pDesc != pPrevPage->GetPageDesc();
@@ -1865,7 +1865,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
}
else
{
- OSL_ENSURE( pViewOpt, "CheckViewLayout required ViewOptions" );
+ assert(pViewOpt && "CheckViewLayout required ViewOptions");
const sal_uInt16 nColumns = pViewOpt->GetViewLayoutColumns();
const bool bBookMode = pViewOpt->IsViewLayoutBookMode();