summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-12 11:29:14 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-12 14:12:11 +0100
commit5ad692096323fcdf03823352b70bb7e71660919c (patch)
treefd3b578bd023400fc9daeed37cad2dbe4a5c9004 /extensions/source
parent678cbfa572eacbbdbd989b0d7c39ac6d33583e2a (diff)
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/config/ldap/ldapaccess.cxx2
-rw-r--r--extensions/source/logging/filehandler.cxx2
-rw-r--r--extensions/source/plugin/aqua/sysplug.cxx4
-rw-r--r--extensions/source/plugin/win/sysplug.cxx4
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx2
-rw-r--r--extensions/source/propctrlr/composeduiupdate.cxx4
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx12
-rw-r--r--extensions/source/propctrlr/formgeometryhandler.cxx10
-rw-r--r--extensions/source/propctrlr/genericpropertyhandler.cxx4
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx4
-rw-r--r--extensions/source/propctrlr/propertycomposer.cxx4
-rw-r--r--extensions/source/propctrlr/stringrepresentation.cxx4
-rw-r--r--extensions/source/resource/oooresourceloader.cxx4
-rw-r--r--extensions/source/update/check/updatehdl.cxx14
-rw-r--r--extensions/source/update/check/updateprotocol.cxx4
15 files changed, 39 insertions, 39 deletions
diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx
index 0d50f32ce945..a99ac7e18f6c 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 e0680441a85a..8aef979c00c1 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 6b4c93202b85..4d9bf9fa32ce 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 59e62c15188d..a65ff1b5e766 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 5ea742fb4bf9..97af90f577a7 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 f78349c651e5..e7b8c072438a 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 3344a8a62c8b..9fa37ded4217 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 209b466cfe9f..d93f023e4add 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 f273f948e0e4..2c684db31bcc 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 2499e9aaa360..13e50d559e49 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 4f88c2a0bed9..d8b97c0c9faf 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 0fbcc391b799..318b14293d6f 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 ff87b3d51724..ee5cc2a0ea3f 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 364d975c537a..0e08d417bcd7 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 9ba37b67308c..7de4681b9d62 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;