Kaydet (Commit) 89f0655e authored tarafından Marcel Metz's avatar Marcel Metz Kaydeden (comit) Stephan Bergmann

Replaced diagnore ENSURE_OR_CONTINUE with regular code.

üst f9e6d195
...@@ -671,7 +671,12 @@ namespace sfx2 ...@@ -671,7 +671,12 @@ namespace sfx2
{ {
const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i ) ); const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i ) );
const CustomToolPanel* pCustomPanel = dynamic_cast< const CustomToolPanel* >( pPanel.get() ); const CustomToolPanel* pCustomPanel = dynamic_cast< const CustomToolPanel* >( pPanel.get() );
ENSURE_OR_CONTINUE( pCustomPanel != NULL, "ModuleTaskPane_Impl::GetPanelPos: illegal panel implementation!" ); if ( !pCustomPanel )
{
SAL_WARN( "sfx2.dialog", "ModuleTaskPane_Impl::GetPanelPos: illegal panel implementation!" );
continue;
}
if ( pCustomPanel->GetResourceURL() == i_rResourceURL ) if ( pCustomPanel->GetResourceURL() == i_rResourceURL )
{ {
aPanelPos = i; aPanelPos = i;
......
...@@ -781,7 +781,11 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow() ...@@ -781,7 +781,11 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow()
++colRef ++colRef
) )
{ {
ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" ); if ( !colRef->is() )
{
SAL_WARN( "svtools.uno", "illegal column!" );
continue;
}
m_pTableModel->appendColumn( *colRef ); m_pTableModel->appendColumn( *colRef );
} }
......
...@@ -323,7 +323,12 @@ namespace svt { namespace table ...@@ -323,7 +323,12 @@ namespace svt { namespace table
) )
{ {
UnoGridColumnFacade* pColumn = dynamic_cast< UnoGridColumnFacade* >( col->get() ); UnoGridColumnFacade* pColumn = dynamic_cast< UnoGridColumnFacade* >( col->get() );
ENSURE_OR_CONTINUE( pColumn != NULL, "UnoControlTableModel::removeAllColumns: illegal column implementation!" ); if ( !pColumn )
{
SAL_WARN( "svtools.uno", "UnoControlTableModel::removeAllColumns: illegal column implementation!" );
continue;
}
pColumn->dispose(); pColumn->dispose();
} }
m_pImpl->aColumns.clear(); m_pImpl->aColumns.clear();
......
...@@ -216,15 +216,23 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl ) ...@@ -216,15 +216,23 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl )
continue; continue;
Reference< XControlModel > xForeignModel( pForeignObj->GetUnoControlModel() ); Reference< XControlModel > xForeignModel( pForeignObj->GetUnoControlModel() );
ENSURE_OR_CONTINUE( xForeignModel.is(), "FmFormPageImpl::FmFormPageImpl: control shape without control!" ); if ( !xForeignModel.is() )
{
// if this fires, the SdrObject does not have a UNO Control Model. This is pathological, but well ... // if this fires, the SdrObject does not have a UNO Control Model. This is pathological, but well ...
// So the cloned SdrObject will also not have a UNO Control Model. // So the cloned SdrObject will also not have a UNO Control Model.
SAL_WARN( "svx.form", "FmFormPageImpl::FmFormPageImpl: control shape without control!" );
continue;
}
MapControlModels::const_iterator assignment = aModelAssignment.find( xForeignModel ); MapControlModels::const_iterator assignment = aModelAssignment.find( xForeignModel );
ENSURE_OR_CONTINUE( assignment != aModelAssignment.end(), "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" ); if ( assignment == aModelAssignment.end() )
{
// if this fires, the source SdrObject has a model, but it is not part of the model hierarchy in // if this fires, the source SdrObject has a model, but it is not part of the model hierarchy in
// i_foreignImpl.getForms(). // i_foreignImpl.getForms().
// Pathological, too ... // Pathological, too ...
SAL_WARN( "svx.form", "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" );
continue;
}
pOwnObj->SetUnoControlModel( assignment->second ); pOwnObj->SetUnoControlModel( assignment->second );
} }
......
...@@ -733,7 +733,11 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/) ...@@ -733,7 +733,11 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/)
continue; continue;
Reference< XPropertySet > xFormSet( xForm, UNO_QUERY ); Reference< XPropertySet > xFormSet( xForm, UNO_QUERY );
ENSURE_OR_CONTINUE( xFormSet.is(), "FmXFormView::OnActivate: a form which does not have properties?" ); if ( !xFormSet.is() )
{
SAL_WARN( "svx.form", "FmXFormView::OnActivate: a form which does not have properties?" );
continue;
}
const ::rtl::OUString aSource = ::comphelper::getString( xFormSet->getPropertyValue( FM_PROP_COMMAND ) ); const ::rtl::OUString aSource = ::comphelper::getString( xFormSet->getPropertyValue( FM_PROP_COMMAND ) );
if ( !aSource.isEmpty() ) if ( !aSource.isEmpty() )
...@@ -908,7 +912,12 @@ Reference< XFormController > FmXFormView::getFormController( const Reference< XF ...@@ -908,7 +912,12 @@ Reference< XFormController > FmXFormView::getFormController( const Reference< XF
) )
{ {
const PFormViewPageWindowAdapter pAdapter( *pos ); const PFormViewPageWindowAdapter pAdapter( *pos );
ENSURE_OR_CONTINUE( pAdapter.get(), "FmXFormView::getFormController: invalid page window adapter!" ); if ( !pAdapter.get() )
{
SAL_WARN( "svx.form", "FmXFormView::getFormController: invalid page window adapter!" );
continue;
}
if ( pAdapter->getWindow() != &_rDevice ) if ( pAdapter->getWindow() != &_rDevice )
// wrong device // wrong device
continue; continue;
......
...@@ -178,7 +178,12 @@ namespace toolkit ...@@ -178,7 +178,12 @@ namespace toolkit
) )
{ {
GridColumn* pColumnImpl = GridColumn::getImplementation( *updatePos ); GridColumn* pColumnImpl = GridColumn::getImplementation( *updatePos );
ENSURE_OR_CONTINUE( pColumnImpl, "DefaultGridColumnModel::removeColumn: invalid column implementation!" ); if ( !pColumnImpl )
{
SAL_WARN( "toolkit.controls", "DefaultGridColumnModel::removeColumn: invalid column implementation!" );
continue;
}
pColumnImpl->setIndex( columnIndex ); pColumnImpl->setIndex( columnIndex );
} }
......
...@@ -163,7 +163,11 @@ namespace ucb { namespace ucp { namespace ext ...@@ -163,7 +163,11 @@ namespace ucb { namespace ucp { namespace ext
++pExtInfo ++pExtInfo
) )
{ {
ENSURE_OR_CONTINUE( pExtInfo->getLength() > 0, "illegal extension info" ); if ( pExtInfo->getLength() <= 0 )
{
SAL_WARN( "ucb.ucp", "illegal extension info" );
continue;
}
const ::rtl::OUString& rLocalId = (*pExtInfo)[0]; const ::rtl::OUString& rLocalId = (*pExtInfo)[0];
ResultListEntry aEntry; ResultListEntry aEntry;
......
...@@ -190,7 +190,12 @@ void Throbber::initImages() ...@@ -190,7 +190,12 @@ void Throbber::initImages()
++check ++check
) )
{ {
ENSURE_OR_CONTINUE( !check->empty(), "Throbber::initImages: illegal image!" ); if ( check->empty() )
{
SAL_WARN( "vcl.control", "Throbber::initImages: illegal image!" );
continue;
}
const Size aImageSize = (*check)[0].GetSizePixel(); const Size aImageSize = (*check)[0].GetSizePixel();
if ( ( aImageSize.Width() > aWindowSizePixel.Width() ) if ( ( aImageSize.Width() > aWindowSizePixel.Width() )
......
...@@ -500,8 +500,11 @@ namespace xmloff ...@@ -500,8 +500,11 @@ namespace xmloff
// let the factory provide the concrete handler. Note that caching, if desired, is the task // let the factory provide the concrete handler. Note that caching, if desired, is the task
// of the factory // of the factory
PPropertyHandler handler = (*propDescription->factory)( propDescription->propertyId ); PPropertyHandler handler = (*propDescription->factory)( propDescription->propertyId );
ENSURE_OR_CONTINUE( handler.get() != NULL, if ( !handler.get() )
"OControlExport::exportGenericHandlerAttributes: invalid property handler provided by the factory!" ); {
SAL_WARN( "xmloff.forms", "OControlExport::exportGenericHandlerAttributes: invalid property handler provided by the factory!" );
continue;
}
::rtl::OUString attributeValue; ::rtl::OUString attributeValue;
if ( propDescription->propertyGroup == NO_GROUP ) if ( propDescription->propertyGroup == NO_GROUP )
......
...@@ -245,7 +245,12 @@ namespace xmloff { namespace metadata ...@@ -245,7 +245,12 @@ namespace xmloff { namespace metadata
{ {
const PropertyGroup propGroup = group->second; const PropertyGroup propGroup = group->second;
const IndexedPropertyGroups::const_iterator groupPos = rPropertyGroups.find( propGroup ); const IndexedPropertyGroups::const_iterator groupPos = rPropertyGroups.find( propGroup );
ENSURE_OR_CONTINUE( groupPos != rPropertyGroups.end(), "getPropertyGroupList: inconsistency!" ); if( groupPos == rPropertyGroups.end() )
{
SAL_WARN( "xmloff.forms", "getPropertyGroupList: inconsistency!" );
continue;
}
o_propertyGroups.push_back( groupPos->second ); o_propertyGroups.push_back( groupPos->second );
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment