summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-24 18:22:15 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-24 18:22:15 +0100
commit5f923eaba6743180a10685029694b3e5869605ed (patch)
tree9e23f7ebf8fe958ac4b6a49ac9feca42bebe996a
parente033d877e34a72c1252795d15d522487835f636a (diff)
Move DBG_ASSERT -> OSL_ENSURE
-rw-r--r--reportdesign/source/core/sdr/UndoEnv.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx16
-rw-r--r--reportdesign/source/ui/dlg/dlgpage.cxx2
4 files changed, 13 insertions, 13 deletions
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 67ef2500a..44a2ef845 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -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();
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 85864011e..d7e139784 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -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
}
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 721e0259f..093f22904 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -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;
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 928d4423f..0217b4fce 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -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: