Move DBG_ASSERT -> OSL_ENSURE

This commit is contained in:
Thomas Arnhold 2011-02-24 18:22:15 +01:00
parent 7b6f8f33c7
commit d51e84aa6d
4 changed files with 13 additions and 13 deletions

View file

@ -245,7 +245,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
{
AllProperties aNewEntry;
aSetPos = m_pImpl->m_aPropertySetCache.insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first;
DBG_ASSERT(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
OSL_ENSURE(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
}
if ( aSetPos == m_pImpl->m_aPropertySetCache.end() )
return;
@ -262,7 +262,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
// insert the new entry
aPropertyPos = rPropInfos.insert( AllProperties::value_type( _rEvent.PropertyName, bTransReadOnly ) ).first;
DBG_ASSERT(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
OSL_ENSURE(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
}
implSetModified();

View file

@ -44,7 +44,7 @@
#include <tools/debug.hxx>
#include "xmlfilter.hxx"
#include "xmlHelper.hxx"
#include <tools/debug.hxx>
#include <osl/diagnose.h>
#define XML_LINE_LEFT 0
#define XML_LINE_RIGHT 1
@ -151,7 +151,7 @@ void OControlStyleContext::SetDefaults()
void OControlStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue)
{
sal_Int32 nIndex(static_cast<OReportStylesContext *>(pStyles)->GetIndex(nContextID));
DBG_ASSERT(nIndex != -1, "Property not found in Map");
OSL_ENSURE(nIndex != -1, "Property not found in Map");
XMLPropertyState aPropState(nIndex, rValue);
GetProperties().push_back(aPropState); // has to be insertes in a sort order later
}

View file

@ -138,9 +138,9 @@ sal_Int32 ReadThroughComponent(
const uno::Reference< XDocumentHandler >& _xFilter,
sal_Bool /*bEncrypted*/ )
{
DBG_ASSERT(xInputStream.is(), "input stream missing");
DBG_ASSERT(xModelComponent.is(), "document missing");
DBG_ASSERT(rFactory.is(), "factory missing");
OSL_ENSURE(xInputStream.is(), "input stream missing");
OSL_ENSURE(xModelComponent.is(), "document missing");
OSL_ENSURE(rFactory.is(), "factory missing");
RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "rptxml", "oj", "ReadThroughComponent" );
@ -153,13 +153,13 @@ sal_Int32 ReadThroughComponent(
rFactory->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))),
UNO_QUERY );
DBG_ASSERT( xParser.is(), "Can't create parser" );
OSL_ENSURE( xParser.is(), "Can't create parser" );
if( !xParser.is() )
return 1;
RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" );
// get filter
DBG_ASSERT( _xFilter.is(), "Can't instantiate filter component." );
OSL_ENSURE( _xFilter.is(), "Can't instantiate filter component." );
if( !_xFilter.is() )
return 1;
@ -233,8 +233,8 @@ sal_Int32 ReadThroughComponent(
const ::rtl::OUString& _sFilterName
,const uno::Reference<beans::XPropertySet>& _xProp)
{
DBG_ASSERT( xStorage.is(), "Need storage!");
DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
OSL_ENSURE( xStorage.is(), "Need storage!");
OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
if ( xStorage.is() )
{
@ -1054,7 +1054,7 @@ void SAL_CALL ORptFilter::startDocument( void )
void ORptFilter::endDocument( void )
throw( xml::sax::SAXException, uno::RuntimeException )
{
DBG_ASSERT( GetModel().is(), "model missing; maybe startDocument wasn't called?" );
OSL_ENSURE( GetModel().is(), "model missing; maybe startDocument wasn't called?" );
if( !GetModel().is() )
return;

View file

@ -53,7 +53,7 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
rOutAttrs ( *pAttr )
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
OSL_ENSURE(pFact, "Dialogdiet fail!");
switch( _nPageId )
{
case RID_PAGEDIALOG_BACKGROUND: