diff options
-rw-r--r-- | sfx2/source/dialog/taskpane.cxx | 7 | ||||
-rw-r--r-- | svtools/source/uno/svtxgridcontrol.cxx | 6 | ||||
-rw-r--r-- | svtools/source/uno/unocontroltablemodel.cxx | 7 | ||||
-rw-r--r-- | svx/source/form/fmpgeimp.cxx | 12 | ||||
-rw-r--r-- | svx/source/form/fmvwimp.cxx | 13 | ||||
-rw-r--r-- | toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 7 | ||||
-rw-r--r-- | ucb/source/ucp/ext/ucpext_datasupplier.cxx | 6 | ||||
-rw-r--r-- | vcl/source/control/throbber.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/forms/elementexport.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/forms/property_meta_data.cxx | 7 |
10 files changed, 66 insertions, 13 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index d83ad1b871b5..7a85eaab6cb0 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -671,7 +671,12 @@ namespace sfx2 { const ::svt::PToolPanel pPanel( m_aPanelDeck.GetPanel( i ) ); 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 ) { aPanelPos = i; diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 4cf1a854e3d2..0a874af0a54f 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -781,7 +781,11 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow() ++colRef ) { - ENSURE_OR_CONTINUE( colRef->is(), "illegal column!" ); + if ( !colRef->is() ) + { + SAL_WARN( "svtools.uno", "illegal column!" ); + continue; + } m_pTableModel->appendColumn( *colRef ); } diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 015dd67c6f76..f6cd8944451d 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -323,7 +323,12 @@ namespace svt { namespace table ) { 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(); } m_pImpl->aColumns.clear(); diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index a0374016bf44..33a3082a90ae 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -216,15 +216,23 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl ) continue; 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 ... // 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 ); - 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 // i_foreignImpl.getForms(). // Pathological, too ... + SAL_WARN( "svx.form", "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" ); + continue; + } pOwnObj->SetUnoControlModel( assignment->second ); } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 879b537ee4fa..546540e7a0f6 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -733,7 +733,11 @@ IMPL_LINK(FmXFormView, OnActivate, void*, /*EMPTYTAG*/) continue; 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 ) ); if ( !aSource.isEmpty() ) @@ -908,7 +912,12 @@ Reference< XFormController > FmXFormView::getFormController( const Reference< XF ) { 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 ) // wrong device continue; diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index 32f5b3d5cae4..9c0fd9ad09bd 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -178,7 +178,12 @@ namespace toolkit ) { 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 ); } diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx index 507d2676a637..8425ffe8135b 100644 --- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx +++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx @@ -163,7 +163,11 @@ namespace ucb { namespace ucp { namespace ext ++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]; ResultListEntry aEntry; diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index a4fe98f72ac2..6f80a402921d 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -190,7 +190,12 @@ void Throbber::initImages() ++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(); if ( ( aImageSize.Width() > aWindowSizePixel.Width() ) diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 0d6a1713d121..fcc3efaefa53 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -500,8 +500,11 @@ namespace xmloff // let the factory provide the concrete handler. Note that caching, if desired, is the task // of the factory PPropertyHandler handler = (*propDescription->factory)( propDescription->propertyId ); - ENSURE_OR_CONTINUE( handler.get() != NULL, - "OControlExport::exportGenericHandlerAttributes: invalid property handler provided by the factory!" ); + if ( !handler.get() ) + { + SAL_WARN( "xmloff.forms", "OControlExport::exportGenericHandlerAttributes: invalid property handler provided by the factory!" ); + continue; + } ::rtl::OUString attributeValue; if ( propDescription->propertyGroup == NO_GROUP ) diff --git a/xmloff/source/forms/property_meta_data.cxx b/xmloff/source/forms/property_meta_data.cxx index c8d878bf935a..8291d0309183 100644 --- a/xmloff/source/forms/property_meta_data.cxx +++ b/xmloff/source/forms/property_meta_data.cxx @@ -245,7 +245,12 @@ namespace xmloff { namespace metadata { const PropertyGroup propGroup = group->second; 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 ); } } |