diff options
Diffstat (limited to 'sw/source/core/layout/flylay.cxx')
-rw-r--r-- | sw/source/core/layout/flylay.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index eac9e4ca4f..1c5f19d2fc 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -264,7 +264,7 @@ void SwFlyFreeFrm::MakeAll() ++nLoopControlRuns; #if OSL_DEBUG_LEVEL > 1 - ASSERT( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" ) + OSL_ENSURE( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" ); #endif if ( nLoopControlRuns < nLoopControlMax ) @@ -275,9 +275,9 @@ void SwFlyFreeFrm::MakeAll() } Unlock(); -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 SWRECTFN( this ) - ASSERT( bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 && + OSL_ENSURE( bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 && (Prt().*fnRect->fnGetHeight)() > 0), "SwFlyFreeFrm::Format(), flipping Fly." ); @@ -522,7 +522,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz ) } // --> OD 2004-10-14 #i26945# - ASSERT( Frm().Height() >= 0, + OSL_ENSURE( Frm().Height() >= 0, "<SwFlyFreeFrm::CheckClip(..)> - fly frame has negative height now." ); // <-- } @@ -587,7 +587,7 @@ void SwFlyLayFrm::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) if( pAnch ) { - ASSERT( pAnch->GetAnchorId() == + OSL_ENSURE( pAnch->GetAnchorId() == GetFmt()->GetAnchor().GetAnchorId(), "8-) Unzulaessiger Wechsel des Ankertyps." ); @@ -670,7 +670,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) } SdrObject* pObj = pNew->GetVirtDrawObj(); - ASSERT( pNew->GetAnchorFrm(), "Fly without Anchor" ); + OSL_ENSURE( pNew->GetAnchorFrm(), "Fly without Anchor" ); const SwFlyFrm* pFly = pNew->GetAnchorFrm()->FindFlyFrm(); if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() ) { @@ -696,12 +696,12 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) #endif pSortedObjs->Insert( *pNew ); #if OSL_DEBUG_LEVEL > 1 - ASSERT( bSucessInserted, "Fly nicht in Sorted eingetragen." ) + OSL_ENSURE( bSucessInserted, "Fly nicht in Sorted eingetragen." ); (void) bSucessInserted; #endif // --> OD 2008-04-22 #i87493# - ASSERT( pNew->GetPageFrm() == 0 || pNew->GetPageFrm() == this, + OSL_ENSURE( pNew->GetPageFrm() == 0 || pNew->GetPageFrm() == this, "<SwPageFrm::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect -> please inform OD." ); // <-- // --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)> @@ -867,7 +867,7 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) #endif pDest->GetSortedObjs()->Insert( *pToMove ); #if OSL_DEBUG_LEVEL > 1 - ASSERT( bSucessInserted, "Fly nicht in Sorted eingetragen." ) + OSL_ENSURE( bSucessInserted, "Fly nicht in Sorted eingetragen." ); (void) bSucessInserted; #endif @@ -930,7 +930,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) { if ( !_rNewObj.ISA(SwAnchoredDrawObject) ) { - ASSERT( false, + OSL_ENSURE( false, "SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexcepted type -> object not appended" ); return; } @@ -940,7 +940,7 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) ((SwRootFrm*)GetUpper())->InvalidateBrowseWidth(); } - ASSERT( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" ); + OSL_ENSURE( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" ); const SwFlyFrm* pFlyFrm = _rNewObj.GetAnchorFrm()->FindFlyFrm(); if ( pFlyFrm && _rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() ) @@ -964,13 +964,13 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) } if ( !pSortedObjs->Insert( _rNewObj ) ) { -#ifdef DBG_UTIL - ASSERT( pSortedObjs->Contains( _rNewObj ), +#if OSL_DEBUG_LEVEL > 1 + OSL_ENSURE( pSortedObjs->Contains( _rNewObj ), "Drawing object not appended into list <pSortedObjs>." ); #endif } // --> OD 2008-04-22 #i87493# - ASSERT( _rNewObj.GetPageFrm() == 0 || _rNewObj.GetPageFrm() == this, + OSL_ENSURE( _rNewObj.GetPageFrm() == 0 || _rNewObj.GetPageFrm() == this, "<SwPageFrm::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect -> please inform OD." ); // <-- _rNewObj.SetPageFrm( this ); @@ -983,7 +983,7 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ) { if ( !_rToRemoveObj.ISA(SwAnchoredDrawObject) ) { - ASSERT( false, + OSL_ENSURE( false, "SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexcepted type -> object not removed" ); return; } @@ -1023,7 +1023,7 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt ) { // --> OD 2005-06-09 #i50432# - consider the case that page is an empty page: // In this case append the fly frame at the next page - ASSERT( !IsEmptyPage() || GetNext(), + OSL_ENSURE( !IsEmptyPage() || GetNext(), "<SwPageFrm::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" ); if ( IsEmptyPage() && GetNext() ) { @@ -1036,7 +1036,7 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt ) if ( pFly ) AppendFly( pFly ); else - { ASSERT( pFmt, ":-( kein Format fuer Fly uebergeben." ); + { OSL_ENSURE( pFmt, ":-( kein Format fuer Fly uebergeben." ); pFly = new SwFlyLayFrm( (SwFlyFrmFmt*)pFmt, this ); AppendFly( pFly ); ::RegistFlys( this, pFly ); @@ -1116,7 +1116,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove ) const SwFrm* pVertPosOrientFrm = pFly->GetVertPosOrientFrm(); if ( !pVertPosOrientFrm ) { - ASSERT( false, + OSL_ENSURE( false, "::CalcClipRect(..) - frame, vertical position is oriented at, is missing ."); pVertPosOrientFrm = pFly->GetAnchorFrm(); } @@ -1337,7 +1337,7 @@ BOOL CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, BOOL bMove ) const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj ); if( !pAnchorFrm ) { - ASSERT( false, "<::CalcClipRect(..)> - missing anchor frame." ); + OSL_ENSURE( false, "<::CalcClipRect(..)> - missing anchor frame." ); ((SwDrawContact*)pC)->ConnectToLayout(); pAnchorFrm = pC->GetAnchorFrm(); } |