diff options
Diffstat (limited to 'sw/source/core/draw/dcontact.cxx')
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 591f55cb96..4c150d0e09 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -123,7 +123,7 @@ SwFrmFmt *FindFrmFmt( SdrObject *pObj ) } /* SJ: after prior consultation with OD we decided to remove this Assertion #if OSL_DEBUG_LEVEL > 1 - ASSERT( pRetval, + OSL_ENSURE( pRetval, "<::FindFrmFmt(..)> - no frame format found for given object. Please inform OD." ); #endif */ @@ -176,7 +176,7 @@ SwContact* GetUserCall( const SdrObject* pObj ) SdrObject *pTmp; while ( !pObj->GetUserCall() && 0 != (pTmp = pObj->GetUpGroup()) ) pObj = pTmp; - ASSERT( !pObj->GetUserCall() || pObj->GetUserCall()->ISA(SwContact), + OSL_ENSURE( !pObj->GetUserCall() || pObj->GetUserCall()->ISA(SwContact), "<::GetUserCall(..)> - wrong type of found object user call." ); return static_cast<SwContact*>(pObj->GetUserCall()); } @@ -243,7 +243,7 @@ void SwContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj ) if ( bNotify ) { SwAnchoredObject* pAnchoredObj = GetAnchoredObj( _pDrawObj ); - ASSERT( pAnchoredObj, + OSL_ENSURE( pAnchoredObj, "<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" ); if ( pAnchoredObj ) { @@ -280,7 +280,7 @@ void SwContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj ) if ( bNotify ) { SwAnchoredObject* pAnchoredObj = GetAnchoredObj( _pDrawObj ); - ASSERT( pAnchoredObj, + OSL_ENSURE( pAnchoredObj, "<SwContact::MoveObjToInvisibleLayer(..)> - missing anchored object" ); // Note: as-character anchored objects aren't registered at a page frame and // a notification of its background isn't needed. @@ -306,20 +306,20 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible, { if ( !_pDrawObj ) { - ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing object!" ); + OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing object!" ); return; } if ( !pRegisteredIn ) { - ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing frame format!" ); + OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing frame format!" ); return; } const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess(); if ( !pIDDMA ) { - ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no writer document!" ); + OSL_ENSURE( false, "SwDrawContact::_MoveObjToLayer(..) - no writer document!" ); return; } @@ -424,7 +424,7 @@ sal_uInt32 SwContact::GetMinOrdNum() const aObjs.pop_back(); } - ASSERT( nMinOrdNum != SAL_MAX_UINT32, + OSL_ENSURE( nMinOrdNum != SAL_MAX_UINT32, "<SwContact::GetMinOrdNum()> - no order number found." ); return nMinOrdNum; } @@ -491,11 +491,11 @@ SwFlyDrawContact::~SwFlyDrawContact() // OD 2004-03-29 #i26791# const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj ) const { - ASSERT( _pSdrObj, + OSL_ENSURE( _pSdrObj, "<SwFlyDrawContact::GetAnchoredObj(..)> - no object provided" ); - ASSERT( _pSdrObj->ISA(SwVirtFlyDrawObj), + OSL_ENSURE( _pSdrObj->ISA(SwVirtFlyDrawObj), "<SwFlyDrawContact::GetAnchoredObj(..)> - wrong object type object provided" ); - ASSERT( GetUserCall( _pSdrObj ) == const_cast<SwFlyDrawContact*>(this), + OSL_ENSURE( GetUserCall( _pSdrObj ) == const_cast<SwFlyDrawContact*>(this), "<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" ); const SwAnchoredObject* pRetAnchoredObj = 0L; @@ -510,11 +510,11 @@ const SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( const SdrObject* _pSdr SwAnchoredObject* SwFlyDrawContact::GetAnchoredObj( SdrObject* _pSdrObj ) { - ASSERT( _pSdrObj, + OSL_ENSURE( _pSdrObj, "<SwFlyDrawContact::GetAnchoredObj(..)> - no object provided" ); - ASSERT( _pSdrObj->ISA(SwVirtFlyDrawObj), + OSL_ENSURE( _pSdrObj->ISA(SwVirtFlyDrawObj), "<SwFlyDrawContact::GetAnchoredObj(..)> - wrong object type provided" ); - ASSERT( GetUserCall( _pSdrObj ) == this, + OSL_ENSURE( GetUserCall( _pSdrObj ) == this, "<SwFlyDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" ); SwAnchoredObject* pRetAnchoredObj = 0L; @@ -539,7 +539,7 @@ SdrObject* SwFlyDrawContact::GetMaster() void SwFlyDrawContact::SetMaster( SdrObject* _pNewMaster ) { - ASSERT( _pNewMaster->ISA(SwFlyDrawObj), + OSL_ENSURE( _pNewMaster->ISA(SwFlyDrawObj), "<SwFlyDrawContact::SetMaster(..)> - wrong type of new master object" ); mpMasterObj = static_cast<SwFlyDrawObj *>(_pNewMaster); } @@ -644,7 +644,7 @@ void SwFlyDrawContact::Modify( SfxPoolItem *, SfxPoolItem * ) // Writer fly frame are also made visible. void SwFlyDrawContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj ) { - ASSERT( _pDrawObj->ISA(SwVirtFlyDrawObj), + OSL_ENSURE( _pDrawObj->ISA(SwVirtFlyDrawObj), "<SwFlyDrawContact::MoveObjToVisibleLayer(..)> - wrong SdrObject type -> crash" ); if ( GetFmt()->getIDocumentDrawModelAccess()->IsVisibleLayerId( _pDrawObj->GetLayer() ) ) @@ -683,7 +683,7 @@ void SwFlyDrawContact::MoveObjToVisibleLayer( SdrObject* _pDrawObj ) // Writer fly frame are also made invisible. void SwFlyDrawContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj ) { - ASSERT( _pDrawObj->ISA(SwVirtFlyDrawObj), + OSL_ENSURE( _pDrawObj->ISA(SwVirtFlyDrawObj), "<SwFlyDrawContact::MoveObjToInvisibleLayer(..)> - wrong SdrObject type -> crash" ); if ( !GetFmt()->getIDocumentDrawModelAccess()->IsVisibleLayerId( _pDrawObj->GetLayer() ) ) @@ -828,12 +828,12 @@ const SwAnchoredObject* SwDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj _pSdrObj = GetMaster(); } - ASSERT( _pSdrObj, + OSL_ENSURE( _pSdrObj, "<SwDrawContact::GetAnchoredObj(..)> - no object provided" ); - ASSERT( _pSdrObj->ISA(SwDrawVirtObj) || + OSL_ENSURE( _pSdrObj->ISA(SwDrawVirtObj) || ( !_pSdrObj->ISA(SdrVirtObj) && !_pSdrObj->ISA(SwDrawVirtObj) ), "<SwDrawContact::GetAnchoredObj(..)> - wrong object type object provided" ); - ASSERT( GetUserCall( _pSdrObj ) == const_cast<SwDrawContact*>(this) || + OSL_ENSURE( GetUserCall( _pSdrObj ) == const_cast<SwDrawContact*>(this) || _pSdrObj == GetMaster(), "<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" ); @@ -862,12 +862,12 @@ SwAnchoredObject* SwDrawContact::GetAnchoredObj( SdrObject* _pSdrObj ) _pSdrObj = GetMaster(); } - ASSERT( _pSdrObj, + OSL_ENSURE( _pSdrObj, "<SwDrawContact::GetAnchoredObj(..)> - no object provided" ); - ASSERT( _pSdrObj->ISA(SwDrawVirtObj) || + OSL_ENSURE( _pSdrObj->ISA(SwDrawVirtObj) || ( !_pSdrObj->ISA(SdrVirtObj) && !_pSdrObj->ISA(SwDrawVirtObj) ), "<SwDrawContact::GetAnchoredObj(..)> - wrong object type object provided" ); - ASSERT( GetUserCall( _pSdrObj ) == this || _pSdrObj == GetMaster(), + OSL_ENSURE( GetUserCall( _pSdrObj ) == this || _pSdrObj == GetMaster(), "<SwDrawContact::GetAnchoredObj(..)> - provided object doesn't belongs to this contact" ); SwAnchoredObject* pRetAnchoredObj = 0L; @@ -911,7 +911,7 @@ void SwDrawContact::SetMaster( SdrObject* _pNewMaster ) if ( _pNewMaster ) { #if OSL_DEBUG_LEVEL > 1 - ASSERT( false, "debug notification - master replaced!" ); + OSL_ENSURE( false, "debug notification - master replaced!" ); #endif maAnchoredDrawObj.SetDrawObj( *_pNewMaster ); } @@ -937,8 +937,8 @@ const SwFrm* SwDrawContact::GetAnchorFrm( const SdrObject* _pDrawObj ) const } else { - ASSERT( false, - "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ) + OSL_ENSURE( false, + "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ); } return pAnchorFrm; @@ -955,8 +955,8 @@ SwFrm* SwDrawContact::GetAnchorFrm( SdrObject* _pDrawObj ) } else { - ASSERT( _pDrawObj->ISA(SwDrawVirtObj), - "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ) + OSL_ENSURE( _pDrawObj->ISA(SwDrawVirtObj), + "<SwDrawContact::GetAnchorFrm(..)> - unknown drawing object." ); pAnchorFrm = static_cast<SwDrawVirtObj*>(_pDrawObj)->AnchorFrm(); } @@ -1315,7 +1315,7 @@ class NestedUserCallHdl if ( bTmpAssert ) { - ASSERT( false, + OSL_ENSURE( false, "<SwDrawContact::_Changed(..)> - unknown nested <UserCall> event. This is serious, please inform OD." ); } } @@ -1375,7 +1375,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj, // OD 10.10.2003 #112299# if ( mbDisconnectInProgress ) { - ASSERT( false, + OSL_ENSURE( false, "<SwDrawContact::_Changed(..)> - Insert event during disconnection from layout is invalid." ); } else @@ -1512,7 +1512,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj, break; default: { - ASSERT( false, + OSL_ENSURE( false, "<SwDrawContact::_Changed(..)> - unsupported layout direction" ); } } @@ -1625,7 +1625,7 @@ namespace void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) { // OD 10.10.2003 #112299# - ASSERT( !mbDisconnectInProgress, + OSL_ENSURE( !mbDisconnectInProgress, "<SwDrawContact::Modify(..)> called during disconnection."); USHORT nWhich = pNew ? pNew->Which() : 0; @@ -1661,7 +1661,7 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) const SwFmtAnchor* pOldAnchorFmt = pOld ? lcl_getAnchorFmt( *pOld ) : NULL; if ( !pOldAnchorFmt || ( pOldAnchorFmt->GetAnchorId() != pNewAnchorFmt->GetAnchorId() ) ) { - ASSERT( maAnchoredDrawObj.DrawObj(), "SwDrawContact::Modify: no draw object here?" ); + OSL_ENSURE( maAnchoredDrawObj.DrawObj(), "SwDrawContact::Modify: no draw object here?" ); if ( maAnchoredDrawObj.DrawObj() ) { // --> OD 2009-07-10 #i102752# @@ -1734,7 +1734,7 @@ void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew ) #if OSL_DEBUG_LEVEL > 1 else { - ASSERT( false, + OSL_ENSURE( false, "<SwDrawContact::Modify(..)> - unhandled attribute? - please inform od@openoffice.org" ); } #endif @@ -1934,7 +1934,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) // layout. if ( mbDisconnectInProgress ) { - ASSERT( false, + OSL_ENSURE( false, "<SwDrawContact::ConnectToLayout(..)> called during disconnection."); return; } @@ -1943,7 +1943,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) // object isn't inserted in the drawing page if ( !GetMaster()->IsInserted() ) { - ASSERT( false, "<SwDrawContact::ConnectToLayout(..)> - master drawing object not inserted -> no connect to layout. Please inform od@openoffice.org" ); + OSL_ENSURE( false, "<SwDrawContact::ConnectToLayout(..)> - master drawing object not inserted -> no connect to layout. Please inform od@openoffice.org" ); return; } // <-- @@ -2062,7 +2062,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) if ( FLY_AT_FLY == pAnch->GetAnchorId() && !pFrm->IsFlyFrm() ) { pFrm = pFrm->FindFlyFrm(); - ASSERT( pFrm, + OSL_ENSURE( pFrm, "<SwDrawContact::ConnectToLayout(..)> - missing fly frame -> crash." ); } @@ -2106,7 +2106,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) } break; default: - ASSERT( FALSE, "Unknown Anchor." ) + OSL_ENSURE( FALSE, "Unknown Anchor." ); break; } if ( GetAnchorFrm() ) @@ -2153,7 +2153,7 @@ void SwDrawContact::ChkPage() // OD 10.10.2003 #112299# if ( mbDisconnectInProgress ) { - ASSERT( false, + OSL_ENSURE( false, "<SwDrawContact::ChkPage()> called during disconnection." ); return; } @@ -2336,7 +2336,7 @@ namespace sdr drawinglayer::primitive2d::Primitive2DSequence VOCOfDrawVirtObj::createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 // #i101734# static bool bCheckOtherThanTranslate(false); static double fShearX(0.0); @@ -2355,7 +2355,7 @@ namespace sdr if(aLocalOffset.X() || aLocalOffset.Y()) { -#ifdef DBG_UTIL +#if OSL_DEBUG_LEVEL > 1 // #i101734# added debug code to check more complex transformations // than just a translation if(bCheckOtherThanTranslate) |