diff options
Diffstat (limited to 'embeddedobj/source/msole')
-rw-r--r-- | embeddedobj/source/msole/olecomponent.cxx | 2 | ||||
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 4 | ||||
-rw-r--r-- | embeddedobj/source/msole/olemisc.cxx | 4 | ||||
-rw-r--r-- | embeddedobj/source/msole/olepersist.cxx | 21 | ||||
-rw-r--r-- | embeddedobj/source/msole/ownview.cxx | 8 | ||||
-rw-r--r-- | embeddedobj/source/msole/xdialogcreator.cxx | 10 |
6 files changed, 23 insertions, 26 deletions
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index b7f016824dd3..6a7b9e471131 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -1594,7 +1594,7 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor& m_pUnoOleObject->StoreObjectToStream( xTempOutStream ); xTempOutStream->closeOutput(); - xTempOutStream = uno::Reference< io::XOutputStream >(); + xTempOutStream.clear(); } else throw io::IOException(); // TODO: diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 2e19372f1060..83647109296e 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -344,7 +344,7 @@ bool OleEmbeddedObject::TryToConvertToOOo() nStep = 1; uno::Reference< lang::XComponent > xComp( m_xObjectStream, uno::UNO_QUERY_THROW ); xComp->dispose(); - m_xObjectStream = uno::Reference< io::XStream >(); + m_xObjectStream.clear(); m_nObjectState = -1; nStep = 2; @@ -738,7 +738,7 @@ namespace uno::Any aUrl = xNativeTempFile->getPropertyValue("Uri"); aUrl >>= sUrl; - xNativeTempFile = uno::Reference<beans::XPropertySet>(); + xNativeTempFile.clear(); uno::Reference < ucb::XSimpleFileAccess3 > xSimpleFileAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index e0ad671b8ca3..24b3b73f8de8 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -294,10 +294,10 @@ void OleEmbeddedObject::Dispose() xComp->dispose(); } catch( const uno::Exception& ) {} } - m_xObjectStream = uno::Reference< io::XStream >(); + m_xObjectStream.clear(); } - m_xParentStorage = uno::Reference< embed::XStorage >(); + m_xParentStorage.clear(); m_bDisposed = true; } diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 3a9429c28c05..f98745135850 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -125,7 +125,7 @@ OUString GetNewFilledTempFile_Impl( const uno::Reference< io::XInputStream >& xI // copy stream contents to the file ::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xTempOutStream ); xTempOutStream->closeOutput(); - xTempOutStream = uno::Reference< io::XOutputStream >(); + xTempOutStream.clear(); } else throw io::IOException(); // TODO: @@ -643,7 +643,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres aArgs[1] <<= true; // do not create copy try { - xNameContainer = uno::Reference< container::XNameContainer >( + xNameContainer.set( m_xFactory->createInstanceWithArguments( "com.sun.star.embed.OLESimpleStorage", aArgs ), @@ -897,7 +897,7 @@ void OleEmbeddedObject::OnViewChanged_Impl() ) { // The view is changed while the object is in running state, save the new object - m_xCachedVisualRepresentation = uno::Reference< io::XStream >(); + m_xCachedVisualRepresentation.clear(); SaveObject_Impl(); MakeEventListenerNotification_Impl( OUString( "OnVisAreaChanged" ) ); } @@ -963,9 +963,8 @@ void OleEmbeddedObject::CreateOleComponent_Impl( OleComponent* pOleComponent ) m_pOleComponent->acquire(); // TODO: needs holder? if ( !m_xClosePreventer.is() ) - m_xClosePreventer = uno::Reference< util::XCloseListener >( - static_cast< ::cppu::OWeakObject* >( new OClosePreventer ), - uno::UNO_QUERY ); + m_xClosePreventer.set( static_cast< ::cppu::OWeakObject* >( new OClosePreventer ), + uno::UNO_QUERY ); m_pOleComponent->addCloseListener( m_xClosePreventer ); } @@ -1108,7 +1107,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( // ignore visual representation provided from outside if it should not be stored if ( !bStoreVis ) - xCachedVisualRepresentation = uno::Reference< io::XStream >(); + xCachedVisualRepresentation.clear(); if ( bStoreVis && !HasVisReplInStream() && !xCachedVisualRepresentation.is() ) throw io::IOException(); // TODO: there is no cached visual representation and nothing is provided from outside @@ -1612,12 +1611,12 @@ void SAL_CALL OleEmbeddedObject::saveCompleted( sal_Bool bUseNew ) bool bStoreLoaded = m_bStoreLoaded; - m_xNewObjectStream = uno::Reference< io::XStream >(); - m_xNewParentStorage = uno::Reference< embed::XStorage >(); + m_xNewObjectStream.clear(); + m_xNewParentStorage.clear(); m_aNewEntryName.clear(); m_bWaitSaveCompleted = false; m_bNewVisReplInStream = false; - m_xNewCachedVisRepl = uno::Reference< io::XStream >(); + m_xNewCachedVisRepl.clear(); m_bStoreLoaded = false; if ( bUseNew && m_pOleComponent && m_nUpdateMode == embed::EmbedUpdateModes::ALWAYS_UPDATE && !bStoreLoaded @@ -1778,7 +1777,7 @@ void SAL_CALL OleEmbeddedObject::storeOwn() // the replacement is changed probably, and it must be in the object stream if ( !m_pOleComponent->IsWorkaroundActive() ) - m_xCachedVisualRepresentation = uno::Reference< io::XStream >(); + m_xCachedVisualRepresentation.clear(); SetVisReplInStream( sal_True ); } #endif diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 9d9946103203..b880d220b8a3 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -541,7 +541,7 @@ void OwnView_Impl::Close() if ( !m_xModel.is() ) return; xModel = m_xModel; - m_xModel = uno::Reference< frame::XModel >(); + m_xModel.clear(); if ( m_bBusy ) return; @@ -584,7 +584,7 @@ void SAL_CALL OwnView_Impl::notifyEvent( const document::EventObject& aEvent ) { // SaveAs operation took place, so just forget the model and deregister listeners xModel = m_xModel; - m_xModel = uno::Reference< frame::XModel >(); + m_xModel.clear(); } } @@ -621,7 +621,7 @@ void SAL_CALL OwnView_Impl::notifyClosing( const lang::EventObject& Source ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( Source.Source == m_xModel ) - m_xModel = uno::Reference< frame::XModel >(); + m_xModel.clear(); } @@ -630,7 +630,7 @@ void SAL_CALL OwnView_Impl::disposing( const lang::EventObject& Source ) { ::osl::MutexGuard aGuard( m_aMutex ); if ( Source.Source == m_xModel ) - m_xModel = uno::Reference< frame::XModel >(); + m_xModel.clear(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index ced6113a6cd1..833bc6f6fbfa 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -201,9 +201,8 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia //TODO: retrieve ClassName OUString aClassName; - aObjectInfo.Object = uno::Reference< embed::XEmbeddedObject >( - xEmbCreator->createInstanceInitNew( aClassID, aClassName, xStorage, sEntName, aObjArgs ), - uno::UNO_QUERY ); + aObjectInfo.Object.set( xEmbCreator->createInstanceInitNew( aClassID, aClassName, xStorage, sEntName, aObjArgs ), + uno::UNO_QUERY ); } else { @@ -228,9 +227,8 @@ embed::InsertedObjectInfo SAL_CALL MSOLEDialogObjectCreator::createInstanceByDia if ( !xEmbCreator.is() ) throw uno::RuntimeException(); - aObjectInfo.Object = uno::Reference< embed::XEmbeddedObject >( - xEmbCreator->createInstanceInitFromMediaDescriptor( xStorage, sEntName, aMediaDescr, aObjArgs ), - uno::UNO_QUERY ); + aObjectInfo.Object.set( xEmbCreator->createInstanceInitFromMediaDescriptor( xStorage, sEntName, aMediaDescr, aObjArgs ), + uno::UNO_QUERY ); } if ( ( io.dwFlags & IOF_CHECKDISPLAYASICON) && io.hMetaPict != NULL ) |