diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:09:49 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:09:49 +0100 |
commit | 7c66790faa8491c0d28c6cde38ea08c054ec59b5 (patch) | |
tree | 2e17489dadc6f885e7842b1cbcc3a1d05416bca7 /sfx2/source/doc | |
parent | dfa833215b5ad25790ed4827353cbd4fde42e663 (diff) |
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'sfx2/source/doc')
-rwxr-xr-x | sfx2/source/doc/docfile.cxx | 16 | ||||
-rwxr-xr-x | sfx2/source/doc/docmacromode.cxx | 2 | ||||
-rwxr-xr-x | sfx2/source/doc/guisaveas.cxx | 4 | ||||
-rwxr-xr-x | sfx2/source/doc/objserv.cxx | 2 | ||||
-rwxr-xr-x | sfx2/source/doc/objstor.cxx | 10 | ||||
-rwxr-xr-x | sfx2/source/doc/sfxbasemodel.cxx | 6 |
6 files changed, 20 insertions, 20 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index e2f1e1d1e0..6c096706e9 100755 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -892,7 +892,7 @@ void SfxMedium::SetEncryptionDataToStorage_Impl() } 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 // 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& ) { - 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; } @@ -1443,7 +1443,7 @@ uno::Reference< embed::XStorage > SfxMedium::GetZipStorageToSign_Impl( sal_Bool } 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 @@ -1480,7 +1480,7 @@ void SfxMedium::CloseStorage() xComp->dispose(); } 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 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) ) ) @@ -2944,7 +2944,7 @@ SfxMedium::SfxMedium( const ::com::sun::star::uno::Sequence< ::com::sun::star::b } 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& ) { - OSL_ENSURE( sal_False, "Couldn't use signing functionality!\n" ); + OSL_FAIL( "Couldn't use signing functionality!\n" ); } CloseAndRelease(); @@ -3613,7 +3613,7 @@ sal_Bool SfxMedium::SignContents_Impl( sal_Bool bScriptingContent, const ::rtl:: } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "Couldn't use signing functionality!\n" ); + OSL_FAIL( "Couldn't use signing functionality!\n" ); } } } diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index c57b048816..eda8f50a12 100755 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -211,7 +211,7 @@ namespace sfx2 nMacroExecutionMode = MacroExecMode::ALWAYS_EXECUTE_NO_WARN; break; default: - OSL_ENSURE( sal_False, "DocumentMacroMode::adjustMacroMode: unexpected macro security level!" ); + OSL_FAIL( "DocumentMacroMode::adjustMacroMode: unexpected macro security level!" ); nMacroExecutionMode = MacroExecMode::NEVER_EXECUTE; } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 8a8b2ea77e..45e8683fcb 100755 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1407,13 +1407,13 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& } 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(); } } 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(); } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 65514d6f22..ab8c6a5e19 100755 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -227,7 +227,7 @@ sal_Bool SfxInstanceCloseGuard_Impl::Init_Impl( const uno::Reference< util::XClo } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "Could not register close listener!\n" ); + OSL_FAIL( "Could not register close listener!\n" ); } } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index b725676182..67bd10747a 100755 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -173,7 +173,7 @@ void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel >& } 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& ) { - OSL_ENSURE( sal_False, "Can't check storage's mediatype!\n" ); + OSL_FAIL( "Can't check storage's mediatype!\n" ); } } else @@ -1412,7 +1412,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl xMedStorage ) ) { // 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; 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 ); } @@ -3410,7 +3410,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed:: } catch( uno::Exception& ) { - OSL_ENSURE( sal_False, "Cant check storage consistency!\n" ); + OSL_FAIL( "Cant check storage consistency!\n" ); } return sal_True; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 9b993f2268..76e6b127f9 100755 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -408,7 +408,7 @@ SfxOwnFramesLocker::SfxOwnFramesLocker( SfxObjectShell* pObjectShell ) } 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& ) { - 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 { - OSL_ENSURE( sal_False, "Unexpected scenario!\n" ); + OSL_FAIL( "Unexpected scenario!\n" ); } } |