diff options
Diffstat (limited to 'embeddedobj/source/commonembedding/miscobj.cxx')
-rw-r--r-- | embeddedobj/source/commonembedding/miscobj.cxx | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index 48da9abdeaf7..557e21e2646a 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -439,7 +439,7 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( static_cast< ::cppu::OWeakObject* >(this) ); } - return uno::Reference< util::XCloseable >( m_xDocHolder->GetComponent(), uno::UNO_QUERY ); + return m_xDocHolder->GetComponent(); } @@ -550,15 +550,9 @@ void SAL_CALL OCommonEmbeddedObject::close( sal_Bool bDeliverOwnership ) // will use the storage, the storage will be disposed by the document and recreated by the object if ( m_xObjectStorage.is() ) { - uno::Reference< lang::XComponent > xComp( m_xObjectStorage, uno::UNO_QUERY ); - OSL_ENSURE( xComp.is(), "Storage does not support XComponent!" ); - - if ( xComp.is() ) - { - try { - xComp->dispose(); - } catch ( const uno::Exception& ) {} - } + try { + m_xObjectStorage->dispose(); + } catch ( const uno::Exception& ) {} m_xObjectStorage.clear(); m_xRecoveryStorage.clear(); |