diff options
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r-- | embeddedobj/source/commonembedding/miscobj.cxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/persistence.cxx | 8 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/xfactory.cxx | 25 |
3 files changed, 15 insertions, 20 deletions
diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index f5e4de65b54d..0601c03188c2 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -326,7 +326,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const OUString& aEventName ) { document::EventObject aEvent; aEvent.EventName = aEventName; - aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ); + aEvent.Source.set( static_cast< ::cppu::OWeakObject* >( this ) ); // For now all the events are sent as object events // aEvent.Source = ( xSource.is() ? xSource // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) ); diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 5b84c98d9941..5d1d7e223459 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -582,7 +582,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr { osl::MutexGuard aGuard( m_aMutex ); if ( m_pDocHolder ) - xStorable = uno::Reference< frame::XStorable > ( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); + xStorable.set( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); } if( !xStorable.is() ) @@ -763,7 +763,7 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( { osl::MutexGuard aGuard( m_aMutex ); if ( m_pDocHolder ) - xDoc = uno::Reference< document::XStorageBasedDocument >( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); + xDoc.set( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); } OUString aBaseURL = GetBaseURLFrom_Impl(rMediaArgs, rObjArgs); @@ -1493,8 +1493,8 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) } } - m_xNewObjectStorage = uno::Reference< embed::XStorage >(); - m_xNewParentStorage = uno::Reference< embed::XStorage >(); + m_xNewObjectStorage.clear(); + m_xNewParentStorage.clear(); m_aNewEntryName.clear(); m_aNewDocMediaDescriptor.realloc( 0 ); m_bWaitSaveCompleted = false; diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index 8e09b9b4f88e..4aba8073a379 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -112,7 +112,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta catch ( const uno::Exception& ) { } - xSubStorage = uno::Reference< embed::XStorage >(); + xSubStorage.clear(); uno::Sequence< beans::NamedValue > aObject = m_aConfigHelper.GetObjectPropsByMediaType( aMediaType ); @@ -123,8 +123,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta if ( !aObject.getLength() ) throw io::IOException(); // unexpected mimetype of the storage - xResult = uno::Reference< uno::XInterface >( - static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( + xResult.set(static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( m_xContext, aObject ) ), uno::UNO_QUERY ); @@ -184,8 +183,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta throw io::IOException(); // unexpected mimetype of the storage - xResult = uno::Reference< uno::XInterface >( - static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( + xResult.set(static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( m_xContext, aObject ) ), uno::UNO_QUERY ); @@ -237,11 +235,10 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta if ( !aObject.getLength() ) throw io::IOException(); // unexpected mimetype of the storage - xResult = uno::Reference< uno::XInterface >( - static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( - m_xContext, - aObject ) ), - uno::UNO_QUERY ); + xResult.set( static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( + m_xContext, + aObject ) ), + uno::UNO_QUERY ); uno::Reference< embed::XEmbedPersist > xPersist( xResult, uno::UNO_QUERY ); @@ -295,7 +292,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta throw io::IOException(); // TODO: } - uno::Reference< uno::XInterface > xResult = uno::Reference< uno::XInterface > ( + uno::Reference< uno::XInterface > xResult( static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( m_xContext, aObject ) ), @@ -351,8 +348,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta throw io::IOException(); // unexpected mimetype of the storage - xResult = uno::Reference< uno::XInterface >( - static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( + xResult.set(static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( m_xContext, aObject, aTempMedDescr, @@ -415,8 +411,7 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta if ( !aFilterName.isEmpty() ) { - xResult = uno::Reference< uno::XInterface >( - static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( + xResult.set(static_cast< ::cppu::OWeakObject* > ( new OCommonEmbeddedObject( m_xContext, aObject, aTempMedDescr, |