diff options
Diffstat (limited to 'ucb/source/ucp/tdoc')
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_content.cxx | 72 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_datasupplier.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_provider.cxx | 39 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_stgelems.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_storage.cxx | 23 |
6 files changed, 72 insertions, 78 deletions
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index 1c0634b79acf..cc859e623dae 100644 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -2460,13 +2460,13 @@ bool Content::loadData( ContentProvider* pProvider, catch ( lang::IllegalArgumentException const & ) { // an illegal argument is provided - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); return false; } catch ( embed::InvalidStorageException const & ) { // this storage is in invalid state for any reason - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); return false; } } @@ -2485,7 +2485,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, ContentType eType = m_aProps.getType(); if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { - OSL_ENSURE( false, "storeData not supported by root and documents!" ); + OSL_FAIL( "storeData not supported by root and documents!" ); return false; } @@ -2519,22 +2519,22 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, } catch ( beans::UnknownPropertyException const & ) { - OSL_ENSURE( false, "Property MediaType not supported!" ); + OSL_FAIL( "Property MediaType not supported!" ); return false; } catch ( beans::PropertyVetoException const & ) { - OSL_ENSURE( false, "Caught PropertyVetoException!" ); + OSL_FAIL( "Caught PropertyVetoException!" ); return false; } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); return false; } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( false, "Caught WrappedTargetException!" ); + OSL_FAIL( "Caught WrappedTargetException!" ); return false; } @@ -2580,21 +2580,21 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, catch ( io::NotConnectedException const & ) { // readSomeBytes, writeBytes - OSL_ENSURE( false, "Caught NotConnectedException!" ); + OSL_FAIL( "Caught NotConnectedException!" ); closeOutputStream( xOut ); return false; } catch ( io::BufferSizeExceededException const & ) { // readSomeBytes, writeBytes - OSL_ENSURE( false, "Caught BufferSizeExceededException!" ); + OSL_FAIL( "Caught BufferSizeExceededException!" ); closeOutputStream( xOut ); return false; } catch ( io::IOException const & ) { // readSomeBytes, writeBytes - OSL_ENSURE( false, "Caught IOException!" ); + OSL_FAIL( "Caught IOException!" ); closeOutputStream( xOut ); return false; } @@ -2611,7 +2611,7 @@ bool Content::storeData( const uno::Reference< io::XInputStream >& xData, } else { - OSL_ENSURE( false, "Unknown content type!" ); + OSL_FAIL( "Unknown content type!" ); return false; } return true; @@ -2627,7 +2627,7 @@ bool Content::renameData( ContentType eType = m_aProps.getType(); if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { - OSL_ENSURE( false, "renameData not supported by root and documents!" ); + OSL_FAIL( "renameData not supported by root and documents!" ); return false; } @@ -2648,37 +2648,37 @@ bool Content::renameData( catch ( embed::InvalidStorageException const & ) { // this storage is in invalid state for eny reason - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); return false; } catch ( lang::IllegalArgumentException const & ) { // an illegal argument is provided - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); return false; } catch ( container::NoSuchElementException const & ) { // there is no element with old name in this storage - OSL_ENSURE( false, "Caught NoSuchElementException!" ); + OSL_FAIL( "Caught NoSuchElementException!" ); return false; } catch ( container::ElementExistException const & ) { // an element with new name already exists in this storage - OSL_ENSURE( false, "Caught ElementExistException!" ); + OSL_FAIL( "Caught ElementExistException!" ); return false; } catch ( io::IOException const & ) { // in case of io errors during renaming - OSL_ENSURE( false, "Caught IOException!" ); + OSL_FAIL( "Caught IOException!" ); return false; } catch ( embed::StorageWrappedTargetException const & ) { // wraps other exceptions - OSL_ENSURE( false, "Caught StorageWrappedTargetException!" ); + OSL_FAIL( "Caught StorageWrappedTargetException!" ); return false; } @@ -2693,7 +2693,7 @@ bool Content::removeData() ContentType eType = m_aProps.getType(); if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { - OSL_ENSURE( false, "removeData not supported by root and documents!" ); + OSL_FAIL( "removeData not supported by root and documents!" ); return false; } @@ -2712,31 +2712,31 @@ bool Content::removeData() catch ( embed::InvalidStorageException const & ) { // this storage is in invalid state for eny reason - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); return false; } catch ( lang::IllegalArgumentException const & ) { // an illegal argument is provided - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); return false; } catch ( container::NoSuchElementException const & ) { // there is no element with this name in this storage - OSL_ENSURE( false, "Caught NoSuchElementException!" ); + OSL_FAIL( "Caught NoSuchElementException!" ); return false; } catch ( io::IOException const & ) { // in case of io errors during renaming - OSL_ENSURE( false, "Caught IOException!" ); + OSL_FAIL( "Caught IOException!" ); return false; } catch ( embed::StorageWrappedTargetException const & ) { // wraps other exceptions - OSL_ENSURE( false, "Caught StorageWrappedTargetException!" ); + OSL_FAIL( "Caught StorageWrappedTargetException!" ); return false; } @@ -2751,7 +2751,7 @@ bool Content::copyData( const Uri & rSourceUri, const rtl::OUString & rNewName ) ContentType eType = m_aProps.getType(); if ( ( eType == ROOT ) || ( eType == STREAM ) ) { - OSL_ENSURE( false, "copyData not supported by root and streams!" ); + OSL_FAIL( "copyData not supported by root and streams!" ); return false; } @@ -2777,37 +2777,37 @@ bool Content::copyData( const Uri & rSourceUri, const rtl::OUString & rNewName ) catch ( embed::InvalidStorageException const & ) { // this storage is in invalid state for eny reason - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); return false; } catch ( lang::IllegalArgumentException const & ) { // an illegal argument is provided - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); return false; } catch ( container::NoSuchElementException const & ) { // there is no element with this name in this storage - OSL_ENSURE( false, "Caught NoSuchElementException!" ); + OSL_FAIL( "Caught NoSuchElementException!" ); return false; } catch ( container::ElementExistException const & ) { // there is no element with this name in this storage - OSL_ENSURE( false, "Caught ElementExistException!" ); + OSL_FAIL( "Caught ElementExistException!" ); return false; } catch ( io::IOException const & ) { // in case of io errors during renaming - OSL_ENSURE( false, "Caught IOException!" ); + OSL_FAIL( "Caught IOException!" ); return false; } catch ( embed::StorageWrappedTargetException const & ) { // wraps other exceptions - OSL_ENSURE( false, "Caught StorageWrappedTargetException!" ); + OSL_FAIL( "Caught StorageWrappedTargetException!" ); return false; } @@ -2829,12 +2829,12 @@ bool Content::commitStorage( const uno::Reference< embed::XStorage > & xStorage } catch ( io::IOException const & ) { - OSL_ENSURE( false, "Caught IOException!" ); + OSL_FAIL( "Caught IOException!" ); return false; } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( false, "Caught WrappedTargetException!" ); + OSL_FAIL( "Caught WrappedTargetException!" ); return false; } @@ -2855,15 +2855,15 @@ bool Content::closeOutputStream( } catch ( io::NotConnectedException const & ) { - OSL_ENSURE( false, "Caught NotConnectedException!" ); + OSL_FAIL( "Caught NotConnectedException!" ); } catch ( io::BufferSizeExceededException const & ) { - OSL_ENSURE( false, "Caught BufferSizeExceededException!" ); + OSL_FAIL( "Caught BufferSizeExceededException!" ); } catch ( io::IOException const & ) { - OSL_ENSURE( false, "Caught IOException!" ); + OSL_FAIL( "Caught IOException!" ); } } return false; diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index 319e2c8ad101..a3472dfd92e0 100644 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx @@ -440,7 +440,7 @@ bool ResultSetDataSupplier::queryNamesOfChildren() m_pImpl->m_xContent->getIdentifier()->getContentIdentifier(), *pNamesOfChildren ) ) { - OSL_ENSURE( false, "Got no list of children!" ); + OSL_FAIL( "Got no list of children!" ); m_pImpl->m_bThrowException = sal_True; return false; } diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 7f32ed943e14..c8a036378d08 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -118,7 +118,7 @@ getDocumentId( const uno::Reference< uno::XInterface > & xDoc ) } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( false, "Caught WrappedTargetException!" ); + OSL_FAIL( "Caught WrappedTargetException!" ); } } @@ -645,11 +645,11 @@ bool OfficeDocumentsManager::isBasicIDE( } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); } catch ( frame::UnknownModuleException const & ) { - OSL_ENSURE( false, "Caught UnknownModuleException!" ); + OSL_FAIL( "Caught UnknownModuleException!" ); } if ( aModule.getLength() > 0 ) diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx index 408cf216cdac..810582cc6f76 100644 --- a/ucb/source/ucp/tdoc/tdoc_provider.cxx +++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx @@ -345,11 +345,11 @@ ContentProvider::queryStorage( const rtl::OUString & rUri, } catch ( embed::InvalidStorageException const & ) { - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); } catch ( io::IOException const & ) { @@ -358,7 +358,7 @@ ContentProvider::queryStorage( const rtl::OUString & rUri, } catch ( embed::StorageWrappedTargetException const & ) { - OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" ); + OSL_FAIL( "Caught embed::StorageWrappedTargetException!" ); } } return uno::Reference< embed::XStorage >(); @@ -384,11 +384,11 @@ ContentProvider::queryStorageClone( const rtl::OUString & rUri ) const } catch ( embed::InvalidStorageException const & ) { - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); } catch ( io::IOException const & ) { @@ -397,7 +397,7 @@ ContentProvider::queryStorageClone( const rtl::OUString & rUri ) const } catch ( embed::StorageWrappedTargetException const & ) { - OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" ); + OSL_FAIL( "Caught embed::StorageWrappedTargetException!" ); } } @@ -418,19 +418,19 @@ ContentProvider::queryInputStream( const rtl::OUString & rUri, } catch ( embed::InvalidStorageException const & ) { - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); } catch ( io::IOException const & ) { - OSL_ENSURE( false, "Caught IOException!" ); + OSL_FAIL( "Caught IOException!" ); } catch ( embed::StorageWrappedTargetException const & ) { - OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" ); + OSL_FAIL( "Caught embed::StorageWrappedTargetException!" ); } // catch ( packages::WrongPasswordException const & ) // { @@ -457,11 +457,11 @@ ContentProvider::queryOutputStream( const rtl::OUString & rUri, } catch ( embed::InvalidStorageException const & ) { - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); } catch ( io::IOException const & ) { @@ -470,7 +470,7 @@ ContentProvider::queryOutputStream( const rtl::OUString & rUri, } catch ( embed::StorageWrappedTargetException const & ) { - OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" ); + OSL_FAIL( "Caught embed::StorageWrappedTargetException!" ); } // catch ( packages::WrongPasswordException const & ) // { @@ -496,11 +496,11 @@ ContentProvider::queryStream( const rtl::OUString & rUri, } catch ( embed::InvalidStorageException const & ) { - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); } catch ( io::IOException const & ) { @@ -509,7 +509,7 @@ ContentProvider::queryStream( const rtl::OUString & rUri, } catch ( embed::StorageWrappedTargetException const & ) { - OSL_ENSURE( false, "Caught embed::StorageWrappedTargetException!" ); + OSL_FAIL( "Caught embed::StorageWrappedTargetException!" ); } // catch ( packages::WrongPasswordException const & ) // { @@ -560,11 +560,11 @@ bool ContentProvider::queryNamesOfChildren( } catch ( embed::InvalidStorageException const & ) { - OSL_ENSURE( false, "Caught InvalidStorageException!" ); + OSL_FAIL( "Caught InvalidStorageException!" ); } catch ( lang::IllegalArgumentException const & ) { - OSL_ENSURE( false, "Caught IllegalArgumentException!" ); + OSL_FAIL( "Caught IllegalArgumentException!" ); } catch ( io::IOException const & ) { @@ -573,8 +573,7 @@ bool ContentProvider::queryNamesOfChildren( } catch ( embed::StorageWrappedTargetException const & ) { - OSL_ENSURE( false, - "Caught embed::StorageWrappedTargetException!" ); + OSL_FAIL( "Caught embed::StorageWrappedTargetException!" ); } } } diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx index 86bb91d15d71..104d66fa4908 100644 --- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx +++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx @@ -111,7 +111,7 @@ Storage::Storage( const uno::Reference< lang::XMultiServiceFactory > & xSMgr, } catch ( uno::Exception const & ) { - OSL_ENSURE( false, "Storage::Storage: Caught exception!" ); + OSL_FAIL( "Storage::Storage: Caught exception!" ); } OSL_ENSURE( m_xAggProxy.is(), @@ -157,7 +157,7 @@ Storage::~Storage() } catch ( ... ) { - OSL_ENSURE( false, "Storage::~Storage - Caught exception!" ); + OSL_FAIL( "Storage::~Storage - Caught exception!" ); } } } @@ -620,7 +620,7 @@ OutputStream::OutputStream( } catch ( uno::Exception const & ) { - OSL_ENSURE( false, "OutputStream::OutputStream: Caught exception!" ); + OSL_FAIL( "OutputStream::OutputStream: Caught exception!" ); } OSL_ENSURE( m_xAggProxy.is(), @@ -821,7 +821,7 @@ Stream::Stream( } catch ( uno::Exception const & ) { - OSL_ENSURE( false, "OutputStream::OutputStream: Caught exception!" ); + OSL_FAIL( "OutputStream::OutputStream: Caught exception!" ); } OSL_ENSURE( m_xAggProxy.is(), diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx index 42451a53ed4e..346dec1ce73b 100644 --- a/ucb/source/ucp/tdoc/tdoc_storage.cxx +++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx @@ -311,8 +311,7 @@ StorageElementFactory::createOutputStream( const rtl::OUString & rUri, // Each stream must have a parent storage. if ( !xParentStorage.is() ) { - OSL_ENSURE( false, - "StorageElementFactory::createOutputStream - " + OSL_FAIL( "StorageElementFactory::createOutputStream - " "Unable to create parent storage!" ); return uno::Reference< io::XOutputStream >(); } @@ -323,8 +322,7 @@ StorageElementFactory::createOutputStream( const rtl::OUString & rUri, if ( !xStream.is() ) { - OSL_ENSURE( false, - "StorageElementFactory::createOutputStream - " + OSL_FAIL( "StorageElementFactory::createOutputStream - " "Unable to create stream!" ); return uno::Reference< io::XOutputStream >(); } @@ -359,8 +357,7 @@ StorageElementFactory::createStream( const rtl::OUString & rUri, // Each stream must have a parent storage. if ( !xParentStorage.is() ) { - OSL_ENSURE( false, - "StorageElementFactory::createStream - " + OSL_FAIL( "StorageElementFactory::createStream - " "Unable to create parent storage!" ); return uno::Reference< io::XStream >(); } @@ -371,8 +368,7 @@ StorageElementFactory::createStream( const rtl::OUString & rUri, if ( !xStream.is() ) { - OSL_ENSURE( false, - "StorageElementFactory::createStream - " + OSL_FAIL( "StorageElementFactory::createStream - " "Unable to create stream!" ); return uno::Reference< io::XStream >(); } @@ -502,8 +498,8 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage( } else { - OSL_ENSURE( - false, "Bug! Value of property OpenMode has wrong type!" ); + OSL_FAIL( + "Bug! Value of property OpenMode has wrong type!" ); throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -513,7 +509,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage( } catch ( beans::UnknownPropertyException const & e ) { - OSL_ENSURE( false, "Property OpenMode not supported!" ); + OSL_FAIL( "Property OpenMode not supported!" ); throw embed::StorageWrappedTargetException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -523,7 +519,7 @@ uno::Reference< embed::XStorage > StorageElementFactory::queryStorage( } catch ( lang::WrappedTargetException const & e ) { - OSL_ENSURE( false, "Caught WrappedTargetException!" ); + OSL_FAIL( "Caught WrappedTargetException!" ); throw embed::StorageWrappedTargetException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( @@ -643,8 +639,7 @@ StorageElementFactory::queryStream( break; default: - OSL_ENSURE( false, - "StorageElementFactory::queryStream : Unknown open mode!" ); + OSL_FAIL( "StorageElementFactory::queryStream : Unknown open mode!" ); throw embed::InvalidStorageException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( |