diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-02 10:04:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-11-02 12:23:16 +0200 |
commit | 5797d29e9ead0a3dd181b616dfcc968a9127012d (patch) | |
tree | ec8828c4c2e7617f8d8e9334507bab517aed6dc9 /framework/source/helper | |
parent | 4ea0390faa22037f1d4f703c0882a027cf2ae643 (diff) |
use uno::Reference::set method instead of assignment
Change-Id: Ic979f8a7734d0ef7a915d47a875cdcd460c0cc58
Diffstat (limited to 'framework/source/helper')
-rw-r--r-- | framework/source/helper/ocomponentaccess.cxx | 8 | ||||
-rw-r--r-- | framework/source/helper/oframes.cxx | 2 | ||||
-rw-r--r-- | framework/source/helper/statusindicatorfactory.cxx | 6 | ||||
-rw-r--r-- | framework/source/helper/tagwindowasmodified.cxx | 4 | ||||
-rw-r--r-- | framework/source/helper/uiconfigelementwrapperbase.cxx | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx index cd2bdfa67ef0..68c7f58e05ff 100644 --- a/framework/source/helper/ocomponentaccess.cxx +++ b/framework/source/helper/ocomponentaccess.cxx @@ -68,7 +68,7 @@ css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration Sequence< css::uno::Reference< XComponent > > seqComponents; impl_collectAllChildComponents( css::uno::Reference< XFramesSupplier >( xLock, UNO_QUERY ), seqComponents ); OComponentEnumeration* pEnumeration = new OComponentEnumeration( seqComponents ); - xReturn = css::uno::Reference< XEnumeration >( static_cast<OWeakObject*>(pEnumeration), UNO_QUERY ); + xReturn.set( static_cast<OWeakObject*>(pEnumeration), UNO_QUERY ); } // Return result of this operation. @@ -144,7 +144,7 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons if ( !xController.is() ) { // Controller not exist - use the VCL-component. - xComponent = css::uno::Reference< XComponent >( xFrame->getComponentWindow(), UNO_QUERY ); + xComponent.set( xFrame->getComponentWindow(), UNO_QUERY ); } else { @@ -153,12 +153,12 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons if ( xModel.is() ) { // Model exist - use the model as component. - xComponent = css::uno::Reference< XComponent >( xModel, UNO_QUERY ); + xComponent.set( xModel, UNO_QUERY ); } else { // Model not exist - use the controller as component. - xComponent = css::uno::Reference< XComponent >( xController, UNO_QUERY ); + xComponent.set( xController, UNO_QUERY ); } } diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx index 224d1558c6bb..c644fde29d3c 100644 --- a/framework/source/helper/oframes.cxx +++ b/framework/source/helper/oframes.cxx @@ -292,7 +292,7 @@ void OFrames::impl_resetObject() // This instance can't work if the weakreference to owner is invalid! // Destroy this to reset this object. - m_xOwner = WeakReference< XFrame >(); + m_xOwner.clear(); // Reset pointer to shared container to! m_pFrameContainer = NULL; } diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index 4b902cda0398..dd76976b691b 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -399,7 +399,7 @@ void StatusIndicatorFactory::impl_createProgress() { // use vcl based progress implementation in plugged mode VCLStatusIndicator* pVCLProgress = new VCLStatusIndicator(xWindow); - xProgress = css::uno::Reference< css::task::XStatusIndicator >(static_cast< css::task::XStatusIndicator* >(pVCLProgress), css::uno::UNO_QUERY); + xProgress.set(static_cast< css::task::XStatusIndicator* >(pVCLProgress), css::uno::UNO_QUERY); } else if (xFrame.is()) { @@ -418,7 +418,7 @@ void StatusIndicatorFactory::impl_createProgress() css::uno::Reference< css::ui::XUIElement > xProgressBar = xLayoutManager->getElement(sPROGRESS_RESOURCE); if (xProgressBar.is()) - xProgress = css::uno::Reference< css::task::XStatusIndicator >(xProgressBar->getRealInterface(), css::uno::UNO_QUERY); + xProgress.set(xProgressBar->getRealInterface(), css::uno::UNO_QUERY); xLayoutManager->unlock(); } } @@ -460,7 +460,7 @@ void StatusIndicatorFactory::impl_showProgress() css::uno::Reference< css::ui::XUIElement > xProgressBar = xLayoutManager->getElement(sPROGRESS_RESOURCE); if (xProgressBar.is()) - xProgress = css::uno::Reference< css::task::XStatusIndicator >(xProgressBar->getRealInterface(), css::uno::UNO_QUERY); + xProgress.set(xProgressBar->getRealInterface(), css::uno::UNO_QUERY); } } diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx index 8048b084d276..15104f5fb8b6 100644 --- a/framework/source/helper/tagwindowasmodified.cxx +++ b/framework/source/helper/tagwindowasmodified.cxx @@ -139,7 +139,7 @@ void SAL_CALL TagWindowAsModified::disposing(const css::lang::EventObject& aEven (aEvent.Source == xFrame) ) { - m_xFrame = css::uno::Reference< css::frame::XFrame >(); + m_xFrame.clear(); return; } @@ -149,7 +149,7 @@ void SAL_CALL TagWindowAsModified::disposing(const css::lang::EventObject& aEven (aEvent.Source == xModel) ) { - m_xModel = css::uno::Reference< css::frame::XModel >(); + m_xModel.clear(); return; } } diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx index 9343024d351b..95da84c75fda 100644 --- a/framework/source/helper/uiconfigelementwrapperbase.cxx +++ b/framework/source/helper/uiconfigelementwrapperbase.cxx @@ -457,7 +457,7 @@ void SAL_CALL UIConfigElementWrapperBase::setSettings( const Reference< XIndexAc // Create a copy of the data if the container is not const Reference< XIndexReplace > xReplace( xSettings, UNO_QUERY ); if ( xReplace.is() ) - m_xConfigData = Reference< XIndexAccess >( static_cast< OWeakObject * >( new ConstItemContainer( xSettings ) ), UNO_QUERY ); + m_xConfigData.set( static_cast< OWeakObject * >( new ConstItemContainer( xSettings ) ), UNO_QUERY ); else m_xConfigData = xSettings; |