use OSL-style asserts

This commit is contained in:
David Tardon
2011-01-25 10:12:34 +01:00
parent 1047b3455b
commit 007568c0e8

View File

@@ -641,7 +641,7 @@ BOOL SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& rSty
SfxStyleSheetIterator aIter(this,eFam,SFXSTYLEBIT_ALL);
SfxStyleSheetBase *pStyle =
aIter.Find(rStyle);
DBG_ASSERT(pStyle, "Vorlage nicht gefunden. Writer mit Solar <2541??");
OSL_ENSURE(pStyle, "Vorlage nicht gefunden. Writer mit Solar <2541??");
if(pStyle)
return pStyle->SetParent(rParent);
else
@@ -698,11 +698,11 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create( const SfxStyleSheetBase& r )
SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, USHORT mask, USHORT nPos)
{
DBG_ASSERT( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" );
OSL_ENSURE( eFam != SFX_STYLE_FAMILY_ALL, "svl::SfxStyleSheetBasePool::Make(), FamilyAll is not a allowed Familie" );
SfxStyleSheetIterator aIter(this, eFam, mask);
rtl::Reference< SfxStyleSheetBase > xStyle( aIter.Find( rName ) );
DBG_ASSERT( !xStyle.is(), "svl::SfxStyleSheetBasePool::Make(), StyleSheet already exists" );
OSL_ENSURE( !xStyle.is(), "svl::SfxStyleSheetBasePool::Make(), StyleSheet already exists" );
SfxStyleSheetIterator& rIter = GetIterator_Impl();
if( !xStyle.is() )
@@ -827,15 +827,15 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p )
void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p )
{
#if OSL_DEBUG_LEVEL > 0
DBG_ASSERT( p, "svl::SfxStyleSheetBasePool::Insert(), no stylesheet?" );
OSL_ENSURE( p, "svl::SfxStyleSheetBasePool::Insert(), no stylesheet?" );
SfxStyleSheetIterator aIter(this, p->GetFamily(), p->GetMask());
SfxStyleSheetBase* pOld = aIter.Find( p->GetName() );
DBG_ASSERT( !pOld, "svl::SfxStyleSheetBasePool::Insert(), StyleSheet already inserted" );
OSL_ENSURE( !pOld, "svl::SfxStyleSheetBasePool::Insert(), StyleSheet already inserted" );
if( p->GetParent().Len() )
{
pOld = aIter.Find( p->GetParent() );
DBG_ASSERT( pOld, "svl::SfxStyleSheetBasePool::Insert(), Parent not found!" );
OSL_ENSURE( pOld, "svl::SfxStyleSheetBasePool::Insert(), Parent not found!" );
}
#endif
aStyles.push_back( rtl::Reference< SfxStyleSheetBase >( p ) );