diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-12 11:29:14 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-12 14:12:11 +0100 |
commit | 1eaec2e1b03631b14ebc16b5c8356db17bc1e013 (patch) | |
tree | 9a504d9d2f88ee4738d94fe2f5e7dfcc2ef06929 /extensions | |
parent | a2cd4b24d26270db92ed337568f568b457ba33aa (diff) |
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/config/ldap/ldapaccess.cxx | 2 | ||||
-rw-r--r-- | extensions/source/logging/filehandler.cxx | 2 | ||||
-rw-r--r-- | extensions/source/plugin/aqua/sysplug.cxx | 4 | ||||
-rw-r--r-- | extensions/source/plugin/win/sysplug.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/composeduiupdate.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 12 | ||||
-rw-r--r-- | extensions/source/propctrlr/formgeometryhandler.cxx | 10 | ||||
-rw-r--r-- | extensions/source/propctrlr/genericpropertyhandler.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/propcontroller.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/propertycomposer.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/stringrepresentation.cxx | 4 | ||||
-rw-r--r-- | extensions/source/resource/oooresourceloader.cxx | 4 | ||||
-rw-r--r-- | extensions/source/update/check/updatehdl.cxx | 14 | ||||
-rw-r--r-- | extensions/source/update/check/updateprotocol.cxx | 4 |
15 files changed, 39 insertions, 39 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index a38638f16..babd1e70f 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -269,7 +269,7 @@ void LdapConnection::initConnection() } else { - OSL_ENSURE( false, "LdapConnection::findUserDn-could not get DN for User "); + OSL_FAIL( "LdapConnection::findUserDn-could not get DN for User "); } return userDn ; diff --git a/extensions/source/logging/filehandler.cxx b/extensions/source/logging/filehandler.cxx index beeccbb74..ca35aad37 100644 --- a/extensions/source/logging/filehandler.cxx +++ b/extensions/source/logging/filehandler.cxx @@ -208,7 +208,7 @@ namespace logging sMessage.append( ::rtl::OString( m_sFileURL.getStr(), m_sFileURL.getLength(), osl_getThreadTextEncoding() ) ); sMessage.append( "\nerror code: " ); sMessage.append( (sal_Int32)res ); - OSL_ENSURE( false, sMessage.makeStringAndClear() ); + OSL_FAIL( sMessage.makeStringAndClear() ); } #endif if ( m_eFileValidity == eValid ) diff --git a/extensions/source/plugin/aqua/sysplug.cxx b/extensions/source/plugin/aqua/sysplug.cxx index 98ca8414c..d43d6ab5f 100644 --- a/extensions/source/plugin/aqua/sysplug.cxx +++ b/extensions/source/plugin/aqua/sysplug.cxx @@ -488,11 +488,11 @@ long MacPluginComm::doIt() break; case eNPP_Initialize: TRACE( "eNPP_Initialize" ); - OSL_ENSURE( false, "NPP_Initialize: not implemented!" ); + OSL_FAIL( "NPP_Initialize: not implemented!" ); break; case eNPP_GetJavaClass: TRACE( "eNPP_GetJavaClass" ); - OSL_ENSURE( false, "NPP_GetJavaClass: not implemented!" ); + OSL_FAIL( "NPP_GetJavaClass: not implemented!" ); break; } return nRet; diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx index d5b49340e..1ed9f1880 100644 --- a/extensions/source/plugin/win/sysplug.cxx +++ b/extensions/source/plugin/win/sysplug.cxx @@ -271,11 +271,11 @@ long PluginComm_Impl::doIt() break; case eNPP_Initialize: TRACE( "eNPP_Initialize" ); - OSL_ENSURE( false, "NPP_Initialize: not implemented!" ); + OSL_FAIL( "NPP_Initialize: not implemented!" ); break; case eNPP_GetJavaClass: TRACE( "eNPP_GetJavaClass" ); - OSL_ENSURE( false, "NPP_GetJavaClass: not implemented!" ); + OSL_FAIL( "NPP_GetJavaClass: not implemented!" ); break; } return nRet; diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index b4d91c0c4..a34c74963 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1264,7 +1264,7 @@ namespace pcr m_aOrderedLines[ nFocusControlPos ]->second.pLine->GrabFocus(); } else - OSL_ENSURE( false, "OBrowserListBox::PreNotify: internal error, invalid focus control position!" ); + OSL_FAIL( "OBrowserListBox::PreNotify: internal error, invalid focus control position!" ); } } diff --git a/extensions/source/propctrlr/composeduiupdate.cxx b/extensions/source/propctrlr/composeduiupdate.cxx index f40d92e0a..b8aa757a6 100644 --- a/extensions/source/propctrlr/composeduiupdate.cxx +++ b/extensions/source/propctrlr/composeduiupdate.cxx @@ -374,7 +374,7 @@ namespace pcr //-------------------------------------------------------------------- void SAL_CALL CachedInspectorUI::registerControlObserver( const Reference< XPropertyControlObserver >& _Observer ) throw (RuntimeException) { - OSL_ENSURE( false, "CachedInspectorUI::registerControlObserver: not expected to be called!" ); + OSL_FAIL( "CachedInspectorUI::registerControlObserver: not expected to be called!" ); // CachedInspectorUI is used as context for the controls, and we don't expect them to // register listeners themself m_rMaster.getDelegatorUI()->registerControlObserver( _Observer ); @@ -383,7 +383,7 @@ namespace pcr //-------------------------------------------------------------------- void SAL_CALL CachedInspectorUI::revokeControlObserver( const Reference< XPropertyControlObserver >& _Observer ) throw (RuntimeException) { - OSL_ENSURE( false, "CachedInspectorUI::revokeControlObserver: not expected to be called!" ); + OSL_FAIL( "CachedInspectorUI::revokeControlObserver: not expected to be called!" ); // CachedInspectorUI is used as context for the controls, and we don't expect them to // register listeners themself m_rMaster.getDelegatorUI()->revokeControlObserver( _Observer ); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index b0abab686..e6d47b80c 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -618,7 +618,7 @@ namespace pcr case 1: nWritingMode = WritingMode2::RL_TB; break; case 2: nWritingMode = WritingMode2::CONTEXT; break; default: - OSL_ENSURE( false, "FormComponentPropertyHandler::convertToPropertyValue: unexpected 'normalized value' for WritingMode!" ); + OSL_FAIL( "FormComponentPropertyHandler::convertToPropertyValue: unexpected 'normalized value' for WritingMode!" ); nWritingMode = WritingMode2::CONTEXT; break; } @@ -754,7 +754,7 @@ namespace pcr case WritingMode2::RL_TB: nNormalized = 1; break; case WritingMode2::CONTEXT: nNormalized = 2; break; default: - OSL_ENSURE( false, "FormComponentPropertyHandler::convertToControlValue: unsupported API value for WritingMode!" ); + OSL_FAIL( "FormComponentPropertyHandler::convertToControlValue: unsupported API value for WritingMode!" ); nNormalized = 2; break; } @@ -2015,7 +2015,7 @@ namespace pcr break; default: - OSL_ENSURE( false, "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow: unexpected property to update!" ); + OSL_FAIL( "FormComponentPropertyHandler::impl_updateDependentProperty_nothrow: unexpected property to update!" ); break; } // switch @@ -3140,7 +3140,7 @@ namespace pcr return sValue; } - OSL_ENSURE( false, "ValueListCommandUI::getSQLCommand: unexpected property type!" ); + OSL_FAIL( "ValueListCommandUI::getSQLCommand: unexpected property type!" ); return sValue; } @@ -3215,7 +3215,7 @@ namespace pcr xCommandUI = new ValueListCommandUI( xComponentProperties ); break; default: - OSL_ENSURE( false, "FormComponentPropertyHandler::OnDesignerClosed: invalid property id!" ); + OSL_FAIL( "FormComponentPropertyHandler::OnDesignerClosed: invalid property id!" ); return false; } @@ -3296,7 +3296,7 @@ namespace pcr } catch( const Exception& ) { - OSL_ENSURE( false, "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow: caught an exception!" ); + OSL_FAIL( "FormComponentPropertyHandler::impl_hasValidDataSourceSignature_nothrow: caught an exception!" ); } } return bHas; diff --git a/extensions/source/propctrlr/formgeometryhandler.cxx b/extensions/source/propctrlr/formgeometryhandler.cxx index 77e82a387..9f02c35b1 100644 --- a/extensions/source/propctrlr/formgeometryhandler.cxx +++ b/extensions/source/propctrlr/formgeometryhandler.cxx @@ -376,7 +376,7 @@ namespace pcr break; default: - OSL_ENSURE( false, "FormGeometryHandler::getPropertyValue: huh?" ); + OSL_FAIL( "FormGeometryHandler::getPropertyValue: huh?" ); break; } } @@ -443,7 +443,7 @@ namespace pcr break; default: - OSL_ENSURE( false, "FormGeometryHandler::getPropertyValue: huh?" ); + OSL_FAIL( "FormGeometryHandler::getPropertyValue: huh?" ); break; } } @@ -491,7 +491,7 @@ namespace pcr break; default: - OSL_ENSURE( false, "FormGeometryHandler::describePropertyLine: huh?" ); + OSL_FAIL( "FormGeometryHandler::describePropertyLine: huh?" ); break; } } @@ -547,7 +547,7 @@ namespace pcr } break; default: - OSL_ENSURE( false, "FormGeometryHandler::actuatingPropertyChanged: not registered for this property!" ); + OSL_FAIL( "FormGeometryHandler::actuatingPropertyChanged: not registered for this property!" ); break; } } @@ -706,7 +706,7 @@ namespace pcr break; default: - OSL_ENSURE( false, "FormGeometryHandler::impl_setSheetAnchorType_nothrow: illegal anchor type!" ); + OSL_FAIL( "FormGeometryHandler::impl_setSheetAnchorType_nothrow: illegal anchor type!" ); break; } } diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index e40df7762..206837024 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -516,7 +516,7 @@ namespace pcr } catch( const UnknownPropertyException& ) { - OSL_ENSURE( false, "GenericPropertyHandler::addPropertyChangeListener:\nThe inspected component does not allow registering for all properties at once! This violates the interface contract!" ); + OSL_FAIL( "GenericPropertyHandler::addPropertyChangeListener:\nThe inspected component does not allow registering for all properties at once! This violates the interface contract!" ); } } } @@ -533,7 +533,7 @@ namespace pcr } catch( const UnknownPropertyException& ) { - OSL_ENSURE( false, "GenericPropertyHandler::removePropertyChangeListener:\nThe inspected component does not allow de-registering for all properties at once! This violates the interface contract!" ); + OSL_FAIL( "GenericPropertyHandler::removePropertyChangeListener:\nThe inspected component does not allow de-registering for all properties at once! This violates the interface contract!" ); } } m_aPropertyListeners.removeInterface( _rxListener ); diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index f8b2d020c..17a7796ff 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -1257,7 +1257,7 @@ namespace pcr ::rtl::OString sMessage( "OPropertyBrowserController::UpdateUI: empty category provided for property '" ); sMessage += ::rtl::OString( property->second.Name.getStr(), property->second.Name.getLength(), osl_getThreadTextEncoding() ); sMessage += "'!"; - OSL_ENSURE( false, sMessage ); + OSL_FAIL( sMessage ); } #endif // finally insert this property control @@ -1365,7 +1365,7 @@ namespace pcr // also okay, we expect that the handler has disabled the UI as necessary break; default: - OSL_ENSURE( false, "OPropertyBrowserController::Clicked: unknown result value!" ); + OSL_FAIL( "OPropertyBrowserController::Clicked: unknown result value!" ); break; } } diff --git a/extensions/source/propctrlr/propertycomposer.cxx b/extensions/source/propctrlr/propertycomposer.cxx index 469a4606d..82a275f0d 100644 --- a/extensions/source/propctrlr/propertycomposer.cxx +++ b/extensions/source/propctrlr/propertycomposer.cxx @@ -355,7 +355,7 @@ namespace pcr case InteractiveSelectionResult_Success: case InteractiveSelectionResult_Pending: - OSL_ENSURE( false, "PropertyComposer::onInteractivePropertySelection: no chance to forward the new value to the other handlers!" ); + OSL_FAIL( "PropertyComposer::onInteractivePropertySelection: no chance to forward the new value to the other handlers!" ); // This means that we cannot know the new property value, which either has already been set // at the first component ("Success"), or will be set later on once the asynchronous input // is finished ("Pending"). So, we also cannot forward this new property value to the other @@ -372,7 +372,7 @@ namespace pcr break; default: - OSL_ENSURE( false, "OPropertyBrowserController::onInteractivePropertySelection: unknown result value!" ); + OSL_FAIL( "OPropertyBrowserController::onInteractivePropertySelection: unknown result value!" ); break; } diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index ff340deac..dd39ac432 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -428,7 +428,7 @@ bool StringRepresentation::convertGenericValueToString( const uno::Any& _rValue, // some structs case uno::TypeClass_STRUCT: - OSL_ENSURE( false, "StringRepresentation::convertGenericValueToString(STRUCT): this is dead code - isn't it?" ); + OSL_FAIL( "StringRepresentation::convertGenericValueToString(STRUCT): this is dead code - isn't it?" ); if ( _rValue.getValueType().equals( ::getCppuType( static_cast< util::Date* >( NULL ) ) ) ) { // weird enough, the string representation of dates, as used @@ -572,7 +572,7 @@ bool StringRepresentation::convertStringToGenericValue( const ::rtl::OUString& _ break; case uno::TypeClass_STRUCT: - OSL_ENSURE( false, "StringRepresentation::convertStringToGenericValue(STRUCT): this is dead code - isn't it?" ); + OSL_FAIL( "StringRepresentation::convertStringToGenericValue(STRUCT): this is dead code - isn't it?" ); if ( _rTargetType.equals( ::getCppuType( static_cast< util::Date* >( NULL ) ) ) ) { // weird enough, the string representation of dates, as used diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx index 59b71c143..bfe299bfd 100644 --- a/extensions/source/resource/oooresourceloader.cxx +++ b/extensions/source/resource/oooresourceloader.cxx @@ -447,7 +447,7 @@ namespace res Sequence< ::rtl::OUString > SAL_CALL OpenOfficeResourceBundle::getElementNames( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); - OSL_ENSURE( false, "OpenOfficeResourceBundle::getElementNames: not implemented!" ); + OSL_FAIL( "OpenOfficeResourceBundle::getElementNames: not implemented!" ); // the (Simple)ResManager does not provide an API to enumerate the resources return Sequence< ::rtl::OUString >( ); } @@ -478,7 +478,7 @@ namespace res ::sal_Bool SAL_CALL OpenOfficeResourceBundle::hasElements( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); - OSL_ENSURE( false, "OpenOfficeResourceBundle::hasElements: not implemented!" ); + OSL_FAIL( "OpenOfficeResourceBundle::hasElements: not implemented!" ); // the (Simple)ResManager does not provide an API to enumerate the resources return ::sal_Bool( ); } diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 6210a8af7..a433a6eb0 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -379,7 +379,7 @@ void SAL_CALL UpdateHandler::actionPerformed( awt::ActionEvent const & rEvent ) case HELP_BUTTON: break; default: - OSL_ENSURE( false, "UpdateHandler::actionPerformed: unknown command!" ); + OSL_FAIL( "UpdateHandler::actionPerformed: unknown command!" ); } } @@ -649,7 +649,7 @@ rtl::OUString UpdateHandler::loadString( const uno::Reference< resource::XResour } catch( const uno::Exception& ) { - OSL_ENSURE( false, "UpdateHandler::loadString: caught an exception!" ); + OSL_FAIL( "UpdateHandler::loadString: caught an exception!" ); sString = UNISTRING("Missing ") + sKey; } @@ -685,7 +685,7 @@ void UpdateHandler::loadStrings() } catch( const uno::Exception& ) { - OSL_ENSURE( false, "UpdateHandler::loadStrings: could not create the resource loader!" ); + OSL_FAIL( "UpdateHandler::loadStrings: could not create the resource loader!" ); } if ( !xLoader.is() ) return; @@ -698,7 +698,7 @@ void UpdateHandler::loadStrings() } catch( const resource::MissingResourceException& ) { - OSL_ENSURE( false, "UpdateHandler::loadStrings: missing the resource bundle!" ); + OSL_FAIL( "UpdateHandler::loadStrings: missing the resource bundle!" ); } if ( !xBundle.is() ) return; @@ -791,7 +791,7 @@ void UpdateHandler::setControlProperty( const rtl::OUString &rCtrlName, } catch( const beans::UnknownPropertyException& ) { - OSL_ENSURE( false, "UpdateHandler::setControlProperty: caught an exception!" ); + OSL_FAIL( "UpdateHandler::setControlProperty: caught an exception!" ); } } @@ -802,7 +802,7 @@ void UpdateHandler::showControl( const rtl::OUString &rCtrlName, bool bShow ) if ( !xContainer.is() ) { - OSL_ENSURE( false, "UpdateHandler::showControl: could not get control container!" ); + OSL_FAIL( "UpdateHandler::showControl: could not get control container!" ); return; } @@ -818,7 +818,7 @@ void UpdateHandler::focusControl( DialogControls eID ) if ( !xContainer.is() ) { - OSL_ENSURE( false, "UpdateHandler::focusControl: could not get control container!" ); + OSL_FAIL( "UpdateHandler::focusControl: could not get control container!" ); return; } diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx index cafda1b8c..6184d19b7 100644 --- a/extensions/source/update/check/updateprotocol.cxx +++ b/extensions/source/update/check/updateprotocol.cxx @@ -282,7 +282,7 @@ bool checkForExtensionUpdates( const uno::Reference< uno::XComponentContext > & } catch( const uno::Exception& ) { - OSL_ENSURE( false, "checkForExtensionUpdates: could not create the PackageInformationProvider!" ); + OSL_FAIL( "checkForExtensionUpdates: could not create the PackageInformationProvider!" ); } if ( !xInfoProvider.is() ) return false; @@ -308,7 +308,7 @@ bool checkForPendingUpdates( const uno::Reference< uno::XComponentContext > & rx } catch( const uno::Exception& ) { - OSL_ENSURE( false, "checkForExtensionUpdates: could not create the PackageInformationProvider!" ); + OSL_FAIL( "checkForExtensionUpdates: could not create the PackageInformationProvider!" ); } if ( !xInfoProvider.is() ) return false; |