summaryrefslogtreecommitdiff
path: root/sw/source/core/draw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedricbosdo@openoffice.org>2010-11-25 17:08:45 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2010-11-25 17:12:34 +0100
commitc16ba8a04fd4599e439e7e039705e41691c43acb (patch)
tree66a1c67973a674245548e10ff0746d1e473a7703 /sw/source/core/draw
parente9eaf033646695987e218907a565b555b976c5c8 (diff)
Removed DBG_UTIL from sw
* Fixed the different dbglevel builds * This needed to change all the sw local ASSERT to OSL_ENSURE...
Diffstat (limited to 'sw/source/core/draw')
-rw-r--r--sw/source/core/draw/dcontact.cxx82
-rw-r--r--sw/source/core/draw/dobjfac.cxx2
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/core/draw/drawdoc.cxx2
-rw-r--r--sw/source/core/draw/dview.cxx12
5 files changed, 50 insertions, 50 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 08ca727dc5d3..672692550732 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)
diff --git a/sw/source/core/draw/dobjfac.cxx b/sw/source/core/draw/dobjfac.cxx
index 31493841903b..f769ed84cc63 100644
--- a/sw/source/core/draw/dobjfac.cxx
+++ b/sw/source/core/draw/dobjfac.cxx
@@ -48,7 +48,7 @@ IMPL_LINK( SwObjectFactory, MakeObject, SdrObjFactory*, pObjFactory )
if ( pObjFactory->nInventor == SWGInventor )
{
//Kein switch, derzeit gibt es nur einen.
- ASSERT( pObjFactory->nIdentifier == SwFlyDrawObjIdentifier,
+ OSL_ENSURE( pObjFactory->nIdentifier == SwFlyDrawObjIdentifier,
"Falscher Inventor oder identifier." );
pObjFactory->pNewObj = new SwFlyDrawObj();
}
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index cfcd29057c9b..a64046be6b8b 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -85,7 +85,7 @@ SwDPage::~SwDPage()
SdrObject* SwDPage::ReplaceObject( SdrObject* pNewObj, ULONG nObjNum )
{
SdrObject *pOld = GetObj( nObjNum );
- ASSERT( pOld, "Oups, Object not replaced" );
+ OSL_ENSURE( pOld, "Oups, Object not replaced" );
SdrObjUserCall* pContact;
if ( 0 != ( pContact = GetUserCall(pOld) ) &&
RES_DRAWFRMFMT == ((SwContact*)pContact)->GetFmt()->Which())
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 3d5d2df32dcf..08a6e7890742 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -227,7 +227,7 @@ uno::Reference< uno::XInterface > SwDrawDocument::createUnoModel()
}
catch( uno::RuntimeException& )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawDocument::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 88bcc513fa2f..d4c9e3f34a64 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -246,7 +246,7 @@ void SwDrawView::AddCustomHdl()
SwFrmFmt* pFrmFmt( ::FindFrmFmt( pObj ) );
if ( !pFrmFmt )
{
- ASSERT( false, "<SwDrawView::AddCustomHdl()> - missing frame format!" );
+ OSL_ENSURE( false, "<SwDrawView::AddCustomHdl()> - missing frame format!" );
return;
}
const SwFmtAnchor &rAnchor = pFrmFmt->GetAnchor();
@@ -405,7 +405,7 @@ sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj,
sal_uInt32 nMaxChildOrdNum = _rParentObj.GetDrawObj()->GetOrdNum();
const SdrPage* pDrawPage = _rParentObj.GetDrawObj()->GetPage();
- ASSERT( pDrawPage,
+ OSL_ENSURE( pDrawPage,
"<SwDrawView::_GetMaxChildOrdNum(..) - missing drawing page at parent object - crash!" );
sal_uInt32 nObjCount = pDrawPage->GetObjCount();
@@ -444,7 +444,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
std::vector<SwAnchoredObject*> aAnchoredObjs;
{
const SwContact* pContact = ::GetUserCall( _rMovedAnchoredObj.GetDrawObj() );
- ASSERT( pContact,
+ OSL_ENSURE( pContact,
"SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash." );
pContact->GetAnchoredObjs( aAnchoredObjs );
}
@@ -487,7 +487,7 @@ void SwDrawView::_MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj,
SdrObject* pChildObj = (*aObjIter);
{
const SwContact* pContact = ::GetUserCall( pChildObj );
- ASSERT( pContact,
+ OSL_ENSURE( pContact,
"SwDrawView::_MoveRepeatedObjs(..) - missing contact object -> crash." );
pContact->GetAnchoredObjs( aAnchoredObjs );
}
@@ -944,7 +944,7 @@ void SwDrawView::ModelHasChanged()
void SwDrawView::MakeVisible( const Rectangle &rRect, Window & )
{
- ASSERT( rImp.GetShell()->GetWin(), "MakeVisible, unknown Window");
+ OSL_ENSURE( rImp.GetShell()->GetWin(), "MakeVisible, unknown Window");
rImp.GetShell()->MakeVisible( SwRect( rRect ) );
}
@@ -1005,7 +1005,7 @@ void SwDrawView::CheckPossibilities()
SwFrmFmt* pFrmFmt( ::FindFrmFmt( const_cast<SdrObject*>(pObj) ) );
if ( !pFrmFmt )
{
- ASSERT( false,
+ OSL_ENSURE( false,
"<SwDrawView::CheckPossibilities()> - missing frame format" );
bProtect = TRUE;
}