Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)

This commit is contained in:
Thomas Arnhold 2011-03-19 14:09:49 +01:00
parent e35cffb37a
commit 970be45287
136 changed files with 603 additions and 785 deletions

View File

@ -1415,7 +1415,7 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Problem during storing of library!\n" ); OSL_FAIL( "Problem during storing of library!\n" );
// TODO: error handling? // TODO: error handling?
} }
} }
@ -1558,7 +1558,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Problem during storing of library index file!\n" ); OSL_FAIL( "Problem during storing of library index file!\n" );
// TODO: error handling? // TODO: error handling?
} }
} }
@ -2080,7 +2080,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Problem during storing of libraries!\n" ); OSL_FAIL( "Problem during storing of libraries!\n" );
sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL; sal_uIntPtr nErrorCode = ERRCODE_IO_GENERAL;
ErrorHandler::HandleError( nErrorCode ); ErrorHandler::HandleError( nErrorCode );
} }

View File

@ -715,7 +715,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Problem on storing of password library!\n" ); OSL_FAIL( "Problem on storing of password library!\n" );
// TODO: error handling // TODO: error handling
} }
} }

View File

@ -73,7 +73,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OAutoConnectionDisposer::OAutoConnectionDisposer: caught an exception!" ); OSL_FAIL( "OAutoConnectionDisposer::OAutoConnectionDisposer: caught an exception!" );
} }
} }
@ -87,7 +87,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OAutoConnectionDisposer::startPropertyListening: caught an exception!" ); OSL_FAIL( "OAutoConnectionDisposer::startPropertyListening: caught an exception!" );
} }
} }
@ -108,7 +108,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OAutoConnectionDisposer::stopPropertyListening: caught an exception!" ); OSL_FAIL( "OAutoConnectionDisposer::stopPropertyListening: caught an exception!" );
} }
} }
@ -123,7 +123,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OAutoConnectionDisposer::startRowSetListening: caught an exception!" ); OSL_FAIL( "OAutoConnectionDisposer::startRowSetListening: caught an exception!" );
} }
m_bRSListening = sal_True; m_bRSListening = sal_True;
} }
@ -138,7 +138,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OAutoConnectionDisposer::stopRowSetListening: caught an exception!" ); OSL_FAIL( "OAutoConnectionDisposer::stopRowSetListening: caught an exception!" );
} }
m_bRSListening = sal_False; m_bRSListening = sal_False;
} }
@ -220,7 +220,7 @@ namespace dbtools
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "OAutoConnectionDisposer::clearConnection: caught an exception!"); OSL_FAIL("OAutoConnectionDisposer::clearConnection: caught an exception!");
} }
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------

View File

@ -313,7 +313,7 @@ Reference< XConnection > getConnection_allowException(
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "dbtools::getConnection: error while retrieving data source properties!"); OSL_FAIL("dbtools::getConnection: error while retrieving data source properties!");
} }
if(bPwdReq && !sPwd.getLength()) if(bPwdReq && !sPwd.getLength())
{ // password required, but empty -> connect using an interaction handler { // password required, but empty -> connect using an interaction handler
@ -354,7 +354,7 @@ Reference< XConnection> getConnection_withFeedback(const ::rtl::OUString& _rData
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "::dbtools::getConnection_withFeedback: unexpected (non-SQL) exception caught!"); OSL_FAIL("::dbtools::getConnection_withFeedback: unexpected (non-SQL) exception caught!");
} }
return xReturn; return xReturn;
} }
@ -745,7 +745,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "::dbtools::getFieldsByCommandDescriptor: could not set the MaxRows!" ); OSL_FAIL( "::dbtools::getFieldsByCommandDescriptor: could not set the MaxRows!" );
// oh damn. Not much of a chance to recover, we will no retrieve the complete // oh damn. Not much of a chance to recover, we will no retrieve the complete
// full blown result set // full blown result set
} }
@ -760,7 +760,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect
break; break;
default: default:
OSL_ENSURE( sal_False, "::dbtools::getFieldsByCommandDescriptor: oops! unhandled state here!" ); OSL_FAIL( "::dbtools::getFieldsByCommandDescriptor: oops! unhandled state here!" );
eState = FAILED; eState = FAILED;
} }
} }
@ -770,7 +770,7 @@ Reference< XNameAccess > getFieldsByCommandDescriptor( const Reference< XConnect
catch( const SQLException& e ) { if ( _pErrorInfo ) *_pErrorInfo = SQLExceptionInfo( e ); } catch( const SQLException& e ) { if ( _pErrorInfo ) *_pErrorInfo = SQLExceptionInfo( e ); }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "::dbtools::getFieldsByCommandDescriptor: caught an exception while retrieving the fields!" ); OSL_FAIL( "::dbtools::getFieldsByCommandDescriptor: caught an exception while retrieving the fields!" );
} }
return xFields; return xFields;
@ -1067,7 +1067,7 @@ try
::rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("TransferFormComponentProperties : could not transfer the value for property \"")); ::rtl::OUString sMessage(RTL_CONSTASCII_USTRINGPARAM("TransferFormComponentProperties : could not transfer the value for property \""));
sMessage += pResult->Name; sMessage += pResult->Name;
sMessage += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\"")); sMessage += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\""));
OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMessage, RTL_TEXTENCODING_ASCII_US)); OSL_FAIL(::rtl::OUStringToOString(sMessage, RTL_TEXTENCODING_ASCII_US));
#endif #endif
} }
} }
@ -1262,7 +1262,7 @@ try
} }
catch(const Exception&) catch(const Exception&)
{ {
OSL_ENSURE( sal_False, "TransferFormComponentProperties: caught an exception!" ); OSL_FAIL( "TransferFormComponentProperties: caught an exception!" );
} }
} }
@ -1382,7 +1382,7 @@ Reference< XSingleSelectQueryComposer > getCurrentSettingsComposer(
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "::getCurrentSettingsComposer : caught an exception !" ); OSL_FAIL( "::getCurrentSettingsComposer : caught an exception !" );
} }
return xReturn; return xReturn;

View File

@ -227,7 +227,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::collectInnerParameters: caught an exception!" ); OSL_FAIL( "ParameterManager::collectInnerParameters: caught an exception!" );
} }
} }
} }
@ -417,7 +417,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::analyzeFieldLinks: caught an exception!" ); OSL_FAIL( "ParameterManager::analyzeFieldLinks: caught an exception!" );
} }
} }
@ -574,7 +574,7 @@ namespace dbtools
// does the name denote a valid column in the parent? // does the name denote a valid column in the parent?
if ( !_rxParentColumns->hasByName( *pMasterFields ) ) if ( !_rxParentColumns->hasByName( *pMasterFields ) )
{ {
OSL_ENSURE( sal_False, "ParameterManager::fillLinkedParameters: invalid master names should have been stripped long before!" ); OSL_FAIL( "ParameterManager::fillLinkedParameters: invalid master names should have been stripped long before!" );
continue; continue;
} }
@ -584,7 +584,7 @@ namespace dbtools
|| ( aParamInfo->second.aInnerIndexes.empty() ) || ( aParamInfo->second.aInnerIndexes.empty() )
) )
{ {
OSL_ENSURE( sal_False, "ParameterManager::fillLinkedParameters: nothing known about this detail field!" ); OSL_FAIL( "ParameterManager::fillLinkedParameters: nothing known about this detail field!" );
continue; continue;
} }
@ -623,8 +623,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, OSL_FAIL( ::rtl::OString( "ParameterManager::fillLinkedParameters: master-detail parameter number " )
::rtl::OString( "ParameterManager::fillLinkedParameters: master-detail parameter number " )
+= ::rtl::OString::valueOf( sal_Int32( *aPosition + 1 ) ) += ::rtl::OString::valueOf( sal_Int32( *aPosition + 1 ) )
+= ::rtl::OString( " could not be filled!" ) ); += ::rtl::OString( " could not be filled!" ) );
} }
@ -665,7 +664,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::completeParameters: caught an exception while calling the handler!" ); OSL_FAIL( "ParameterManager::completeParameters: caught an exception while calling the handler!" );
} }
if ( !pParams->wasSelected() ) if ( !pParams->wasSelected() )
@ -695,7 +694,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::completeParameters: caught an exception while propagating the values!" ); OSL_FAIL( "ParameterManager::completeParameters: caught an exception while propagating the values!" );
} }
return true; return true;
} }
@ -766,7 +765,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::getConnection: could not retrieve the connection of the !" ); OSL_FAIL( "ParameterManager::getConnection: could not retrieve the connection of the !" );
} }
return _rxConnection.is(); return _rxConnection.is();
} }
@ -789,7 +788,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::cacheConnectionInfo: caught an exception!" ); OSL_FAIL( "ParameterManager::cacheConnectionInfo: caught an exception!" );
} }
} }
@ -845,7 +844,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::getParentColumns: caught an exception!" ); OSL_FAIL( "ParameterManager::getParentColumns: caught an exception!" );
} }
return _out_rxParentColumns.is(); return _out_rxParentColumns.is();
} }
@ -900,7 +899,7 @@ namespace dbtools
{ {
// if this name is unknown in the parent columns, then we don't have a source // if this name is unknown in the parent columns, then we don't have a source
// for copying the value to the detail columns // for copying the value to the detail columns
OSL_ENSURE( sal_False, "ParameterManager::resetParameterValues: this should have been stripped long before!" ); OSL_FAIL( "ParameterManager::resetParameterValues: this should have been stripped long before!" );
continue; continue;
} }
@ -912,7 +911,7 @@ namespace dbtools
|| ( aParamInfo->second.aInnerIndexes.empty() ) || ( aParamInfo->second.aInnerIndexes.empty() )
) )
{ {
OSL_ENSURE( sal_False, "ParameterManager::resetParameterValues: nothing known about this detail field!" ); OSL_FAIL( "ParameterManager::resetParameterValues: nothing known about this detail field!" );
continue; continue;
} }
@ -944,7 +943,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ParameterManager::resetParameterValues: caught an exception!" ); OSL_FAIL( "ParameterManager::resetParameterValues: caught an exception!" );
} }
} }

View File

@ -141,7 +141,7 @@ namespace param
return pProperties->Name; return pProperties->Name;
} }
OSL_ENSURE( sal_False, "ParameterWrapper::impl_getPseudoAggregatePropertyName: invalid argument!" ); OSL_FAIL( "ParameterWrapper::impl_getPseudoAggregatePropertyName: invalid argument!" );
return ::rtl::OUString(); return ::rtl::OUString();
} }

View File

@ -93,7 +93,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OPredicateInputController::getSeparatorChars: caught an exception!" ); OSL_FAIL( "OPredicateInputController::getSeparatorChars: caught an exception!" );
} }
return sal_False; return sal_False;
} }
@ -133,7 +133,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OPredicateInputController::OPredicateInputController: caught an exception!" ); OSL_FAIL( "OPredicateInputController::OPredicateInputController: caught an exception!" );
} }
} }
@ -226,7 +226,7 @@ namespace dbtools
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OPredicateInputController::implPredicateTree: caught an exception while dealing with the formats!" ); OSL_FAIL( "OPredicateInputController::implPredicateTree: caught an exception while dealing with the formats!" );
} }
sal_Bool bDecDiffers = ( nCtxDecSep != nFmtDecSep ); sal_Bool bDecDiffers = ( nCtxDecSep != nFmtDecSep );
@ -343,7 +343,7 @@ namespace dbtools
sReturn = pOdbcSpec->getChild(1)->getTokenValue(); sReturn = pOdbcSpec->getChild(1)->getTokenValue();
} }
else else
OSL_ENSURE( sal_False, "OPredicateInputController::getPredicateValue: unknown/invalid structure (odbc + param use)!" ); OSL_FAIL( "OPredicateInputController::getPredicateValue: unknown/invalid structure (odbc + param use)!" );
} }
else else
{ {
@ -376,7 +376,7 @@ namespace dbtools
); );
} }
else else
OSL_ENSURE( sal_False, "OPredicateInputController::getPredicateValue: unknown/invalid structure (noodbc)!" ); OSL_FAIL( "OPredicateInputController::getPredicateValue: unknown/invalid structure (noodbc)!" );
} }
delete pParseNode; delete pParseNode;

View File

@ -212,7 +212,7 @@ namespace dbtools
break; break;
default: default:
OSL_ENSURE(sal_False, "lcl_ensureUpToDateComposer_nothrow: no table, no query, no statement - what else ?!"); OSL_FAIL("lcl_ensureUpToDateComposer_nothrow: no table, no query, no statement - what else ?!");
break; break;
} }

View File

@ -233,7 +233,7 @@ Reference< XDriver > SAL_CALL OPoolCollection::getDriverByURL( const ::rtl::OUSt
xDriver = new ODriverWrapper(xDriverProxy, pConnectionPool); xDriver = new ODriverWrapper(xDriverProxy, pConnectionPool);
} }
else else
OSL_ENSURE(sal_False, "OConnectionPool::getDriverByURL: could not instantiate a proxy factory!"); OSL_FAIL("OConnectionPool::getDriverByURL: could not instantiate a proxy factory!");
} }
} }
@ -363,7 +363,7 @@ Reference< XInterface > OPoolCollection::createWithServiceFactory(const ::rtl::O
} }
catch(const Exception&) catch(const Exception&)
{ {
OSL_ENSURE(sal_False, "createWithServiceFactory: error while instantiating the provider service!"); OSL_FAIL("createWithServiceFactory: error while instantiating the provider service!");
} }
return xInterface; return xInterface;
} }
@ -382,7 +382,7 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu
Reference< XServiceInfo > xSI(_rxConfProvider, UNO_QUERY); Reference< XServiceInfo > xSI(_rxConfProvider, UNO_QUERY);
if (!xSI.is()) if (!xSI.is())
{ {
OSL_ENSURE(sal_False, "::createWithProvider: no XServiceInfo interface on the provider!"); OSL_FAIL("::createWithProvider: no XServiceInfo interface on the provider!");
} }
else else
{ {
@ -392,7 +392,7 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu
} }
catch(const Exception&) catch(const Exception&)
{ {
OSL_ENSURE(sal_False, "::createWithProvider: unable to check the service conformance of the provider given!"); OSL_FAIL("::createWithProvider: unable to check the service conformance of the provider given!");
} }
} }
#endif #endif
@ -413,7 +413,7 @@ Reference< XInterface > OPoolCollection::createWithProvider(const Reference< XMu
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "OConfigurationTreeRoot::createWithProvider: caught an exception while creating the access object!"); OSL_FAIL("OConfigurationTreeRoot::createWithProvider: caught an exception while creating the access object!");
} }
} }
return xInterface; return xInterface;
@ -430,25 +430,24 @@ Reference<XInterface> OPoolCollection::openNode(const ::rtl::OUString& _rPath,co
if (xDirectAccess.is() && xDirectAccess->hasByName(_rPath)) if (xDirectAccess.is() && xDirectAccess->hasByName(_rPath))
{ {
if (!::cppu::extractInterface(xNode, xDirectAccess->getByName(_rPath))) if (!::cppu::extractInterface(xNode, xDirectAccess->getByName(_rPath)))
OSL_ENSURE(sal_False, "OConfigurationNode::openNode: could not open the node!"); OSL_FAIL("OConfigurationNode::openNode: could not open the node!");
} }
else if (xHierarchyAccess.is()) else if (xHierarchyAccess.is())
{ {
if (!::cppu::extractInterface(xNode, xHierarchyAccess->getByHierarchicalName(_rPath))) if (!::cppu::extractInterface(xNode, xHierarchyAccess->getByHierarchicalName(_rPath)))
OSL_ENSURE(sal_False, "OConfigurationNode::openNode: could not open the node!"); OSL_FAIL("OConfigurationNode::openNode: could not open the node!");
} }
} }
catch(const NoSuchElementException&) catch(const NoSuchElementException&)
{ {
OSL_ENSURE(sal_False, OSL_FAIL(::rtl::OString("::openNode: there is no element named ")
::rtl::OString("::openNode: there is no element named ")
+= ::rtl::OString(_rPath.getStr(), _rPath.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString(_rPath.getStr(), _rPath.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("!")); += ::rtl::OString("!"));
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "OConfigurationNode::openNode: caught an exception while retrieving the node!"); OSL_FAIL("OConfigurationNode::openNode: caught an exception while retrieving the node!");
} }
return xNode; return xNode;
} }
@ -472,8 +471,7 @@ Any OPoolCollection::getNodeValue(const ::rtl::OUString& _rPath,const Reference<
catch(NoSuchElementException& e) catch(NoSuchElementException& e)
{ {
OSL_UNUSED( e ); // make compiler happy OSL_UNUSED( e ); // make compiler happy
OSL_ENSURE(sal_False, OSL_FAIL(::rtl::OString("::getNodeValue: caught a NoSuchElementException while trying to open ")
::rtl::OString("::getNodeValue: caught a NoSuchElementException while trying to open ")
+= ::rtl::OString(e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US) += ::rtl::OString(e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US)
+= ::rtl::OString("!")); += ::rtl::OString("!"));
} }

View File

@ -577,8 +577,7 @@ const OExtendedTypeInfo* OConnection::getTypeInfoFromType(const OTypeInfoMap& _r
{ {
// we can not assert here because we could be in d&d // we can not assert here because we could be in d&d
/* /*
OSL_ENSURE(sal_False, OSL_FAIL(( ::rtl::OString("getTypeInfoFromType: assuming column type ")
( ::rtl::OString("getTypeInfoFromType: assuming column type ")
+= ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString(aIter->second->aTypeName.getStr(), aIter->second->aTypeName.getLength(), gsl_getSystemTextEncoding())
+= ::rtl::OString("\" (expected type name ") += ::rtl::OString("\" (expected type name ")
+= ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding()) += ::rtl::OString(_sTypeName.getStr(), _sTypeName.getLength(), gsl_getSystemTextEncoding())

View File

@ -99,7 +99,7 @@ OPreparedStatement::~OPreparedStatement()
{ {
if (m_pParameters) if (m_pParameters)
{ {
OSL_ENSURE( sal_False, "OPreparedStatement::~OPreparedStatement: not disposed!" ); OSL_FAIL( "OPreparedStatement::~OPreparedStatement: not disposed!" );
m_pParameters->Release(); m_pParameters->Release();
m_pParameters = NULL; m_pParameters = NULL;
} }

View File

@ -112,7 +112,7 @@ void OResultSet::construct()
osl_incrementInterlockedCount( &m_refCount ); osl_incrementInterlockedCount( &m_refCount );
if (!m_pRecordSet) if (!m_pRecordSet)
{ {
OSL_ENSURE( sal_False, "OResultSet::construct: no RecordSet!" ); OSL_FAIL( "OResultSet::construct: no RecordSet!" );
Reference< XInterface > xInt( *this ); Reference< XInterface > xInt( *this );
osl_decrementInterlockedCount( &m_refCount ); osl_decrementInterlockedCount( &m_refCount );
::dbtools::throwFunctionSequenceException( xInt ); ::dbtools::throwFunctionSequenceException( xInt );

View File

@ -735,7 +735,7 @@ sal_Bool OStatement_Base::convertFastPropertyValue(
catch( const Exception& e ) catch( const Exception& e )
{ {
bModified = sal_True; // will ensure that the property is set bModified = sal_True; // will ensure that the property is set
OSL_ENSURE( sal_False, "OStatement_Base::convertFastPropertyValue: caught something strange!" ); OSL_FAIL( "OStatement_Base::convertFastPropertyValue: caught something strange!" );
(void)e; (void)e;
} }
return bModified; return bModified;

View File

@ -198,7 +198,7 @@ void OColumnAlias::setAlias(const ::com::sun::star::uno::Reference<
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OColumnAlias::setAlias: could not read my driver's configuration data!" ); OSL_FAIL( "OColumnAlias::setAlias: could not read my driver's configuration data!" );
} }
} }

View File

@ -96,7 +96,7 @@ namespace connectivity
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "createDriverConfigNode: caught an exception while accessing the driver's config node!" ); OSL_FAIL( "createDriverConfigNode: caught an exception while accessing the driver's config node!" );
} }
// outta here // outta here
@ -149,7 +149,7 @@ namespace connectivity
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "getFullPathExportingCommand: caught an exception!" ); OSL_FAIL( "getFullPathExportingCommand: caught an exception!" );
} }
} }
return sFullPathExportingCommand; return sFullPathExportingCommand;

View File

@ -474,7 +474,7 @@ sal_Bool OEvoabFolderList::seekRow(IResultSetHelper::Movement eCursorPosition)
break; break;
default: default:
OSL_ENSURE( sal_False, "OEvoabFolderList::seekRow: unsupported positioning!" ); OSL_FAIL( "OEvoabFolderList::seekRow: unsupported positioning!" );
break; break;
} }

View File

@ -663,7 +663,7 @@ sal_Bool OEvoabTable::setColumnAliases()
} }
} }
else else
OSL_ENSURE( sal_False, "OEvoabTable::setColumnAliases: did not find one of the aliases!" ); OSL_FAIL( "OEvoabTable::setColumnAliases: did not find one of the aliases!" );
} }
if(!bFound) if(!bFound)
aColumnFinalName = aColumnReadName; aColumnFinalName = aColumnReadName;

View File

@ -175,7 +175,7 @@ namespace
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "isCaseSensitiveParentFolder: caught an unexpected exception!" ); OSL_FAIL( "isCaseSensitiveParentFolder: caught an unexpected exception!" );
} }
return nIsCS; return nIsCS;

View File

@ -1725,7 +1725,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
} }
catch (Exception&) catch (Exception&)
{ {
OSL_ENSURE(sal_False, "OResultSet::setBoundedColumns: caught an Exception!"); OSL_FAIL("OResultSet::setBoundedColumns: caught an Exception!");
} }
} }
// in this case we got more select columns as columns exist in the table // in this case we got more select columns as columns exist in the table

View File

@ -855,7 +855,7 @@ namespace connectivity
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "lcl_getSystemLocale: caught an exception!" ); OSL_FAIL( "lcl_getSystemLocale: caught an exception!" );
} }
if ( !sLocaleString.getLength() ) if ( !sLocaleString.getLength() )
{ {
@ -893,7 +893,7 @@ namespace connectivity
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ODriverDelegator::onConnectedNewDatabase: caught an exception!" ); OSL_FAIL( "ODriverDelegator::onConnectedNewDatabase: caught an exception!" );
} }
} }

View File

@ -92,7 +92,7 @@ namespace connectivity
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "createDriverConfigNode: caught an exception while accessing the driver's config node!" ); OSL_FAIL( "createDriverConfigNode: caught an exception while accessing the driver's config node!" );
} }
// outta here // outta here
@ -149,7 +149,7 @@ namespace connectivity
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "getDescription: caught an exception!" ); OSL_FAIL( "getDescription: caught an exception!" );
} }
} }
if (sDescription.getLength() == 0) if (sDescription.getLength() == 0)
@ -177,7 +177,7 @@ namespace connectivity
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "getPreferredProfileName: caught an exception!" ); OSL_FAIL( "getPreferredProfileName: caught an exception!" );
} }
} }
return sPreferredName; return sPreferredName;

View File

@ -1440,7 +1440,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow,
} }
catch (Exception&) catch (Exception&)
{ {
OSL_ENSURE(sal_False, "OResultSet::setBoundedColumns: caught an Exception!"); OSL_FAIL("OResultSet::setBoundedColumns: caught an Exception!");
} }
} }
} }

View File

@ -122,7 +122,7 @@ typedef void* (SAL_CALL * OMozillaBootstrap_CreateInstanceFunction)(const Refere
if (NULL == s_pCreationFunc) if (NULL == s_pCreationFunc)
{ // did not find the symbol { // did not find the symbol
OSL_ENSURE(sal_False, "MozabDriver::registerClient: could not find the symbol for creating the factory!"); OSL_FAIL("MozabDriver::registerClient: could not find the symbol for creating the factory!");
osl_unloadModule(s_hModule); osl_unloadModule(s_hModule);
s_hModule = NULL; s_hModule = NULL;
} }

View File

@ -697,7 +697,7 @@ MQuery::setRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const rtl::OUString&
xResEntry->setValue( m_rColumnAlias.getProgrammaticNameOrFallbackToUTF8Alias( aDBColumnName ), rValue.getString() ); xResEntry->setValue( m_rColumnAlias.getProgrammaticNameOrFallbackToUTF8Alias( aDBColumnName ), rValue.getString() );
break; break;
default: default:
OSL_ENSURE( sal_False, "invalid data type!" ); OSL_FAIL( "invalid data type!" );
break; break;
} }

View File

@ -418,7 +418,7 @@ void OSDBCDriverManager::initializeDriverPrecedence()
} }
catch (Exception&) catch (Exception&)
{ {
OSL_ENSURE(sal_False, "OSDBCDriverManager::initializeDriverPrecedence: caught an exception while sorting the drivers!"); OSL_FAIL("OSDBCDriverManager::initializeDriverPrecedence: caught an exception while sorting the drivers!");
} }
} }

View File

@ -1584,7 +1584,7 @@ int Desktop::Main()
UserInstall::UserInstallError instErr_fin = UserInstall::finalize(); UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
if ( instErr_fin != UserInstall::E_None) if ( instErr_fin != UserInstall::E_None)
{ {
OSL_ENSURE(sal_False, "userinstall failed"); OSL_FAIL("userinstall failed");
if ( instErr_fin == UserInstall::E_NoDiskSpace ) if ( instErr_fin == UserInstall::E_NoDiskSpace )
HandleBootstrapErrors( BE_USERINSTALL_NOTENOUGHDISKSPACE ); HandleBootstrapErrors( BE_USERINSTALL_NOTENOUGHDISKSPACE );
else if ( instErr_fin == UserInstall::E_NoWriteAccess ) else if ( instErr_fin == UserInstall::E_NoWriteAccess )
@ -2705,7 +2705,7 @@ void Desktop::OpenClients()
{ {
OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Could not disable AutoRecovery.\n")) OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Could not disable AutoRecovery.\n"))
+ e.Message; + e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr()); OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
} }
else else
@ -2747,7 +2747,7 @@ void Desktop::OpenClients()
{ {
OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error during recovery\n")) OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error during recovery\n"))
+ e.Message; + e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr()); OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
} }
@ -2770,7 +2770,7 @@ void Desktop::OpenClients()
{ {
OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Registration of session listener failed\n")) OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Registration of session listener failed\n"))
+ e.Message; + e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr()); OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
if ( if (
@ -2788,7 +2788,7 @@ void Desktop::OpenClients()
{ {
OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error in session management\n")) OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error in session management\n"))
+ e.Message; + e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr()); OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
} }
} }
} }
@ -3255,7 +3255,7 @@ void Desktop::DoFirstRunInitializations()
} }
catch(const ::com::sun::star::uno::Exception&) catch(const ::com::sun::star::uno::Exception&)
{ {
OSL_ENSURE( sal_False, "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." ); OSL_FAIL( "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." );
} }
} }

View File

@ -314,11 +314,11 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
} catch (com::sun::star::uno::Exception&) { } catch (com::sun::star::uno::Exception&) {
// no error handling needed... // no error handling needed...
// acceptor just won't come up // acceptor just won't come up
OSL_ENSURE(sal_False, "Acceptor could not be created."); OSL_FAIL("Acceptor could not be created.");
} }
} else { } else {
// there is already an acceptor with this description // there is already an acceptor with this description
OSL_ENSURE(sal_False, "Acceptor already exists."); OSL_FAIL("Acceptor already exists.");
} }
} }
@ -368,7 +368,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
// this is the last reference and the acceptor will be destructed // this is the last reference and the acceptor will be destructed
rMap.erase(aAcceptString); rMap.erase(aAcceptString);
} else { } else {
OSL_ENSURE(sal_False, "Found no acceptor to remove"); OSL_FAIL("Found no acceptor to remove");
} }
} }
} }

View File

@ -340,7 +340,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
{ {
OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM( OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
"Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: ")); "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: "));
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr()); OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
} }
} }
} }
@ -399,14 +399,14 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM( OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
"Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: ")) "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: "))
+ iae.Message; + iae.Message;
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr()); OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
} }
catch (com::sun::star::io::IOException& ioe) catch (com::sun::star::io::IOException& ioe)
{ {
OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM( OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
"Dispatchwatcher IOException while calling loadComponentFromURL: ")) "Dispatchwatcher IOException while calling loadComponentFromURL: "))
+ ioe.Message; + ioe.Message;
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr()); OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
} }
if ( aDispatchRequest.aRequestType == REQUEST_OPEN || if ( aDispatchRequest.aRequestType == REQUEST_OPEN ||
aDispatchRequest.aRequestType == REQUEST_VIEW || aDispatchRequest.aRequestType == REQUEST_VIEW ||

View File

@ -271,7 +271,7 @@ bool LanguageSelection::prepareLanguage()
catch (Exception& e) catch (Exception& e)
{ {
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
} }
@ -399,7 +399,7 @@ Reference< XNameAccess > LanguageSelection::getConfigAccess(const sal_Char* pPat
} catch (com::sun::star::uno::Exception& e) } catch (com::sun::star::uno::Exception& e)
{ {
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
return xNameAccess; return xNameAccess;
} }
@ -549,7 +549,7 @@ void LanguageSelection::resetUserLanguage()
catch ( Exception& e) catch ( Exception& e)
{ {
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
m_eStatus = LS_STATUS_CONFIGURATIONACCESS_BROKEN; m_eStatus = LS_STATUS_CONFIGURATIONACCESS_BROKEN;
} }
} }

View File

@ -128,7 +128,7 @@ namespace desktop {
catch (Exception const & e) catch (Exception const & e)
{ {
OString msg(OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US)); OString msg(OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US));
OSL_ENSURE(sal_False, msg.getStr()); OSL_FAIL(msg.getStr());
} }
return false; return false;
@ -284,7 +284,7 @@ namespace desktop {
{ {
OString aMsg("create_user_install(): "); OString aMsg("create_user_install(): ");
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
return UserInstall::E_Creation; return UserInstall::E_Creation;
} }

View File

@ -231,7 +231,7 @@ void Migration::migrateSettingsIfNecessary()
{ {
OString aMsg("doMigration() exception: "); OString aMsg("doMigration() exception: ");
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
OSL_ENSURE(bResult, "Migration has not been successfull"); OSL_ENSURE(bResult, "Migration has not been successfull");
(void)bResult; (void)bResult;
@ -334,7 +334,7 @@ sal_Bool MigrationImpl::doMigration()
OString aMsg("An unexpected exception was thrown during migration"); OString aMsg("An unexpected exception was thrown during migration");
aMsg += "\nOldVersion: " + OUStringToOString(m_aInfo.productname, RTL_TEXTENCODING_ASCII_US); aMsg += "\nOldVersion: " + OUStringToOString(m_aInfo.productname, RTL_TEXTENCODING_ASCII_US);
aMsg += "\nDataPath : " + OUStringToOString(m_aInfo.userdata, RTL_TEXTENCODING_ASCII_US); aMsg += "\nDataPath : " + OUStringToOString(m_aInfo.userdata, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
// prevent running the migration multiple times // prevent running the migration multiple times
@ -349,7 +349,7 @@ void MigrationImpl::refresh()
if (xRefresh.is()) if (xRefresh.is())
xRefresh->refresh(); xRefresh->refresh();
else else
OSL_ENSURE(sal_False, "could not get XRefresh interface from default config provider. No refresh done."); OSL_FAIL("could not get XRefresh interface from default config provider. No refresh done.");
} }
@ -860,7 +860,7 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
} catch (com::sun::star::uno::Exception& e) } catch (com::sun::star::uno::Exception& e)
{ {
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
return xNameAccess; return xNameAccess;
} }
@ -890,14 +890,14 @@ void MigrationImpl::copyFiles()
OString msg("Cannot copy "); OString msg("Cannot copy ");
msg += OUStringToOString(*i_file, RTL_TEXTENCODING_UTF8) + " to " msg += OUStringToOString(*i_file, RTL_TEXTENCODING_UTF8) + " to "
+ OUStringToOString(destName, RTL_TEXTENCODING_UTF8); + OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
OSL_ENSURE(sal_False, msg.getStr()); OSL_FAIL(msg.getStr());
} }
++i_file; ++i_file;
} }
} }
else else
{ {
OSL_ENSURE(sal_False, "copyFiles: UserInstall does not exist"); OSL_FAIL("copyFiles: UserInstall does not exist");
} }
} }
@ -946,13 +946,13 @@ void MigrationImpl::runServices()
OString aMsg("Execution of migration service failed (Exception caught).\nService: "); OString aMsg("Execution of migration service failed (Exception caught).\nService: ");
aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + "\nMessage: "; aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + "\nMessage: ";
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} catch (...) } catch (...)
{ {
OString aMsg("Execution of migration service failed (Exception caught).\nService: "); OString aMsg("Execution of migration service failed (Exception caught).\nService: ");
aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) +
"\nNo message available"; "\nNo message available";
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
} }

View File

@ -188,14 +188,14 @@ namespace migration
::rtl::OString aMsg( "AutocorrectionMigration::copyFiles: cannot copy " ); ::rtl::OString aMsg( "AutocorrectionMigration::copyFiles: cannot copy " );
aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to " aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
+ ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 ); + ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
OSL_ENSURE( sal_False, aMsg.getStr() ); OSL_FAIL( aMsg.getStr() );
} }
++aI; ++aI;
} }
} }
else else
{ {
OSL_ENSURE( sal_False, "AutocorrectionMigration::copyFiles: no user installation!" ); OSL_FAIL( "AutocorrectionMigration::copyFiles: no user installation!" );
} }
} }

View File

@ -177,14 +177,14 @@ namespace migration
::rtl::OString aMsg( "BasicMigration::copyFiles: cannot copy " ); ::rtl::OString aMsg( "BasicMigration::copyFiles: cannot copy " );
aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to " aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
+ ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 ); + ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
OSL_ENSURE( sal_False, aMsg.getStr() ); OSL_FAIL( aMsg.getStr() );
} }
++aI; ++aI;
} }
} }
else else
{ {
OSL_ENSURE( sal_False, "BasicMigration::copyFiles: no user installation!" ); OSL_FAIL( "BasicMigration::copyFiles: no user installation!" );
} }
} }

View File

@ -224,7 +224,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
::rtl::OString aMsg( "WordbookMigration::copyFiles: cannot copy " ); ::rtl::OString aMsg( "WordbookMigration::copyFiles: cannot copy " );
aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to " aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
+ ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 ); + ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
OSL_ENSURE( sal_False, aMsg.getStr() ); OSL_FAIL( aMsg.getStr() );
} }
} }
++aI; ++aI;
@ -232,7 +232,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
} }
else else
{ {
OSL_ENSURE( sal_False, "WordbookMigration::copyFiles: no user installation!" ); OSL_FAIL( "WordbookMigration::copyFiles: no user installation!" );
} }
} }

View File

@ -215,7 +215,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_ENSURE( sal_False, "Unacceptable state switch!\n" ); OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }
@ -287,7 +287,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_ENSURE( sal_False, "Unacceptable state switch!\n" ); OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }
@ -360,7 +360,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_ENSURE( sal_False, "Unacceptable state switch!\n" ); OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }
@ -373,7 +373,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
} }
else else
{ {
OSL_ENSURE( sal_False, "Unacceptable state switch!\n" ); OSL_FAIL( "Unacceptable state switch!\n" );
throw uno::RuntimeException(); // TODO throw uno::RuntimeException(); // TODO
} }
} }

View File

@ -322,7 +322,7 @@ void OCommonEmbeddedObject::requestPositioning( const awt::Rectangle& aRect )
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Exception on request to resize!\n" ); OSL_FAIL( "Exception on request to resize!\n" );
} }
} }
} }

View File

@ -638,7 +638,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Looks like stream was closed already" ); OSL_FAIL( "Looks like stream was closed already" );
} }
return aResult; return aResult;
@ -665,7 +665,7 @@ void OCommonEmbeddedObject::SaveObject_Impl()
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "The object was not stored!\n" ); OSL_FAIL( "The object was not stored!\n" );
} }
} }
} }
@ -877,7 +877,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not retrieve storage media type!\n" ); OSL_FAIL( "Can not retrieve storage media type!\n" );
} }
if ( m_pDocHolder->GetComponent().is() ) if ( m_pDocHolder->GetComponent().is() )
@ -1203,7 +1203,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not retrieve target storage media type!\n" ); OSL_FAIL( "Can not retrieve target storage media type!\n" );
} }
try try
@ -1216,7 +1216,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not retrieve own storage media type!\n" ); OSL_FAIL( "Can not retrieve own storage media type!\n" );
} }
sal_Bool bTryOptimization = sal_False; sal_Bool bTryOptimization = sal_False;
@ -1334,7 +1334,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not retrieve target storage media type!\n" ); OSL_FAIL( "Can not retrieve target storage media type!\n" );
} }
try try
@ -1347,7 +1347,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not retrieve own storage media type!\n" ); OSL_FAIL( "Can not retrieve own storage media type!\n" );
} }
PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) ); PostEvent_Impl( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "OnSaveAs" )) );
@ -1623,7 +1623,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not retrieve storage media type!\n" ); OSL_FAIL( "Can not retrieve storage media type!\n" );
} }
aGuard.clear(); aGuard.clear();

View File

@ -508,7 +508,7 @@ sal_Bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >&
if ( !SetFrameLMVisibility( m_xFrame, sal_False ) ) if ( !SetFrameLMVisibility( m_xFrame, sal_False ) )
{ {
OSL_ENSURE( sal_False, "Can't deactivate LayoutManager!\n" ); OSL_FAIL( "Can't deactivate LayoutManager!\n" );
// TODO/LATER: error handling? // TODO/LATER: error handling?
} }

View File

@ -41,14 +41,14 @@ void SAL_CALL OClosePreventer::notifyClosing( const com::sun::star::lang::EventO
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
// just a disaster // just a disaster
OSL_ENSURE( sal_False, "The object can not be prevented from closing!\n" ); OSL_FAIL( "The object can not be prevented from closing!\n" );
} }
void SAL_CALL OClosePreventer::disposing( const com::sun::star::lang::EventObject& ) void SAL_CALL OClosePreventer::disposing( const com::sun::star::lang::EventObject& )
throw (::com::sun::star::uno::RuntimeException) throw (::com::sun::star::uno::RuntimeException)
{ {
// just a disaster // just a disaster
OSL_ENSURE( sal_False, "The object can not be prevented from closing!\n" ); OSL_FAIL( "The object can not be prevented from closing!\n" );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -1207,7 +1207,7 @@ awt::Size OleComponent::GetExtent( sal_Int64 nAspect )
bGotSize = sal_True; bGotSize = sal_True;
} }
else else
OSL_ENSURE( sal_False, "Unexpected size is provided!" ); OSL_FAIL( "Unexpected size is provided!" );
} }
} }
} }

View File

@ -519,7 +519,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
sal_Int64 nLength = xTempSeek->getLength() - 40; sal_Int64 nLength = xTempSeek->getLength() - 40;
if ( nLength < 0 || nLength >= 0xFFFFFFFF ) if ( nLength < 0 || nLength >= 0xFFFFFFFF )
{ {
OSL_ENSURE( sal_False, "Length is not acceptable!" ); OSL_FAIL( "Length is not acceptable!" );
return; return;
} }
for ( sal_Int32 nInd = 0; nInd < 4; nInd++ ) for ( sal_Int32 nInd = 0; nInd < 4; nInd++ )

View File

@ -114,7 +114,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis
} }
catch (registry::InvalidRegistryException &) catch (registry::InvalidRegistryException &)
{ {
OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); OSL_FAIL( "### InvalidRegistryException!" );
} }
} }
return sal_False; return sal_False;

View File

@ -137,7 +137,7 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "The object should not be resized without activation!\n" ); OSL_FAIL( "The object should not be resized without activation!\n" );
} }
aGuard.reset(); aGuard.reset();
} }
@ -220,7 +220,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
sal_Bool bSuccess = sal_False; sal_Bool bSuccess = sal_False;
if ( getCurrentState() == embed::EmbedStates::LOADED ) if ( getCurrentState() == embed::EmbedStates::LOADED )
{ {
OSL_ENSURE( sal_False, "Loaded object has no cached size!\n" ); OSL_FAIL( "Loaded object has no cached size!\n" );
// try to switch the object to RUNNING state and request the value again // try to switch the object to RUNNING state and request the value again
try { try {

View File

@ -92,7 +92,7 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK
} }
catch (registry::InvalidRegistryException &) catch (registry::InvalidRegistryException &)
{ {
OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); OSL_FAIL( "### InvalidRegistryException!" );
} }
} }
return sal_False; return sal_False;

View File

@ -114,7 +114,7 @@ sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryK
} }
catch (registry::InvalidRegistryException &) catch (registry::InvalidRegistryException &)
{ {
OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); OSL_FAIL( "### InvalidRegistryException!" );
} }
} }
return sal_False; return sal_False;

View File

@ -86,7 +86,7 @@ sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistr
} }
catch( InvalidRegistryException& ) catch( InvalidRegistryException& )
{ {
OSL_ENSURE( sal_False, "InvalidRegistryException caught" ); OSL_FAIL( "InvalidRegistryException caught" );
bRetVal = sal_False; bRetVal = sal_False;
} }
} }

View File

@ -459,7 +459,7 @@ sal_Int16 SAL_CALL CFilePicker::execute() throw(uno::RuntimeException)
} }
else else
{ {
OSL_ENSURE(sal_False, "Could not start event notifier thread!"); OSL_FAIL("Could not start event notifier thread!");
throw uno::RuntimeException( throw uno::RuntimeException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error executing dialog")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Error executing dialog")),

View File

@ -145,7 +145,7 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( const OUString& aName, OUString&
} }
catch( std::out_of_range& ) catch( std::out_of_range& )
{ {
OSL_ENSURE( sal_False, "Filter not in filter container" ); OSL_FAIL( "Filter not in filter container" );
pos = -1; pos = -1;
} }
@ -166,7 +166,7 @@ sal_Bool SAL_CALL CFilterContainer::getFilter( sal_Int32 aIndex, OUString& theFi
} }
catch( std::out_of_range& ) catch( std::out_of_range& )
{ {
OSL_ENSURE( sal_False, "Filter index out of range" ); OSL_FAIL( "Filter index out of range" );
bRet = sal_False; bRet = sal_False;
} }

View File

@ -226,12 +226,12 @@ CFilePreview* CFilePreview::createInstance(
catch( CPreviewException& ) catch( CPreviewException& )
{ {
OSL_ASSERT( !s_FilePreviewInst ); OSL_ASSERT( !s_FilePreviewInst );
OSL_ENSURE( sal_False, "Creation of the preview window failed" ); OSL_FAIL( "Creation of the preview window failed" );
} }
catch( CAutoOleInit::COleInitException& ) catch( CAutoOleInit::COleInitException& )
{ {
OSL_ASSERT( !s_FilePreviewInst ); OSL_ASSERT( !s_FilePreviewInst );
OSL_ENSURE( sal_False, "OleInitalize failed" ); OSL_FAIL( "OleInitalize failed" );
} }
} }

View File

@ -299,7 +299,7 @@ void SAL_CALL CAsyncEventNotifier::run()
} }
catch(uno::RuntimeException&) catch(uno::RuntimeException&)
{ {
OSL_ENSURE(sal_False,"RuntimeException during event dispatching"); OSL_FAIL("RuntimeException during event dispatching");
} }
} }
} }

View File

@ -395,14 +395,14 @@ void SAL_CALL CExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16
// method the caller should use XFilterManager // method the caller should use XFilterManager
if ( !hwndCtrl || (aControlId == LISTBOX_FILTER) ) if ( !hwndCtrl || (aControlId == LISTBOX_FILTER) )
{ {
OSL_ENSURE( sal_False, "invalid control id" ); OSL_FAIL( "invalid control id" );
return; return;
} }
CTRL_CLASS aCtrlClass = GetCtrlClass( hwndCtrl ); CTRL_CLASS aCtrlClass = GetCtrlClass( hwndCtrl );
if ( UNKNOWN == aCtrlClass ) if ( UNKNOWN == aCtrlClass )
{ {
OSL_ENSURE( sal_False, "unsupported control class" ); OSL_FAIL( "unsupported control class" );
return; return;
} }
@ -411,7 +411,7 @@ void SAL_CALL CExecuteFilePickerState::setValue( sal_Int16 aControlId, sal_Int16
if ( !lpfnSetValue ) if ( !lpfnSetValue )
{ {
OSL_ENSURE( sal_False, "unsupported control action" ); OSL_FAIL( "unsupported control action" );
return; return;
} }
@ -437,14 +437,14 @@ Any SAL_CALL CExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16
// method the caller should use XFilterManager // method the caller should use XFilterManager
if ( !hwndCtrl || (aControlId == LISTBOX_FILTER) ) if ( !hwndCtrl || (aControlId == LISTBOX_FILTER) )
{ {
OSL_ENSURE( sal_False, "invalid control id" ); OSL_FAIL( "invalid control id" );
return Any( ); return Any( );
} }
CTRL_CLASS aCtrlClass = GetCtrlClass( hwndCtrl ); CTRL_CLASS aCtrlClass = GetCtrlClass( hwndCtrl );
if ( UNKNOWN == aCtrlClass ) if ( UNKNOWN == aCtrlClass )
{ {
OSL_ENSURE( sal_False, "unsupported control class" ); OSL_FAIL( "unsupported control class" );
return Any( ); return Any( );
} }
@ -453,7 +453,7 @@ Any SAL_CALL CExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int16
if ( !lpfnGetValue ) if ( !lpfnGetValue )
{ {
OSL_ENSURE( sal_False, "unsupported control action" ); OSL_FAIL( "unsupported control action" );
return Any( ); return Any( );
} }

View File

@ -272,7 +272,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( g_xFactory.is() == sal_False ) if ( g_xFactory.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); OSL_FAIL("Can't create RegistryServiceFactory");
return(-1); return(-1);
} }
@ -363,7 +363,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* Env[] )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( xComponent.is() == sal_False ) if ( xComponent.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Error shuting down"); OSL_FAIL("Error shuting down");
} }
// Dispose and clear factory // Dispose and clear factory

View File

@ -252,7 +252,7 @@ sal_Bool CMtaFolderPicker::browseForFolder( )
if ( WaitForSingleObject( m_hEvtThrdReady, MAX_WAITTIME ) != WAIT_OBJECT_0 ) if ( WaitForSingleObject( m_hEvtThrdReady, MAX_WAITTIME ) != WAIT_OBJECT_0 )
{ {
OSL_ENSURE( sal_False, "sta thread not ready" ); OSL_FAIL( "sta thread not ready" );
return sal_False; return sal_False;
} }
@ -721,7 +721,7 @@ unsigned int CMtaFolderPicker::run( )
// we stop here and return // we stop here and return
if ( FAILED( hr ) ) if ( FAILED( hr ) )
{ {
OSL_ENSURE( sal_False, "CoInitialize failed" ); OSL_FAIL( "CoInitialize failed" );
return sal::static_int_cast< unsigned int >(-1); return sal::static_int_cast< unsigned int >(-1);
} }
@ -740,7 +740,7 @@ unsigned int CMtaFolderPicker::run( )
} }
else else
{ {
OSL_ENSURE( sal_False, "failed to create sta thread" ); OSL_FAIL( "failed to create sta thread" );
nRet = sal::static_int_cast< unsigned int >(-1); nRet = sal::static_int_cast< unsigned int >(-1);
} }

View File

@ -110,7 +110,7 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( g_xFactory.is() == sal_False ) if ( g_xFactory.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); OSL_FAIL("Can't create RegistryServiceFactory");
return(-1); return(-1);
} }
@ -127,7 +127,7 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
if ( xFolderPicker.is() == sal_False ) if ( xFolderPicker.is() == sal_False )
{ {
OSL_ENSURE( sal_False, "Error creating FolderPicker Service" ); OSL_FAIL( "Error creating FolderPicker Service" );
return(-1); return(-1);
} }
@ -161,7 +161,7 @@ int SAL_CALL main(int /*nArgc*/, char* /*Argv[]*/, char* /*Env[]*/ )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( xComponent.is() == sal_False ) if ( xComponent.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Error shuting down"); OSL_FAIL("Error shuting down");
} }
// Dispose and clear factory // Dispose and clear factory

View File

@ -330,7 +330,7 @@ void SAL_CALL InterceptionHelper::disposing(const css::lang::EventObject& aEvent
// SAFE -> // SAFE ->
aReadLock.lock(); aReadLock.lock();
if (!m_lInterceptionRegs.empty() ) if (!m_lInterceptionRegs.empty() )
OSL_ENSURE(sal_False, "There are some pending interceptor objects, which seams to be registered during (!) the destruction of a frame."); OSL_FAIL("There are some pending interceptor objects, which seams to be registered during (!) the destruction of a frame.");
aReadLock.unlock(); aReadLock.unlock();
// <- SAFE // <- SAFE
#endif // ODL_DEBUG_LEVEL>0 #endif // ODL_DEBUG_LEVEL>0

View File

@ -1254,13 +1254,13 @@ throw (RuntimeException)
void SAL_CALL LayoutManager::setInplaceMenuBar( sal_Int64 ) void SAL_CALL LayoutManager::setInplaceMenuBar( sal_Int64 )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); OSL_FAIL( "This method is obsolete and should not be used!\n" );
} }
void SAL_CALL LayoutManager::resetInplaceMenuBar() void SAL_CALL LayoutManager::resetInplaceMenuBar()
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
OSL_ENSURE( sal_False, "This method is obsolete and should not be used!\n" ); OSL_FAIL( "This method is obsolete and should not be used!\n" );
} }
//--------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------

View File

@ -329,7 +329,7 @@ void CacheLockGuard::lock(sal_Bool bLockForAddRemoveVectorItems)
(bLockForAddRemoveVectorItems) (bLockForAddRemoveVectorItems)
) )
{ {
OSL_ENSURE(sal_False, "Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp."); OSL_FAIL("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.");
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.")),
m_xOwner); m_xOwner);
@ -356,7 +356,7 @@ void CacheLockGuard::unlock()
if (m_rCacheLock < 0) if (m_rCacheLock < 0)
{ {
OSL_ENSURE(sal_False, "Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)"); OSL_FAIL("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)");
throw css::uno::RuntimeException( throw css::uno::RuntimeException(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)")), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)")),
m_xOwner); m_xOwner);

View File

@ -176,7 +176,7 @@ void SessionListener::StoreSession( sal_Bool bAsync )
xDispatch->dispatch(aURL, args); xDispatch->dispatch(aURL, args);
} catch (com::sun::star::uno::Exception& e) { } catch (com::sun::star::uno::Exception& e) {
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
// save failed, but tell manager to go on if we havent yet dispatched the request // save failed, but tell manager to go on if we havent yet dispatched the request
// in case of synchronous saving the notification is done by the caller // in case of synchronous saving the notification is done by the caller
if ( bAsync && m_rSessionManager.is() ) if ( bAsync && m_rSessionManager.is() )
@ -204,7 +204,7 @@ void SessionListener::QuitSessionQuietly()
xDispatch->dispatch(aURL, args); xDispatch->dispatch(aURL, args);
} catch (com::sun::star::uno::Exception& e) { } catch (com::sun::star::uno::Exception& e) {
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
} }
@ -283,7 +283,7 @@ sal_Bool SAL_CALL SessionListener::doRestore()
} catch (com::sun::star::uno::Exception& e) { } catch (com::sun::star::uno::Exception& e) {
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8);
OSL_ENSURE(sal_False, aMsg.getStr()); OSL_FAIL(aMsg.getStr());
} }
return m_bRestored; return m_bRestored;

View File

@ -392,7 +392,7 @@ sal_uInt32 CheckPasswd_Impl
} }
else else
{ {
OSL_ENSURE( sal_False, "A storage must implement XPropertySet interface!" ); OSL_FAIL( "A storage must implement XPropertySet interface!" );
nRet = ERRCODE_SFX_CANTGETPASSWD; nRet = ERRCODE_SFX_CANTGETPASSWD;
} }
} }

View File

@ -892,7 +892,7 @@ void SfxMedium::SetEncryptionDataToStorage_Impl()
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "It must be possible to set a common password for the storage" ); OSL_FAIL( "It must be possible to set a common password for the storage" );
// TODO/LATER: set the error code in case of problem // TODO/LATER: set the error code in case of problem
// SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); // SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
} }
@ -1249,7 +1249,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI )
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Unexpected problem by locking, high probability, that the content could not be created" ); OSL_FAIL( "Unexpected problem by locking, high probability, that the content could not be created" );
} }
return bResult; return bResult;
} }
@ -1443,7 +1443,7 @@ uno::Reference< embed::XStorage > SfxMedium::GetZipStorageToSign_Impl( sal_Bool
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "No possibility to get readonly version of storage from medium!\n" ); OSL_FAIL( "No possibility to get readonly version of storage from medium!\n" );
} }
if ( GetError() ) // do not remove warnings if ( GetError() ) // do not remove warnings
@ -1480,7 +1480,7 @@ void SfxMedium::CloseStorage()
xComp->dispose(); xComp->dispose();
} catch( uno::Exception& ) } catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Medium's storage is already disposed!\n" ); OSL_FAIL( "Medium's storage is already disposed!\n" );
} }
} }
@ -1813,7 +1813,7 @@ void SfxMedium::Transfer_Impl()
{ {
// makes sence only in case logic name is set // makes sence only in case logic name is set
if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aNameURL ) ) if ( !::utl::LocalFileHelper::ConvertPhysicalNameToURL( aName, aNameURL ) )
OSL_ENSURE( sal_False, "The medium name is not convertable!\n" ); OSL_FAIL( "The medium name is not convertable!\n" );
} }
if ( aNameURL.Len() && ( !eError || (eError & ERRCODE_WARNING_MASK) ) ) if ( aNameURL.Len() && ( !eError || (eError & ERRCODE_WARNING_MASK) ) )
@ -2944,7 +2944,7 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b
} }
else else
{ {
OSL_ENSURE( sal_False, "Can not create a new temporary file for crash recovery!\n" ); OSL_FAIL( "Can not create a new temporary file for crash recovery!\n" );
} }
} }
} }
@ -3597,7 +3597,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Couldn't use signing functionality!\n" ); OSL_FAIL( "Couldn't use signing functionality!\n" );
} }
CloseAndRelease(); CloseAndRelease();
@ -3613,7 +3613,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl::
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Couldn't use signing functionality!\n" ); OSL_FAIL( "Couldn't use signing functionality!\n" );
} }
} }
} }

View File

@ -211,7 +211,7 @@ namespace sfx2
nMacroExecutionMode = MacroExecMode::ALWAYS_EXECUTE_NO_WARN; nMacroExecutionMode = MacroExecMode::ALWAYS_EXECUTE_NO_WARN;
break; break;
default: default:
OSL_ENSURE( sal_False, "DocumentMacroMode::adjustMacroMode: unexpected macro security level!" ); OSL_FAIL( "DocumentMacroMode::adjustMacroMode: unexpected macro security level!" );
nMacroExecutionMode = MacroExecMode::NEVER_EXECUTE; nMacroExecutionMode = MacroExecMode::NEVER_EXECUTE;
} }

View File

@ -1407,13 +1407,13 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
} }
catch( lang::IllegalArgumentException& ) catch( lang::IllegalArgumentException& )
{ {
OSL_ENSURE( sal_False, "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" ); OSL_FAIL( "ModelData didn't handle illegal parameters, all the parameters are ignored!\n" );
aModelData.GetStorable()->store(); aModelData.GetStorable()->store();
} }
} }
else else
{ {
OSL_ENSURE( sal_False, "XStorable2 is not supported by the model!\n" ); OSL_FAIL( "XStorable2 is not supported by the model!\n" );
aModelData.GetStorable()->store(); aModelData.GetStorable()->store();
} }

View File

@ -227,7 +227,7 @@ sal_Bool SfxInstanceCloseGuard_Impl::Init_Impl( const uno::Reference< util::XClo
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Could not register close listener!\n" ); OSL_FAIL( "Could not register close listener!\n" );
} }
} }

View File

@ -173,7 +173,7 @@ void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel >&
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "The document seems to be in the collection already!\n" ); OSL_FAIL( "The document seems to be in the collection already!\n" );
} }
} }
} }
@ -418,7 +418,7 @@ sal_Bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage
} }
catch ( uno::Exception& ) catch ( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can't check storage's mediatype!\n" ); OSL_FAIL( "Can't check storage's mediatype!\n" );
} }
} }
else else
@ -1412,7 +1412,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
xMedStorage ) ) xMedStorage ) )
{ {
// TODO: error handling // TODO: error handling
OSL_ENSURE( sal_False, "Couldn't store thumbnail representation!" ); OSL_FAIL( "Couldn't store thumbnail representation!" );
} }
} }
@ -1931,7 +1931,7 @@ sal_Bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, sal_Bool bCommit )
::rtl::OUString aMediaType; ::rtl::OUString aMediaType;
if ( !(a>>=aMediaType) || !aMediaType.getLength() ) if ( !(a>>=aMediaType) || !aMediaType.getLength() )
{ {
OSL_ENSURE( sal_False, "The mediatype must be set already!\n" ); OSL_FAIL( "The mediatype must be set already!\n" );
SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, sal_False ); SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, sal_False );
} }
@ -3410,7 +3410,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Cant check storage consistency!\n" ); OSL_FAIL( "Cant check storage consistency!\n" );
} }
return sal_True; return sal_True;

View File

@ -408,7 +408,7 @@ SfxOwnFramesLocker::SfxOwnFramesLocker( SfxObjectShell* pObjectShell )
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Not possible to lock the frame window!\n" ); OSL_FAIL( "Not possible to lock the frame window!\n" );
} }
} }
} }
@ -452,7 +452,7 @@ void SfxOwnFramesLocker::UnlockFrames()
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can't unlock the frame window!\n" ); OSL_FAIL( "Can't unlock the frame window!\n" );
} }
} }
} }
@ -2579,7 +2579,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
} }
else else
{ {
OSL_ENSURE( sal_False, "Unexpected scenario!\n" ); OSL_FAIL( "Unexpected scenario!\n" );
} }
} }

View File

@ -693,7 +693,7 @@ void SfxInPlaceClient::SetObjectState( sal_Int32 nState )
if ( m_pImp->m_nAspect == embed::Aspects::MSOLE_ICON if ( m_pImp->m_nAspect == embed::Aspects::MSOLE_ICON
&& ( nState == embed::EmbedStates::UI_ACTIVE || nState == embed::EmbedStates::INPLACE_ACTIVE ) ) && ( nState == embed::EmbedStates::UI_ACTIVE || nState == embed::EmbedStates::INPLACE_ACTIVE ) )
{ {
OSL_ENSURE( sal_False, "Iconified object should not be activated inplace!\n" ); OSL_FAIL( "Iconified object should not be activated inplace!\n" );
return; return;
} }
@ -738,7 +738,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not clean the client site!\n" ); OSL_FAIL( "Can not clean the client site!\n" );
} }
} }
} }
@ -762,7 +762,7 @@ void SfxInPlaceClient::SetObject( const uno::Reference < embed::XEmbeddedObject
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Can not set the client site!\n" ); OSL_FAIL( "Can not set the client site!\n" );
} }
m_pImp->m_aTimer.Start(); m_pImp->m_aTimer.Start();

View File

@ -101,7 +101,7 @@ int SAL_CALL main(int, char*, char* )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( g_xFactory.is() == sal_False ) if ( g_xFactory.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); OSL_FAIL("Can't create RegistryServiceFactory");
return(-1); return(-1);
} }
@ -118,7 +118,7 @@ int SAL_CALL main(int, char*, char* )
if ( !xProxySettings.is() ) if ( !xProxySettings.is() )
{ {
OSL_ENSURE( sal_False, "Error creating SystemProxySettings Service" ); OSL_FAIL( "Error creating SystemProxySettings Service" );
return(-1); return(-1);
} }
@ -145,7 +145,7 @@ int SAL_CALL main(int, char*, char* )
if ( !xProxySettings.is() ) if ( !xProxySettings.is() )
{ {
OSL_ENSURE( sal_False, "Error creating SystemProxySettings Service" ); OSL_FAIL( "Error creating SystemProxySettings Service" );
return(-1); return(-1);
} }
@ -187,7 +187,7 @@ int SAL_CALL main(int, char*, char* )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( xComponent.is() == sal_False ) if ( xComponent.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Error shuting down"); OSL_FAIL("Error shuting down");
} }
// Dispose and clear factory // Dispose and clear factory

View File

@ -96,7 +96,7 @@ int SAL_CALL main(int , char*, char* )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( g_xFactory.is() == sal_False ) if ( g_xFactory.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); OSL_FAIL("Can't create RegistryServiceFactory");
return(-1); return(-1);
} }
@ -113,7 +113,7 @@ int SAL_CALL main(int , char*, char* )
if ( !xSmplMailClientSuppl.is() ) if ( !xSmplMailClientSuppl.is() )
{ {
OSL_ENSURE( sal_False, "Error creating SimpleSystemMail Service" ); OSL_FAIL( "Error creating SimpleSystemMail Service" );
return(-1); return(-1);
} }
@ -175,7 +175,7 @@ int SAL_CALL main(int , char*, char* )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( xComponent.is() == sal_False ) if ( xComponent.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Error shuting down"); OSL_FAIL("Error shuting down");
} }
// Dispose and clear factory // Dispose and clear factory

View File

@ -106,7 +106,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( g_xFactory.is() == sal_False ) if ( g_xFactory.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); OSL_FAIL("Can't create RegistryServiceFactory");
return(-1); return(-1);
} }
@ -121,7 +121,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* )
if ( !xSysShExec.is() ) if ( !xSysShExec.is() )
{ {
OSL_ENSURE( sal_False, "Error creating SystemShellExecute Service" ); OSL_FAIL( "Error creating SystemShellExecute Service" );
return(-1); return(-1);
} }
@ -135,11 +135,11 @@ int SAL_CALL main(int nArgc, char* Argv[], char* )
} }
catch( SystemShellExecuteException& ) catch( SystemShellExecuteException& )
{ {
OSL_ENSURE( sal_False, "Error executing system command" ); OSL_FAIL( "Error executing system command" );
} }
catch( IllegalArgumentException& ) catch( IllegalArgumentException& )
{ {
OSL_ENSURE( sal_False, "Invalid parameter" ); OSL_FAIL( "Invalid parameter" );
} }
//-------------------------------------------------- //--------------------------------------------------
@ -152,7 +152,7 @@ int SAL_CALL main(int nArgc, char* Argv[], char* )
// Print a message if an error occurred. // Print a message if an error occurred.
if ( xComponent.is() == sal_False ) if ( xComponent.is() == sal_False )
{ {
OSL_ENSURE(sal_False, "Error shuting down"); OSL_FAIL("Error shuting down");
} }
// Dispose and clear factory // Dispose and clear factory

View File

@ -302,7 +302,7 @@ void AccessibleControlShape::Init()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "AccessibleControlShape::Init: could not \"aggregate\" the controls XAccessibleContext!" ); OSL_FAIL( "AccessibleControlShape::Init: could not \"aggregate\" the controls XAccessibleContext!" );
} }
} }
@ -430,7 +430,7 @@ void SAL_CALL AccessibleControlShape::propertyChange( const PropertyChangeEvent&
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
else else
{ {
OSL_ENSURE( sal_False, "AccessibleControlShape::propertyChange: where did this come from?" ); OSL_FAIL( "AccessibleControlShape::propertyChange: where did this come from?" );
} }
#endif #endif
} }
@ -531,7 +531,7 @@ void SAL_CALL AccessibleControlShape::modeChanged( const ModeChangeEvent& _rSour
} }
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
else else
OSL_ENSURE( sal_False, "AccessibleControlShape::modeChanged: where did this come from?" ); OSL_FAIL( "AccessibleControlShape::modeChanged: where did this come from?" );
#endif #endif
} }
@ -561,12 +561,12 @@ sal_Bool AccessibleControlShape::ensureListeningState(
m_xControlModel->removePropertyChangeListener( _rPropertyName, static_cast< XPropertyChangeListener* >( this ) ); m_xControlModel->removePropertyChangeListener( _rPropertyName, static_cast< XPropertyChangeListener* >( this ) );
} }
else else
OSL_ENSURE( sal_False, "AccessibleControlShape::ensureListeningState: this property does not exist at this model!" ); OSL_FAIL( "AccessibleControlShape::ensureListeningState: this property does not exist at this model!" );
} }
catch( const Exception& e ) catch( const Exception& e )
{ {
(void)e; // make compiler happy (void)e; // make compiler happy
OSL_ENSURE( sal_False, "AccessibleControlShape::ensureListeningState: could not change the listening state!" ); OSL_FAIL( "AccessibleControlShape::ensureListeningState: could not change the listening state!" );
} }
return _bNeedNewListening; return _bNeedNewListening;
@ -682,7 +682,7 @@ void SAL_CALL AccessibleControlShape::disposing (void)
// stop listening at the control container (should never be necessary here, but who knows ....) // stop listening at the control container (should never be necessary here, but who knows ....)
if ( m_bWaitingForControl ) if ( m_bWaitingForControl )
{ {
OSL_ENSURE( sal_False, "AccessibleControlShape::disposing: this should never happen!" ); OSL_FAIL( "AccessibleControlShape::disposing: this should never happen!" );
Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow(), maShapeTreeInfo.GetSdrView() ); Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow(), maShapeTreeInfo.GetSdrView() );
if ( xContainer.is() ) if ( xContainer.is() )
{ {
@ -732,7 +732,7 @@ sal_Bool AccessibleControlShape::ensureControlModelAccess() SAL_THROW(())
catch( const Exception& e ) catch( const Exception& e )
{ {
(void)e; // make compiler happy (void)e; // make compiler happy
OSL_ENSURE( sal_False, "AccessibleControlShape::ensureControlModelAccess: caught an exception!" ); OSL_FAIL( "AccessibleControlShape::ensureControlModelAccess: caught an exception!" );
} }
return m_xControlModel.is(); return m_xControlModel.is();
@ -791,7 +791,7 @@ void AccessibleControlShape::stopStateMultiplexing()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OAccessibleControlContext::getModelStringProperty: caught an exception!" ); OSL_FAIL( "OAccessibleControlContext::getModelStringProperty: caught an exception!" );
} }
return sReturn; return sReturn;
} }

View File

@ -123,7 +123,7 @@ namespace svx
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "OColumnTransferable::OColumnTransferable: could not collect essential data source attributes !"); OSL_FAIL("OColumnTransferable::OColumnTransferable: could not collect essential data source attributes !");
} }
// If the data source is an SQL-statement and simple enough (means "select <field list> from <table> where ....") // If the data source is an SQL-statement and simple enough (means "select <field list> from <table> where ....")
@ -151,7 +151,7 @@ namespace svx
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "OColumnTransferable::OColumnTransferable: could not collect essential data source attributes (part two) !"); OSL_FAIL("OColumnTransferable::OColumnTransferable: could not collect essential data source attributes (part two) !");
} }
} }
@ -436,7 +436,7 @@ namespace svx
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "ODataAccessObjectTransferable::ODataAccessObjectTransferable: could not collect essential form attributes !"); OSL_FAIL("ODataAccessObjectTransferable::ODataAccessObjectTransferable: could not collect essential form attributes !");
return; return;
} }
@ -450,7 +450,7 @@ namespace svx
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "ODataAccessObjectTransferable::ODataAccessObjectTransferable: could not collect essential form attributes (part two) !"); OSL_FAIL("ODataAccessObjectTransferable::ODataAccessObjectTransferable: could not collect essential form attributes (part two) !");
return; return;
} }
@ -561,7 +561,7 @@ namespace svx
return ODataAccessDescriptor(aDescriptorProps); return ODataAccessDescriptor(aDescriptorProps);
} }
OSL_ENSURE( sal_False, "OColumnTransferable::extractColumnDescriptor: unsupported formats only!" ); OSL_FAIL( "OColumnTransferable::extractColumnDescriptor: unsupported formats only!" );
return ODataAccessDescriptor(); return ODataAccessDescriptor();
} }

View File

@ -1539,7 +1539,7 @@ void FmGridControl::RowHeightChanged()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmGridControl::RowHeightChanged: caught an exception!" ); OSL_FAIL( "FmGridControl::RowHeightChanged: caught an exception!" );
} }
} }
} }

View File

@ -125,13 +125,13 @@ namespace
case awt::LineEndFormat::LINE_FEED: eFormat = LINEEND_LF; break; case awt::LineEndFormat::LINE_FEED: eFormat = LINEEND_LF; break;
case awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED: eFormat = LINEEND_CRLF; break; case awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED: eFormat = LINEEND_CRLF; break;
default: default:
OSL_ENSURE( sal_False, "getModelLineEndSetting: what's this?" ); OSL_FAIL( "getModelLineEndSetting: what's this?" );
} }
} }
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "getModelLineEndSetting: caught an exception!" ); OSL_FAIL( "getModelLineEndSetting: caught an exception!" );
} }
return eFormat; return eFormat;
} }
@ -1132,7 +1132,7 @@ void DbTextField::Init( Window& rParent, const Reference< XRowSet >& xCursor)
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "DbTextField::Init: caught an exception while determining the multi-line capabilities!" ); OSL_FAIL( "DbTextField::Init: caught an exception while determining the multi-line capabilities!" );
} }
m_bIsSimpleEdit = !bIsMultiLine; m_bIsSimpleEdit = !bIsMultiLine;
@ -2942,7 +2942,7 @@ void DbFilterField::updateFromModel( Reference< XPropertySet > _rxModel )
OSL_ENSURE( _rxModel.is() && m_pWindow, "DbFilterField::updateFromModel: invalid call!" ); OSL_ENSURE( _rxModel.is() && m_pWindow, "DbFilterField::updateFromModel: invalid call!" );
(void)_rxModel; (void)_rxModel;
OSL_ENSURE( sal_False, "DbListBox::updateFromModel: not implemented yet (how the hell did you reach this?)!" ); OSL_FAIL( "DbListBox::updateFromModel: not implemented yet (how the hell did you reach this?)!" );
// TODO: implement this. // TODO: implement this.
// remember: updateFromModel should be some kind of opposite of commitControl // remember: updateFromModel should be some kind of opposite of commitControl
} }

View File

@ -156,7 +156,7 @@ namespace svx
xPropInfo = _rxValues->getPropertySetInfo(); xPropInfo = _rxValues->getPropertySetInfo();
if (!xPropInfo.is()) if (!xPropInfo.is())
{ {
OSL_ENSURE(sal_False, "ODADescriptorImpl::buildFrom: invalid property set!"); OSL_FAIL("ODADescriptorImpl::buildFrom: invalid property set!");
return sal_False; return sal_False;
} }
@ -406,7 +406,7 @@ namespace svx
{ {
if (!has(_eWhich)) if (!has(_eWhich))
{ {
OSL_ENSURE(sal_False, "ODataAccessDescriptor::operator[]: invalid acessor!"); OSL_FAIL("ODataAccessDescriptor::operator[]: invalid acessor!");
static const Any aDummy; static const Any aDummy;
return aDummy; return aDummy;
} }

View File

@ -129,7 +129,7 @@ namespace svxform
if (NULL == s_pFactoryCreationFunc) if (NULL == s_pFactoryCreationFunc)
{ // did not find the symbol { // did not find the symbol
OSL_ENSURE(sal_False, "ODbtoolsClient::registerClient: could not find the symbol for creating the factory!"); OSL_FAIL("ODbtoolsClient::registerClient: could not find the symbol for creating the factory!");
osl_unloadModule(s_hDbtoolsModule); osl_unloadModule(s_hDbtoolsModule);
s_hDbtoolsModule = NULL; s_hDbtoolsModule = NULL;
} }

View File

@ -287,7 +287,7 @@ void FmPropBrw::Resize()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmPropBrw::Resize: caught an exception!" ); OSL_FAIL( "FmPropBrw::Resize: caught an exception!" );
} }
} }
} }
@ -336,7 +336,7 @@ FmPropBrw::~FmPropBrw()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmPropBrw::getCurrentPage: caught an exception while retrieving the current page!" ); OSL_FAIL( "FmPropBrw::getCurrentPage: caught an exception while retrieving the current page!" );
} }
return sCurrentPage; return sCurrentPage;
} }
@ -356,7 +356,7 @@ void FmPropBrw::implDetachController()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmPropBrw::implDetachController: caught an exception while resetting the component!" ); OSL_FAIL( "FmPropBrw::implDetachController: caught an exception while resetting the component!" );
} }
} }
@ -383,7 +383,7 @@ sal_Bool FmPropBrw::Close()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmPropBrw::Close: caught an exception while asking the controller!" ); OSL_FAIL( "FmPropBrw::Close: caught an exception while asking the controller!" );
} }
} }
@ -445,7 +445,7 @@ void FmPropBrw::implSetNewSelection( const InterfaceBag& _rSelection )
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmPropBrw::implSetNewSelection: caught an unexpected exception!" ); OSL_FAIL( "FmPropBrw::implSetNewSelection: caught an unexpected exception!" );
return; return;
} }
@ -703,7 +703,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmPropBrw::StateChanged: caught an exception while setting the initial page!" ); OSL_FAIL( "FmPropBrw::StateChanged: caught an exception while setting the initial page!" );
} }
} }

View File

@ -180,7 +180,7 @@ namespace svxform
if ( _nStatus & CONTROL_STATUS_MOUSE_HOVER ) if ( _nStatus & CONTROL_STATUS_MOUSE_HOVER )
return m_nMouseHoveColor; return m_nMouseHoveColor;
OSL_ENSURE( sal_False, "ControlBorderManager::getControlColorByStatus: invalid status!" ); OSL_FAIL( "ControlBorderManager::getControlColorByStatus: invalid status!" );
return 0x00000000; return 0x00000000;
} }
@ -256,7 +256,7 @@ namespace svxform
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ControlBorderManager::controlStatusGained: caught an exception!" ); OSL_FAIL( "ControlBorderManager::controlStatusGained: caught an exception!" );
} }
} }
@ -280,7 +280,7 @@ namespace svxform
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ControlBorderManager::controlStatusLost: caught an exception!" ); OSL_FAIL( "ControlBorderManager::controlStatusLost: caught an exception!" );
} }
} }
@ -312,7 +312,7 @@ namespace svxform
m_nInvalidColor = _nColor; m_nInvalidColor = _nColor;
break; break;
default: default:
OSL_ENSURE( sal_False, "ControlBorderManager::setStatusColor: invalid status!" ); OSL_FAIL( "ControlBorderManager::setStatusColor: invalid status!" );
} }
} }
@ -432,7 +432,7 @@ namespace svxform
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ControlBorderManager::validityChanged: caught an exception!" ); OSL_FAIL( "ControlBorderManager::validityChanged: caught an exception!" );
} }
} }

View File

@ -288,7 +288,7 @@ namespace svxform
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ControlLayouter::initializeControlLayout: caught an exception!" ); OSL_FAIL( "ControlLayouter::initializeControlLayout: caught an exception!" );
} }
} }

View File

@ -175,7 +175,7 @@ namespace svxform
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "DocumentClassification::classifyHostDocument: caught an exception!" ); OSL_FAIL( "DocumentClassification::classifyHostDocument: caught an exception!" );
} }
return eType; return eType;

View File

@ -127,7 +127,7 @@ void FmFormPage::SetModel(SdrModel* pNewModel)
} }
catch( ::com::sun::star::uno::Exception const& ) catch( ::com::sun::star::uno::Exception const& )
{ {
OSL_ENSURE( sal_False, "UNO Exception caught resetting model for m_pImpl (FmFormPageImpl) in FmFormPage::SetModel" ); OSL_FAIL( "UNO Exception caught resetting model for m_pImpl (FmFormPageImpl) in FmFormPage::SetModel" );
} }
} }
} }

View File

@ -628,7 +628,7 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
catch(const Exception& e) catch(const Exception& e)
{ {
(void)e; (void)e;
OSL_ENSURE(sal_False, "FmFormPageImpl::findFormForDataSource: caught an exception!"); OSL_FAIL("FmFormPageImpl::findFormForDataSource: caught an exception!");
} }
if (sLookupName == sFormDataSourceName) if (sLookupName == sFormDataSourceName)

View File

@ -754,7 +754,7 @@ bool FmXFormShell::impl_checkDisposed() const
m_eDocumentType = DocumentClassification::classifyDocument( xModel ); m_eDocumentType = DocumentClassification::classifyDocument( xModel );
else else
{ {
OSL_ENSURE( sal_False, "FmXFormShell::getDocumentType: can't determine the document type!" ); OSL_FAIL( "FmXFormShell::getDocumentType: can't determine the document type!" );
m_eDocumentType = eTextDocument; m_eDocumentType = eTextDocument;
// fallback, just to have a defined state // fallback, just to have a defined state
} }
@ -1011,7 +1011,7 @@ void FmXFormShell::UpdateSlot( sal_Int16 _nId )
if ( m_nLockSlotInvalidation ) if ( m_nLockSlotInvalidation )
{ {
OSL_ENSURE( sal_False, "FmXFormShell::UpdateSlot: cannot update if invalidation is currently locked!" ); OSL_FAIL( "FmXFormShell::UpdateSlot: cannot update if invalidation is currently locked!" );
InvalidateSlot( _nId, sal_False ); InvalidateSlot( _nId, sal_False );
} }
else else
@ -1519,7 +1519,7 @@ void FmXFormShell::ExecuteTabOrderDialog( const Reference< XTabControllerModel >
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmXFormShell::ExecuteTabOrderDialog: caught an exception!" ); OSL_FAIL( "FmXFormShell::ExecuteTabOrderDialog: caught an exception!" );
} }
} }

View File

@ -66,7 +66,7 @@ namespace svx
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmTextControlFeature::FmTextControlFeature: caught an exception!" ); OSL_FAIL( "FmTextControlFeature::FmTextControlFeature: caught an exception!" );
} }
osl_decrementInterlockedCount( &m_refCount ); osl_decrementInterlockedCount( &m_refCount );
} }
@ -92,7 +92,7 @@ namespace svx
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmTextControlFeature::dispatch: caught an exception!" ); OSL_FAIL( "FmTextControlFeature::dispatch: caught an exception!" );
} }
} }
@ -122,7 +122,7 @@ namespace svx
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmTextControlFeature::dispose: caught an exception!" ); OSL_FAIL( "FmTextControlFeature::dispose: caught an exception!" );
} }
} }

View File

@ -828,7 +828,7 @@ namespace svx
} }
break; break;
default: default:
OSL_ENSURE( sal_False, "FmTextControlShell::executeClipboardSlot: invalid slot!" ); OSL_FAIL( "FmTextControlShell::executeClipboardSlot: invalid slot!" );
} }
return true; return true;
} }

View File

@ -166,7 +166,7 @@ void displayException(const Any& _rExcept, Window* _pParent)
} }
catch(Exception&) catch(Exception&)
{ {
OSL_ENSURE(sal_False, "displayException: could not display the error message!"); OSL_FAIL("displayException: could not display the error message!");
} }
} }

View File

@ -613,7 +613,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
} }
catch(const Exception&) catch(const Exception&)
{ {
OSL_ENSURE(sal_False, "FmXUndoEnvironment::propertyChange: could not adjust the value property!"); OSL_FAIL("FmXUndoEnvironment::propertyChange: could not adjust the value property!");
} }
} }
} }
@ -942,7 +942,7 @@ void FmXUndoEnvironment::switchListening( const Reference< XIndexContainer >& _r
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmXUndoEnvironment::switchListening: caught an exception!" ); OSL_FAIL( "FmXUndoEnvironment::switchListening: caught an exception!" );
} }
} }
@ -977,7 +977,7 @@ void FmXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObje
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmXUndoEnvironment::switchListening: caught an exception!" ); OSL_FAIL( "FmXUndoEnvironment::switchListening: caught an exception!" );
} }
} }
@ -1056,7 +1056,7 @@ void FmUndoPropertyAction::Undo()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmUndoPropertyAction::Undo: caught an exception!" ); OSL_FAIL( "FmUndoPropertyAction::Undo: caught an exception!" );
} }
rEnv.UnLock(); rEnv.UnLock();
} }
@ -1077,7 +1077,7 @@ void FmUndoPropertyAction::Redo()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmUndoPropertyAction::Redo: caught an exception!" ); OSL_FAIL( "FmUndoPropertyAction::Redo: caught an exception!" );
} }
rEnv.UnLock(); rEnv.UnLock();
} }
@ -1239,7 +1239,7 @@ void FmUndoContainerAction::Undo()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmUndoContainerAction::Undo: caught an exception!" ); OSL_FAIL( "FmUndoContainerAction::Undo: caught an exception!" );
} }
rEnv.UnLock(); rEnv.UnLock();
} }
@ -1268,7 +1268,7 @@ void FmUndoContainerAction::Redo()
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FmUndoContainerAction::Redo: caught an exception!" ); OSL_FAIL( "FmUndoContainerAction::Redo: caught an exception!" );
} }
rEnv.UnLock(); rEnv.UnLock();
} }

View File

@ -232,7 +232,7 @@ namespace svxform
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "lcl_getDataSourceIndirectProperties: caught an exception!" ); OSL_FAIL( "lcl_getDataSourceIndirectProperties: caught an exception!" );
} }
return aInfo; return aInfo;
} }

View File

@ -3659,7 +3659,7 @@ Reference< XControl > FormController::locateControl( const Reference< XControlMo
return *pControls; return *pControls;
} }
} }
OSL_ENSURE( sal_False, "FormController::locateControl: did not find a control for this model!" ); OSL_FAIL( "FormController::locateControl: did not find a control for this model!" );
} }
catch( const Exception& ) catch( const Exception& )
{ {
@ -4220,7 +4220,7 @@ void SAL_CALL FormController::addStatusListener( const Reference< XStatusListene
} }
} }
else else
OSL_ENSURE(sal_False, "FormController::addStatusListener: invalid (unsupported) URL!"); OSL_FAIL("FormController::addStatusListener: invalid (unsupported) URL!");
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View File

@ -125,7 +125,7 @@ namespace svx
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OSingleFeatureDispatcher::notifyStatus: caught an exception!" ); OSL_FAIL( "OSingleFeatureDispatcher::notifyStatus: caught an exception!" );
} }
} }
else else
@ -141,12 +141,12 @@ namespace svx
} }
catch( const DisposedException& ) catch( const DisposedException& )
{ {
OSL_ENSURE( sal_False, "OSingleFeatureDispatcher::notifyStatus: caught a DisposedException - removing the listener!" ); OSL_FAIL( "OSingleFeatureDispatcher::notifyStatus: caught a DisposedException - removing the listener!" );
aIter.remove( ); aIter.remove( );
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "OSingleFeatureDispatcher::notifyStatus: caught a generic exception while notifying a single listener!" ); OSL_FAIL( "OSingleFeatureDispatcher::notifyStatus: caught a generic exception while notifying a single listener!" );
} }
} }
} }

View File

@ -82,7 +82,7 @@ namespace svxform
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "FormToolboxes::toggleToolbox: caught an exception!" ); OSL_FAIL( "FormToolboxes::toggleToolbox: caught an exception!" );
} }
} }

View File

@ -257,13 +257,13 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj
} }
catch( embed::NoVisualAreaSizeException& ) catch( embed::NoVisualAreaSizeException& )
{ {
OSL_ENSURE( sal_False, "No visual area size!\n" ); OSL_FAIL( "No visual area size!\n" );
aSz.Width = 5000; aSz.Width = 5000;
aSz.Height = 5000; aSz.Height = 5000;
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Unexpected exception!\n" ); OSL_FAIL( "Unexpected exception!\n" );
aSz.Width = 5000; aSz.Width = 5000;
aSz.Height = 5000; aSz.Height = 5000;
} }
@ -290,7 +290,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Unexpected exception!\n" ); OSL_FAIL( "Unexpected exception!\n" );
} }
} }
} }

View File

@ -211,7 +211,7 @@ SdrUnoObj::~SdrUnoObj()
} }
catch( const uno::Exception& ) catch( const uno::Exception& )
{ {
OSL_ENSURE( sal_False, "SdrUnoObj::~SdrUnoObj: caught an exception!" ); OSL_FAIL( "SdrUnoObj::~SdrUnoObj: caught an exception!" );
} }
delete m_pImpl; delete m_pImpl;
} }

View File

@ -103,7 +103,7 @@ namespace svx
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_ENSURE( sal_False, "ToolboxAccess::toggleToolbox: caught an exception!" ); OSL_FAIL( "ToolboxAccess::toggleToolbox: caught an exception!" );
} }
} }

View File

@ -153,7 +153,7 @@ void SAL_CALL RecoveryUI::dispatch(const css::util::URL&
void SAL_CALL RecoveryUI::addStatusListener(const css::uno::Reference< css::frame::XStatusListener >&, const css::util::URL& ) throw(css::uno::RuntimeException) void SAL_CALL RecoveryUI::addStatusListener(const css::uno::Reference< css::frame::XStatusListener >&, const css::util::URL& ) throw(css::uno::RuntimeException)
{ {
// TODO // TODO
OSL_ENSURE(sal_False, "RecoveryUI::addStatusListener()\nNot implemented yet!"); OSL_FAIL("RecoveryUI::addStatusListener()\nNot implemented yet!");
} }
//=============================================== //===============================================
@ -161,7 +161,7 @@ void SAL_CALL RecoveryUI::removeStatusListener(const css::uno::Reference< css::f
throw(css::uno::RuntimeException) throw(css::uno::RuntimeException)
{ {
// TODO // TODO
OSL_ENSURE(sal_False, "RecoveryUI::removeStatusListener()\nNot implemented yet!"); OSL_FAIL("RecoveryUI::removeStatusListener()\nNot implemented yet!");
} }
//=============================================== //===============================================

View File

@ -167,7 +167,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const ::rtl::OUString& rName, const Sfx
} }
catch( uno::Exception& ) catch( uno::Exception& )
{ {
OSL_ENSURE( sal_False, "Couldn't set the visual area for the object!\n" ); OSL_FAIL( "Couldn't set the visual area for the object!\n" );
} }
} }

View File

@ -74,7 +74,7 @@ if( !m_aCache.hasRow( nRow ) ) \
{ \ { \
if( !m_xFetchProvider.is() ) \ if( !m_xFetchProvider.is() ) \
{ \ { \
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); \ OSL_FAIL( "broadcaster was disposed already" ); \
throw SQLException(); \ throw SQLException(); \
} \ } \
aGuard.clear(); \ aGuard.clear(); \
@ -469,7 +469,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo(
} }
else else
{ {
OSL_ENSURE( sal_False, "The received XPropertySetInfo doesn't contain required properties" ); OSL_FAIL( "The received XPropertySetInfo doesn't contain required properties" );
m_pProperties = new Sequence<Property>; m_pProperties = new Sequence<Property>;
} }
@ -630,7 +630,7 @@ sal_Int32 SAL_CALL CCRS_PropertySetInfo
if( !m_pProperties ) if( !m_pProperties )
{ {
OSL_ENSURE( sal_False, "Properties not initialized yet" ); OSL_FAIL( "Properties not initialized yet" );
return nHandle; return nHandle;
} }
sal_Bool bFound = sal_True; sal_Bool bFound = sal_True;
@ -727,7 +727,7 @@ sal_Bool SAL_CALL CachedContentResultSet
OSL_ENSURE( nRow >= 0, "only positive values supported" ); OSL_ENSURE( nRow >= 0, "only positive values supported" );
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return sal_False; return sal_False;
} }
// OSL_ENSURE( nRow <= m_nKnownCount, "don't step into regions you don't know with this method" ); // OSL_ENSURE( nRow <= m_nKnownCount, "don't step into regions you don't know with this method" );
@ -995,7 +995,7 @@ void SAL_CALL CachedContentResultSet
if( !getPropertySetInfo().is() ) if( !getPropertySetInfo().is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException(); throw UnknownPropertyException();
} }
@ -1086,7 +1086,7 @@ void SAL_CALL CachedContentResultSet
osl::Guard< osl::Mutex > aGuard( m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_aMutex );
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return; return;
} }
} }
@ -1106,7 +1106,7 @@ Any SAL_CALL CachedContentResultSet
if( !getPropertySetInfo().is() ) if( !getPropertySetInfo().is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException(); throw UnknownPropertyException();
} }
@ -1145,7 +1145,7 @@ Any SAL_CALL CachedContentResultSet
osl::Guard< osl::Mutex > aGuard( m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_aMutex );
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException(); throw UnknownPropertyException();
} }
} }
@ -1204,7 +1204,7 @@ void SAL_CALL CachedContentResultSet
sal_Int32 nNew = 0; sal_Int32 nNew = 0;
if( !( aEvt.NewValue >>= nNew ) ) if( !( aEvt.NewValue >>= nNew ) )
{ {
OSL_ENSURE( sal_False, "PropertyChangeEvent contains wrong data" ); OSL_FAIL( "PropertyChangeEvent contains wrong data" );
return; return;
} }
@ -1218,7 +1218,7 @@ void SAL_CALL CachedContentResultSet
sal_Bool bNew = sal_False; sal_Bool bNew = sal_False;
if( !( aEvt.NewValue >>= bNew ) ) if( !( aEvt.NewValue >>= bNew ) )
{ {
OSL_ENSURE( sal_False, "PropertyChangeEvent contains wrong data" ); OSL_FAIL( "PropertyChangeEvent contains wrong data" );
return; return;
} }
impl_changeIsRowCountFinal( m_bFinalCount, bNew ); impl_changeIsRowCountFinal( m_bFinalCount, bNew );
@ -1270,7 +1270,7 @@ if( !m_aCache##XXX.hasRow( nRow ) ) \
{ \ { \
if( !m_xFetchProviderForContentAccess.is() ) \ if( !m_xFetchProviderForContentAccess.is() ) \
{ \ { \
OSL_ENSURE( sal_False, "broadcaster was disposed already" );\ OSL_FAIL( "broadcaster was disposed already" );\
throw RuntimeException(); \ throw RuntimeException(); \
} \ } \
aGuard.clear(); \ aGuard.clear(); \
@ -1423,7 +1423,7 @@ sal_Bool SAL_CALL CachedContentResultSet
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return sal_False; return sal_False;
} }
if( row < 0 ) if( row < 0 )
@ -1635,7 +1635,7 @@ sal_Bool SAL_CALL CachedContentResultSet
//unknown position //unknown position
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return sal_False; return sal_False;
} }
aGuard.clear(); aGuard.clear();
@ -1713,7 +1713,7 @@ sal_Bool SAL_CALL CachedContentResultSet
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return sal_False; return sal_False;
} }
aGuard.clear(); aGuard.clear();
@ -1748,7 +1748,7 @@ sal_Bool SAL_CALL CachedContentResultSet
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return sal_False; return sal_False;
} }
aGuard.clear(); aGuard.clear();
@ -1922,7 +1922,7 @@ sal_Bool SAL_CALL CachedContentResultSet
return m_bLastCachedReadWasNull; return m_bLastCachedReadWasNull;
if( !m_xRowOrigin.is() ) if( !m_xRowOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return sal_False; return sal_False;
} }
} }
@ -2078,7 +2078,7 @@ Any SAL_CALL CachedContentResultSet
{ {
if( !m_xFetchProvider.is() ) if( !m_xFetchProvider.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return Any(); return Any();
} }
aGuard.clear(); aGuard.clear();

View File

@ -187,7 +187,7 @@ XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSetStub,
impl_EnsureNotDisposed(); \ impl_EnsureNotDisposed(); \
if( !m_xResultSetOrigin.is() ) \ if( !m_xResultSetOrigin.is() ) \
{ \ { \
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); \ OSL_FAIL( "broadcaster was disposed already" ); \
throw RuntimeException(); \ throw RuntimeException(); \
} \ } \
impl_propagateFetchSizeAndDirection( nRowCount, bDirection ); \ impl_propagateFetchSizeAndDirection( nRowCount, bDirection ); \
@ -325,7 +325,7 @@ sal_Int32 SAL_CALL CachedContentResultSetStub
} }
catch( SQLException& ) catch( SQLException& )
{ {
OSL_ENSURE( sal_False, "couldn't determine the column count" ); OSL_FAIL( "couldn't determine the column count" );
nCount = 0; nCount = 0;
} }
} }

View File

@ -327,7 +327,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
impl_init_xPropertySetOrigin(); impl_init_xPropertySetOrigin();
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
m_nForwardOnly = 0; m_nForwardOnly = 0;
return m_nForwardOnly; return m_nForwardOnly;
} }
@ -388,7 +388,7 @@ void SAL_CALL ContentResultSetWrapper
} }
catch( Exception& ) catch( Exception& )
{ {
OSL_ENSURE( sal_False, "could not remove PropertyChangeListener" ); OSL_FAIL( "could not remove PropertyChangeListener" );
} }
try try
{ {
@ -397,7 +397,7 @@ void SAL_CALL ContentResultSetWrapper
} }
catch( Exception& ) catch( Exception& )
{ {
OSL_ENSURE( sal_False, "could not remove VetoableChangeListener" ); OSL_FAIL( "could not remove VetoableChangeListener" );
} }
Reference< XComponent > xComponentOrigin( m_xResultSetOrigin, UNO_QUERY ); Reference< XComponent > xComponentOrigin( m_xResultSetOrigin, UNO_QUERY );
@ -545,7 +545,7 @@ void SAL_CALL ContentResultSetWrapper
impl_init_xPropertySetOrigin(); impl_init_xPropertySetOrigin();
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException(); throw UnknownPropertyException();
} }
m_xPropertySetOrigin->setPropertyValue( rPropertyName, rValue ); m_xPropertySetOrigin->setPropertyValue( rPropertyName, rValue );
@ -563,7 +563,7 @@ Any SAL_CALL ContentResultSetWrapper
impl_init_xPropertySetOrigin(); impl_init_xPropertySetOrigin();
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException(); throw UnknownPropertyException();
} }
return m_xPropertySetOrigin->getPropertyValue( rPropertyName ); return m_xPropertySetOrigin->getPropertyValue( rPropertyName );
@ -583,7 +583,7 @@ void SAL_CALL ContentResultSetWrapper
if( !getPropertySetInfo().is() ) if( !getPropertySetInfo().is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException(); throw UnknownPropertyException();
} }
@ -604,7 +604,7 @@ void SAL_CALL ContentResultSetWrapper
osl::Guard< osl::Mutex > aGuard( m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_aMutex );
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return; return;
} }
} }
@ -635,7 +635,7 @@ void SAL_CALL ContentResultSetWrapper
if( !getPropertySetInfo().is() ) if( !getPropertySetInfo().is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw UnknownPropertyException(); throw UnknownPropertyException();
} }
if( rPropertyName.getLength() ) if( rPropertyName.getLength() )
@ -655,7 +655,7 @@ void SAL_CALL ContentResultSetWrapper
osl::Guard< osl::Mutex > aGuard( m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_aMutex );
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return; return;
} }
} }
@ -715,7 +715,7 @@ void SAL_CALL ContentResultSetWrapper
osl::Guard< osl::Mutex > aGuard( m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_aMutex );
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return; return;
} }
} }
@ -726,7 +726,7 @@ void SAL_CALL ContentResultSetWrapper
} }
catch( Exception& ) catch( Exception& )
{ {
OSL_ENSURE( sal_False, "could not remove PropertyChangeListener" ); OSL_FAIL( "could not remove PropertyChangeListener" );
} }
} }
} }
@ -774,7 +774,7 @@ void SAL_CALL ContentResultSetWrapper
osl::Guard< osl::Mutex > aGuard( m_aMutex ); osl::Guard< osl::Mutex > aGuard( m_aMutex );
if( !m_xPropertySetOrigin.is() ) if( !m_xPropertySetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
return; return;
} }
} }
@ -785,7 +785,7 @@ void SAL_CALL ContentResultSetWrapper
} }
catch( Exception& ) catch( Exception& )
{ {
OSL_ENSURE( sal_False, "could not remove VetoableChangeListener" ); OSL_FAIL( "could not remove VetoableChangeListener" );
} }
} }
} }
@ -860,7 +860,7 @@ OUString SAL_CALL ContentResultSetWrapper
impl_init_xContentAccessOrigin(); impl_init_xContentAccessOrigin();
if( !m_xContentAccessOrigin.is() ) if( !m_xContentAccessOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xContentAccessOrigin->queryContentIdentifierString(); return m_xContentAccessOrigin->queryContentIdentifierString();
@ -876,7 +876,7 @@ Reference< XContentIdentifier > SAL_CALL ContentResultSetWrapper
impl_init_xContentAccessOrigin(); impl_init_xContentAccessOrigin();
if( !m_xContentAccessOrigin.is() ) if( !m_xContentAccessOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xContentAccessOrigin->queryContentIdentifier(); return m_xContentAccessOrigin->queryContentIdentifier();
@ -892,7 +892,7 @@ Reference< XContent > SAL_CALL ContentResultSetWrapper
impl_init_xContentAccessOrigin(); impl_init_xContentAccessOrigin();
if( !m_xContentAccessOrigin.is() ) if( !m_xContentAccessOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xContentAccessOrigin->queryContent(); return m_xContentAccessOrigin->queryContent();
@ -912,7 +912,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->next(); return m_xResultSetOrigin->next();
@ -928,7 +928,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->previous(); return m_xResultSetOrigin->previous();
@ -944,7 +944,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->absolute( row ); return m_xResultSetOrigin->absolute( row );
@ -960,7 +960,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->relative( rows ); return m_xResultSetOrigin->relative( rows );
@ -977,7 +977,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->first(); return m_xResultSetOrigin->first();
@ -993,7 +993,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->last(); return m_xResultSetOrigin->last();
@ -1009,7 +1009,7 @@ void SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
m_xResultSetOrigin->beforeFirst(); m_xResultSetOrigin->beforeFirst();
@ -1025,7 +1025,7 @@ void SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
m_xResultSetOrigin->afterLast(); m_xResultSetOrigin->afterLast();
@ -1041,7 +1041,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->isAfterLast(); return m_xResultSetOrigin->isAfterLast();
@ -1057,7 +1057,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->isBeforeFirst(); return m_xResultSetOrigin->isBeforeFirst();
@ -1073,7 +1073,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->isFirst(); return m_xResultSetOrigin->isFirst();
@ -1089,7 +1089,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->isLast(); return m_xResultSetOrigin->isLast();
@ -1106,7 +1106,7 @@ sal_Int32 SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->getRow(); return m_xResultSetOrigin->getRow();
@ -1122,7 +1122,7 @@ void SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
m_xResultSetOrigin->refreshRow(); m_xResultSetOrigin->refreshRow();
@ -1138,7 +1138,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->rowUpdated(); return m_xResultSetOrigin->rowUpdated();
@ -1153,7 +1153,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->rowInserted(); return m_xResultSetOrigin->rowInserted();
@ -1169,7 +1169,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
if( !m_xResultSetOrigin.is() ) if( !m_xResultSetOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xResultSetOrigin->rowDeleted(); return m_xResultSetOrigin->rowDeleted();
@ -1195,7 +1195,7 @@ impl_EnsureNotDisposed(); \
impl_init_xRowOrigin(); \ impl_init_xRowOrigin(); \
if( !m_xRowOrigin.is() ) \ if( !m_xRowOrigin.is() ) \
{ \ { \
OSL_ENSURE( sal_False, "broadcaster was disposed already" );\ OSL_FAIL( "broadcaster was disposed already" );\
throw RuntimeException(); \ throw RuntimeException(); \
} \ } \
return m_xRowOrigin->getXXX( columnIndex ); return m_xRowOrigin->getXXX( columnIndex );
@ -1210,7 +1210,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper
impl_init_xRowOrigin(); impl_init_xRowOrigin();
if( !m_xRowOrigin.is() ) if( !m_xRowOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xRowOrigin->wasNull(); return m_xRowOrigin->wasNull();
@ -1359,7 +1359,7 @@ Any SAL_CALL ContentResultSetWrapper
impl_init_xRowOrigin(); impl_init_xRowOrigin();
if( !m_xRowOrigin.is() ) if( !m_xRowOrigin.is() )
{ {
OSL_ENSURE( sal_False, "broadcaster was disposed already" ); OSL_FAIL( "broadcaster was disposed already" );
throw RuntimeException(); throw RuntimeException();
} }
return m_xRowOrigin->getObject( columnIndex, typeMap ); return m_xRowOrigin->getObject( columnIndex, typeMap );

View File

@ -276,7 +276,7 @@ void SAL_CALL DynamicResultSetWrapper
} }
else else
{ {
OSL_ENSURE( sal_False, "ListActionType was WELCOME but ActionInfo didn't contain a WelcomeDynamicResultSetStruct" ); OSL_FAIL( "ListActionType was WELCOME but ActionInfo didn't contain a WelcomeDynamicResultSetStruct" );
//throw RuntimeException(); //throw RuntimeException();
} }
break; break;
@ -444,7 +444,7 @@ void SAL_CALL DynamicResultSetWrapper
return; return;
} }
} }
OSL_ENSURE( sal_False, "could not connect to cache" ); OSL_FAIL( "could not connect to cache" );
throw ServiceNotFoundException(); throw ServiceNotFoundException();
} }

View File

@ -257,8 +257,7 @@ sal_Int32 SAL_CALL UcbContentProviderProxy::compareContentIds(
if ( xProvider.is() ) if ( xProvider.is() )
return xProvider->compareContentIds( Id1, Id2 ); return xProvider->compareContentIds( Id1, Id2 );
// OSL_ENSURE( sal_False, // OSL_FAIL( // "UcbContentProviderProxy::compareContentIds - No provider!" );
// "UcbContentProviderProxy::compareContentIds - No provider!" );
// @@@ What else? // @@@ What else?
return 0; return 0;
@ -320,8 +319,7 @@ UcbContentProviderProxy::deregisterInstance( const OUString& Template,
} }
catch ( IllegalIdentifierException const & ) catch ( IllegalIdentifierException const & )
{ {
OSL_ENSURE( sal_False, OSL_FAIL( "UcbContentProviderProxy::deregisterInstance - "
"UcbContentProviderProxy::deregisterInstance - "
"Caught IllegalIdentifierException!" ); "Caught IllegalIdentifierException!" );
} }
} }
@ -383,8 +381,7 @@ UcbContentProviderProxy::getContentProvider()
} }
catch ( IllegalIdentifierException const & ) catch ( IllegalIdentifierException const & )
{ {
OSL_ENSURE( sal_False, OSL_FAIL( "UcbContentProviderProxy::getContentProvider - "
"UcbContentProviderProxy::getContentProvider - "
"Caught IllegalIdentifierException!" ); "Caught IllegalIdentifierException!" );
} }

Some files were not shown because too many files have changed in this diff Show More