summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 12:08:22 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-13 16:50:43 +0100
commit6495f3945ec0dd4cef37b8dfd5217562de4a3269 (patch)
tree8547adeed9ab7d2452d7efbe0c5cad284930695f /basic
parent1f6580e985d5c3aa0f3161dd884e71a673e7a0b1 (diff)
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/dlgcont.cxx8
-rw-r--r--basic/source/uno/namecont.cxx28
-rw-r--r--basic/source/uno/scriptcont.cxx6
3 files changed, 21 insertions, 21 deletions
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 6af1675b9175..52f241890127 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -349,7 +349,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
//Reference< XMultiServiceFactory > xMSF( comphelper::getProcessServiceFactory() );
//if( !xMSF.is() )
//{
- // OSL_ENSURE( 0, "### couln't get ProcessServiceFactory\n" );
+ // OSL_FAIL( "### couln't get ProcessServiceFactory\n" );
// return aRetAny;
//}
@@ -357,7 +357,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return aRetAny;
}
@@ -365,7 +365,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY );
if( !xDialogModel.is() )
{
- OSL_ENSURE( 0, "### couln't create com.sun.star.awt.UnoControlDialogModel component\n" );
+ OSL_FAIL( "### couln't create com.sun.star.awt.UnoControlDialogModel component\n" );
return aRetAny;
}
@@ -409,7 +409,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
}
catch( Exception& )
{
- OSL_ENSURE( 0, "Parsing error\n" );
+ OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile );
ULONG nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 9c65b6a5f2b8..48f8169d71d3 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -341,21 +341,21 @@ SfxLibraryContainer::SfxLibraryContainer( void )
mxMSF = comphelper::getProcessServiceFactory();
if( !mxMSF.is() )
{
- OSL_ENSURE( 0, "### couln't get ProcessServiceFactory\n" );
+ OSL_FAIL( "### couln't get ProcessServiceFactory\n" );
}
mxSFI = Reference< XSimpleFileAccess >( mxMSF->createInstance
( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), UNO_QUERY );
if( !mxSFI.is() )
{
- OSL_ENSURE( 0, "### couln't create SimpleFileAccess component\n" );
+ OSL_FAIL( "### couln't create SimpleFileAccess component\n" );
}
mxStringSubstitution = Reference< XStringSubstitution >( mxMSF->createInstance
( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution")) ), UNO_QUERY );
if( !mxStringSubstitution.is() )
{
- OSL_ENSURE( 0, "### couln't create PathSubstitution component\n" );
+ OSL_FAIL( "### couln't create PathSubstitution component\n" );
}
}
@@ -630,7 +630,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return sal_False;
}
@@ -785,13 +785,13 @@ sal_Bool SfxLibraryContainer::init_Impl(
catch ( xml::sax::SAXException& e )
{
(void) e; // avoid warning
- OSL_ENSURE( 0, OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
return sal_False;
}
catch ( io::IOException& e )
{
(void) e; // avoid warning
- OSL_ENSURE( 0, OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
return sal_False;
}
@@ -896,7 +896,7 @@ sal_Bool SfxLibraryContainer::init_Impl(
sal_Bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName );
if( bLoaded && aLibName != rLib.aName )
{
- OSL_ENSURE( 0, "Different library names in library"
+ OSL_FAIL( "Different library names in library"
" container and library info files!\n" );
}
if( GbMigrationSuppressErrors && !bLoaded )
@@ -1521,7 +1521,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -1607,7 +1607,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
}
if( !xOut.is() )
{
- OSL_ENSURE( 0, "### couln't open output stream\n" );
+ OSL_FAIL( "### couln't open output stream\n" );
return;
}
@@ -1625,7 +1625,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return sal_False;
}
@@ -1683,7 +1683,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
if( !xInput.is() )
{
- // OSL_ENSURE( 0, "### couln't open input stream\n" );
+ // OSL_FAIL( "### couln't open input stream\n" );
return sal_False;
}
@@ -1698,7 +1698,7 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
catch( Exception& )
{
- OSL_ENSURE( 0, "Parsing error\n" );
+ OSL_FAIL( "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath );
ULONG nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode );
@@ -1998,7 +1998,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -2058,7 +2058,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
}
if( !xOut.is() )
{
- OSL_ENSURE( 0, "### couln't open output stream\n" );
+ OSL_FAIL( "### couln't open output stream\n" );
return;
}
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index d6bd191cd0da..e1b4cf40459b 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -198,7 +198,7 @@ void SAL_CALL SfxScriptLibraryContainer::writeLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") ) ), UNO_QUERY );
if( !xHandler.is() )
{
- OSL_ENSURE( 0, "### couln't create sax-writer component\n" );
+ OSL_FAIL( "### couln't create sax-writer component\n" );
return;
}
@@ -255,7 +255,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser") ) ), UNO_QUERY );
if( !xParser.is() )
{
- OSL_ENSURE( 0, "### couln't create sax parser component\n" );
+ OSL_FAIL( "### couln't create sax parser component\n" );
return aRetAny;
}
@@ -943,7 +943,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
}
catch( uno::Exception& )
{
- OSL_ENSURE( 0, "### couln't open sub storage for library\n" );
+ OSL_FAIL( "### couln't open sub storage for library\n" );
return sal_False;
}
}