diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-01 15:42:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-01 16:43:06 +0100 |
commit | 7950797f27ca09091e4221ea91f90e2aca98a2c5 (patch) | |
tree | 0a54eb9f9d50f9cacd9426c14497eb385d0e3cf8 /dbaccess | |
parent | 968f633b247d06c958d0b5695ab1ed962509f795 (diff) |
coverity#706468 Uncaught exception
and
coverity#706469 Uncaught exception
Change-Id: Ia67d777b09ac7f72a94a9019765266854775c53f
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/documentdefinition.cxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 660d9272dc5c..167a52e97e7b 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -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; } |