summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorMarcel Metz <mmetz@adrian-broher.net>2012-01-15 11:48:11 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-23 23:28:50 +0100
commit89f0655ebadb1aa9be31d854dfe5476e2b16e64c (patch)
tree20b96b8e860c738e33ceeb0f7d74817def90f564 /svx/source
parentf9e6d195dbbf0b2effa10f69f4c99fce6e2b186b (diff)
Replaced diagnore ENSURE_OR_CONTINUE with regular code.
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/form/fmpgeimp.cxx12
-rw-r--r--svx/source/form/fmvwimp.cxx13
2 files changed, 21 insertions, 4 deletions
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;