diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-10-07 22:50:30 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-10-08 00:02:48 +0200 |
commit | 06f91e5c6d4528de00a188f0f8ba4b5678b94ad3 (patch) | |
tree | 38c26fd98428bf0d9222b74d5c1fe85fdce9517a /svl | |
parent | a97d2c7a4248dc8bd6b3b3c28d07cf4a573ba074 (diff) |
svl: convert DBG_ASSERTs to assert
Change-Id: Ied13d6588e1c6677898a8151fa881804c3c58ff1
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/svdde/ddecli.cxx | 7 | ||||
-rw-r--r-- | svl/source/svdde/ddesvr.cxx | 23 |
2 files changed, 14 insertions, 16 deletions
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx index d81d57c65259..7d290e9c1df1 100644 --- a/svl/source/svdde/ddecli.cxx +++ b/svl/source/svdde/ddecli.cxx @@ -25,7 +25,6 @@ #include <svl/svdde.hxx> #include <osl/thread.h> -#include <tools/debug.hxx> #include <comphelper/solarmutex.hxx> #include <osl/mutex.hxx> @@ -68,7 +67,7 @@ HDDEDATA CALLBACK DdeInternal::CliCallback( WORD nCode, WORD nCbType, DdeConnection* self = 0; DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); for ( size_t i = 0; i < rAll.size(); ++i) { @@ -189,7 +188,7 @@ DdeConnection::~DdeConnection() delete pTopic; DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); std::vector<DdeConnection*>::iterator it(std::find(pInst->aConnections.begin(), pInst->aConnections.end(), @@ -239,7 +238,7 @@ const OUString DdeConnection::GetTopicName() const std::vector<DdeConnection*>& DdeConnection::GetConnections() { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); return pInst->aConnections; } diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 213990e0a554..4205a058a682 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -24,7 +24,6 @@ #include <comphelper/string.hxx> #include <rtl/ustring.hxx> #include <svl/svdde.hxx> -#include <tools/debug.hxx> #include <osl/thread.h> #include <o3tl/sorted_vector.hxx> @@ -72,7 +71,7 @@ HDDEDATA CALLBACK DdeInternal::SvrCallback( Conversation* pC; DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); switch( nCode ) { @@ -378,7 +377,7 @@ DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic ) std::vector<DdeTopic*> &rTopics = rService.aTopics; bool bContinue = false; DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); do { // middle check loop @@ -408,7 +407,7 @@ DdeItem* DdeInternal::FindItem( DdeTopic& rTopic, HSZ hItem ) std::vector<DdeItem*>::iterator iter; std::vector<DdeItem*> &rItems = rTopic.aItems; DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); bool bContinue = false; do @@ -481,7 +480,7 @@ DdeService::DdeService( const OUString& rService ) DdeService::~DdeService() { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); if ( pInst->pServicesSvr ) pInst->pServicesSvr->erase(std::remove(pInst->pServicesSvr->begin(), pInst->pServicesSvr->end(), this), pInst->pServicesSvr->end()); @@ -512,7 +511,7 @@ const OUString DdeService::GetName() const DdeServices& DdeService::GetServices() { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); return *(pInst->pServicesSvr); } @@ -586,7 +585,7 @@ void DdeService::RemoveFormat(SotClipboardFormatId nFmt) DdeTopic::DdeTopic( const OUString& rName ) { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); pName = new DdeString( pInst->hDdeInstSvr, rName ); } @@ -658,7 +657,7 @@ void DdeTopic::NotifyClient( const OUString& rItem ) { std::vector<DdeItem*>::iterator iter; DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); for ( iter = aItems.begin(); iter != aItems.end(); ++iter) { if ( (*iter)->GetName().equals(rItem) && (*iter)->pImpData) @@ -701,7 +700,7 @@ bool DdeTopic::StartAdviseLoop() DdeItem::DdeItem( const sal_Unicode* p ) { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); pName = new DdeString( pInst->hDdeInstSvr, p ); nType = DDEITEM; pMyTopic = 0; @@ -711,7 +710,7 @@ DdeItem::DdeItem( const sal_Unicode* p ) DdeItem::DdeItem( const OUString& r) { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); pName = new DdeString( pInst->hDdeInstSvr, r ); nType = DDEITEM; pMyTopic = 0; @@ -721,7 +720,7 @@ DdeItem::DdeItem( const OUString& r) DdeItem::DdeItem( const DdeItem& r) { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); pName = new DdeString( pInst->hDdeInstSvr, r.pName->toOUString() ); nType = DDEITEM; pMyTopic = 0; @@ -747,7 +746,7 @@ void DdeItem::NotifyClient() if( pMyTopic && pImpData ) { DdeInstData* pInst = ImpGetInstData(); - DBG_ASSERT(pInst,"SVDDE:No instance data"); + assert(pInst); DdePostAdvise( pInst->hDdeInstSvr, pMyTopic->pName->getHSZ(), pName->getHSZ() ); } } |