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

This commit is contained in:
Thomas Arnhold
2011-03-12 11:29:14 +01:00
parent 678cbfa572
commit 5ad6920963
32 changed files with 73 additions and 73 deletions

View File

@@ -668,7 +668,7 @@ void OComboBoxModel::loadData( bool _bForce )
}
break;
default:
OSL_ENSURE( false, "OComboBoxModel::loadData: unreachable!" );
OSL_FAIL( "OComboBoxModel::loadData: unreachable!" );
break;
}
}

View File

@@ -992,7 +992,7 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) )
m_aPropertyBagHelper.getDynamicPropertyDefaultByHandle( _nHandle, aReturn );
else
OSL_ENSURE( false, "OControlModel::convertFastPropertyValue: unknown handle!" );
OSL_FAIL( "OControlModel::convertFastPropertyValue: unknown handle!" );
}
return aReturn;
}
@@ -1050,7 +1050,7 @@ sal_Bool OControlModel::convertFastPropertyValue(
if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) )
bModified = m_aPropertyBagHelper.convertDynamicFastPropertyValue( _nHandle, _rValue, _rConvertedValue, _rOldValue );
else
OSL_ENSURE( false, "OControlModel::convertFastPropertyValue: unknown handle!" );
OSL_FAIL( "OControlModel::convertFastPropertyValue: unknown handle!" );
break;
}
return bModified;
@@ -1084,7 +1084,7 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
if ( m_aPropertyBagHelper.hasDynamicPropertyByHandle( _nHandle ) )
m_aPropertyBagHelper.setDynamicFastPropertyValue( _nHandle, _rValue );
else
OSL_ENSURE( false, "OControlModel::setFastPropertyValue_NoBroadcast: unknown handle!" );
OSL_FAIL( "OControlModel::setFastPropertyValue_NoBroadcast: unknown handle!" );
break;
}
}

View File

@@ -256,7 +256,7 @@ Reference< XRowSet > SAL_CALL OGridControlModel::getRowSet( ) throw (RuntimeExc
//------------------------------------------------------------------------------
void SAL_CALL OGridControlModel::setRowSet( const Reference< XRowSet >& /*_rxDataSource*/ ) throw (RuntimeException)
{
OSL_ENSURE( false, "OGridControlModel::setRowSet: not supported!" );
OSL_FAIL( "OGridControlModel::setRowSet: not supported!" );
}
//--------------------------------------------------------------------

View File

@@ -488,7 +488,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _
break;
case ImageStoreInvalid:
OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" );
OSL_FAIL( "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" );
break;
}
@@ -588,7 +588,7 @@ Any OImageControlModel::translateDbColumnToControlValue()
return makeAny( sImageLink );
}
case ImageStoreInvalid:
OSL_ENSURE( false, "OImageControlModel::translateDbColumnToControlValue: invalid field type!" );
OSL_FAIL( "OImageControlModel::translateDbColumnToControlValue: invalid field type!" );
break;
}
return Any();
@@ -630,7 +630,7 @@ void OImageControlModel::doSetControlValue( const Any& _rValue )
break;
case ImageStoreInvalid:
OSL_ENSURE( false, "OImageControlModel::doSetControlValue: invalid field type!" );
OSL_FAIL( "OImageControlModel::doSetControlValue: invalid field type!" );
break;
} // switch ( lcl_getImageStoreType( getFieldType() ) )

View File

@@ -339,7 +339,7 @@ namespace frm
break;
case PROPERTY_ID_VALUE_SEQ :
OSL_ENSURE( false, "ValueItemList is read-only!" );
OSL_FAIL( "ValueItemList is read-only!" );
throw PropertyVetoException();
case PROPERTY_ID_DEFAULT_SELECT_SEQ :
@@ -390,7 +390,7 @@ namespace frm
break;
case PROPERTY_ID_VALUE_SEQ :
OSL_ENSURE( false, "ValueItemList is read-only!" );
OSL_FAIL( "ValueItemList is read-only!" );
throw PropertyVetoException();
case PROPERTY_ID_DEFAULT_SELECT_SEQ :
@@ -894,7 +894,7 @@ namespace frm
}
break;
default:
OSL_ENSURE( false, "OListBoxModel::loadData: unreachable!" );
OSL_FAIL( "OListBoxModel::loadData: unreachable!" );
break;
}
}
@@ -996,7 +996,7 @@ namespace frm
size_t selectedValue = aSelectedIndices[0];
if ( selectedValue >= aValues.size() )
{
OSL_ENSURE( false, "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" );
OSL_FAIL( "OListBoxModel::getFirstSelectedValue: inconsistent selection/valuelist!" );
return s_aEmptyVaue;
}
@@ -1035,7 +1035,7 @@ namespace frm
Reference< XPropertySet > xBoundField( getField() );
if ( !xBoundField.is() )
{
OSL_ENSURE( false, "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" );
OSL_FAIL( "OListBoxModel::translateDbColumnToControlValue: no field? How could that happen?!" );
return Any();
}
@@ -1143,7 +1143,7 @@ namespace frm
default:
break;
}
OSL_ENSURE( false, "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" );
OSL_FAIL( "lcl_getCurrentExchangeType: unsupported (unexpected) exchange type!" );
return eEntry;
}
}

View File

@@ -218,7 +218,7 @@ namespace frm
}
else
{
OSL_ENSURE( false, "OReferenceValueComponent::translateExternalValueToControlValue: unexpected value type!" );
OSL_FAIL( "OReferenceValueComponent::translateExternalValueToControlValue: unexpected value type!" );
}
return makeAny( nState );

View File

@@ -102,7 +102,7 @@ namespace frm
if ( pAsciiCommandName != NULL )
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:" ) ) + ::rtl::OUString::createFromAscii( pAsciiCommandName );
OSL_ENSURE( false, "lcl_getCommandURL: unknown FormFeature!" );
OSL_FAIL( "lcl_getCommandURL: unknown FormFeature!" );
return ::rtl::OUString();
}
}

View File

@@ -503,7 +503,7 @@ namespace xforms
break;
default:
OSL_ENSURE( false, "OValueLimitedType::_explainInvalid: unknown reason!" );
OSL_FAIL( "OValueLimitedType::_explainInvalid: unknown reason!" );
break;
}

View File

@@ -385,7 +385,7 @@ bool Model::setSimpleContent( const XNode_t& xConstNode,
default:
{
OSL_ENSURE( false, "bound to unknown node type?" );
OSL_FAIL( "bound to unknown node type?" );
}
break;

View File

@@ -257,7 +257,7 @@ OUString Model::getDefaultBindingExpressionForNode(
default:
// unknown type? fail!
OSL_ENSURE( false, "unknown node type!" );
OSL_FAIL( "unknown node type!" );
xCurrent.set( NULL );
aBuffer.makeStringAndClear();
// we'll remove the slash below
@@ -332,7 +332,7 @@ OUString Model::getNodeDisplayName( const XNode_t& xNode,
default:
// unknown type? fail!
OSL_ENSURE( false, "unknown node type!" );
OSL_FAIL( "unknown node type!" );
break;
}
@@ -355,7 +355,7 @@ OUString Model::getNodeName( const XNode_t& xNode )
case NodeType_DOCUMENT_NODE:
default:
// unknown type? fail!
OSL_ENSURE( false, "no name for this node type!" );
OSL_FAIL( "no name for this node type!" );
break;
}
@@ -684,7 +684,7 @@ Model::XNode_t Model::renameNode( const XNode_t& xNode,
}
else
{
OSL_ENSURE( false, "can't rename this node type" );
OSL_FAIL( "can't rename this node type" );
}
// adjust bindings (if necessary):