diff options
Diffstat (limited to 'svl/source/items/style.cxx')
-rw-r--r-- | svl/source/items/style.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 8af4a67ea4f3..adb7efa7b260 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,9 +29,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ #include <com/sun/star/lang/XComponent.hpp> -#endif #define _SVSTDARR_STRINGS #define _SVSTDARR_STRINGSSORTDTOR @@ -280,7 +279,7 @@ sal_Bool SfxStyleSheetBase::SetParent( const XubString& rName ) SfxStyleSheetBase* pIter = rPool.Find(rName, nFamily); if( rName.Len() && !pIter ) { - DBG_ERROR( "StyleSheet-Parent nicht gefunden" ); + OSL_FAIL( "StyleSheet-Parent nicht gefunden" ); return sal_False; } // rekursive Verknuepfungen verhindern @@ -310,7 +309,7 @@ sal_Bool SfxStyleSheetBase::SetFollow( const XubString& rName ) { if( !rPool.Find( rName, nFamily ) ) { - DBG_ERROR( "StyleSheet-Follow nicht gefunden" ); + OSL_FAIL( "StyleSheet-Follow nicht gefunden" ); return sal_False; } aFollow = rName; @@ -485,7 +484,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx) ++z; } } - DBG_ERROR("falscher Index"); + OSL_FAIL("falscher Index"); return 0; } @@ -642,7 +641,7 @@ sal_Bool SfxStyleSheetBasePool::SetParent(SfxStyleFamily eFam, const XubString& 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 @@ -699,11 +698,11 @@ SfxStyleSheetBase* SfxStyleSheetBasePool::Create( const SfxStyleSheetBase& r ) SfxStyleSheetBase& SfxStyleSheetBasePool::Make( const XubString& rName, SfxStyleFamily eFam, sal_uInt16 mask, sal_uInt16 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,16 +826,18 @@ void SfxStyleSheetBasePool::Remove( SfxStyleSheetBase* p ) void SfxStyleSheetBasePool::Insert( SfxStyleSheetBase* p ) { - DBG_ASSERT( p, "svl::SfxStyleSheetBasePool::Insert(), no stylesheet?" ); +#if OSL_DEBUG_LEVEL > 0 + 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 ) ); Broadcast( SfxStyleSheetHint( SFX_STYLESHEET_CREATED, *p ) ); } @@ -1395,3 +1396,5 @@ const ::com::sun::star::uno::Sequence< ::sal_Int8 >& SfxUnoStyleSheet::getIdenti } // -------------------------------------------------------------------- + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |