diff options
author | Jacek Wolszczak <shutdownrunner@gmail.com> | 2011-05-08 22:14:45 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-05-09 15:06:56 +0200 |
commit | 4cf350c27fbe9c84ec38daeffe2b57ebc515f8c2 (patch) | |
tree | de43a2b56eeb5717374c41844f90320502aaa76d /sw/source/core/doc/docxforms.cxx | |
parent | ce0a87b004a37e9a2f2da41d6e811e9bdba82eda (diff) |
REPLACE DBG_stuff with OSL_ASSERT and OSL_FAIL
Diffstat (limited to 'sw/source/core/doc/docxforms.cxx')
-rw-r--r-- | sw/source/core/doc/docxforms.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index bf34f2a64699..2fe58eb1946f 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -70,28 +70,28 @@ bool SwDoc::isXForms() const Reference<XInterface> lcl_createInstance( const sal_Char* pServiceName ) { - DBG_ASSERT( pServiceName != NULL, "no service name" ); + OSL_ENSURE( pServiceName != NULL, "no service name" ); return utl::getProcessServiceFactory()->createInstance( OUString::createFromAscii( pServiceName ) ); } void SwDoc::initXForms( bool bCreateDefaultModel ) { - DBG_ASSERT( ! isXForms(), "please initialize only once" ); + OSL_ENSURE( ! isXForms(), "please initialize only once" ); try { // create XForms components xXForms.set( lcl_createInstance( "com.sun.star.xforms.XForms" ), UNO_QUERY ); - DBG_ASSERT( xXForms.is(), "can't create XForms container" ); + OSL_ENSURE( xXForms.is(), "can't create XForms container" ); // change our module identifier, to be able to have a dedicated UI Reference< XModule > xModule; SwDocShell* pShell( GetDocShell() ); if ( pShell ) xModule = xModule.query( pShell->GetModel() ); - DBG_ASSERT( xModule.is(), "SwDoc::initXForms: no XModule at the document!" ); + OSL_ENSURE( xModule.is(), "SwDoc::initXForms: no XModule at the document!" ); if ( xModule.is() ) xModule->setIdentifier( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xforms.XMLFormDocument" ) ) ); @@ -102,7 +102,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) Reference<XModel> xModel( lcl_createInstance( "com.sun.star.xforms.Model" ), UNO_QUERY ); - DBG_ASSERT( xModel.is(), "no model?" ); + OSL_ENSURE( xModel.is(), "no model?" ); if( xModel.is() ) { xModel->setID( sName ); @@ -112,10 +112,10 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) xModel->initialize(); xXForms->insertByName( sName, makeAny( xModel ) ); } - DBG_ASSERT( xXForms->hasElements(), "can't create XForms model" ); + OSL_ENSURE( xXForms->hasElements(), "can't create XForms model" ); } - DBG_ASSERT( isXForms(), "initialization failed" ); + OSL_ENSURE( isXForms(), "initialization failed" ); } catch( const Exception& ) { |