Kaydet (Commit) 7950797f authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#706468 Uncaught exception

and

coverity#706469 Uncaught exception

Change-Id: Ia67d777b09ac7f72a94a9019765266854775c53f
üst 968f633b
......@@ -1834,19 +1834,20 @@ Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bFor
if ( !m_pImpl || !m_pImpl->m_pDataSource )
throw DisposedException();
Reference< XDatabaseDocumentUI > xUI( lcl_getDatabaseDocumentUI( *m_pImpl->m_pDataSource ) );
if ( !xUI.is() )
{
// no XDatabaseDocumentUI -> just execute the respective command
m_bOpenInDesign = _bForEditing;
Reference< XComponent > xComponent( onCommandOpenSomething( Any(), true, NULL ), UNO_QUERY );
OSL_ENSURE( xComponent.is(), "ODocumentDefinition::impl_openUI_nolck_throw: opening the thingie failed." );
return xComponent;
}
Reference< XComponent > xComponent;
try
{
Reference< XDatabaseDocumentUI > xUI( lcl_getDatabaseDocumentUI( *m_pImpl->m_pDataSource ) );
if ( !xUI.is() )
{
// no XDatabaseDocumentUI -> just execute the respective command
m_bOpenInDesign = _bForEditing;
xComponent = Reference<XComponent>(onCommandOpenSomething(Any(), true, NULL), UNO_QUERY);
OSL_ENSURE( xComponent.is(), "ODocumentDefinition::impl_openUI_nolck_throw: opening the thingie failed." );
return xComponent;
}
OUString sName( impl_getHierarchicalName( false ) );
sal_Int32 nObjectType = m_bForm ? DatabaseObject::FORM : DatabaseObject::REPORT;
aGuard.clear();
......@@ -1861,6 +1862,7 @@ Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bFor
throw WrappedTargetException(
OUString(), *this, ::cppu::getCaughtException() );
}
return xComponent;
}
......
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