diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-01 09:05:58 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-01 15:26:10 +0000 |
commit | 0e6544903bc572d1d6051cbb89a4cfb727401159 (patch) | |
tree | 5090895789c763971457ef11fc8de55aed77d019 /framework | |
parent | b5db48ada113206ac090e4a08f2ae211859103ed (diff) |
no need to be so verbose in constructing uno::Reference
Change-Id: I187a26e200e9ecaff2adaf53a2ba3f6e87346030
Reviewed-on: https://gerrit.libreoffice.org/19724
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/helper/ocomponentaccess.cxx | 4 | ||||
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 8 | ||||
-rw-r--r-- | framework/source/services/desktop.cxx | 4 | ||||
-rw-r--r-- | framework/source/uielement/macrosmenucontroller.cxx | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx index d5f478b0a6b4..cd2bdfa67ef0 100644 --- a/framework/source/helper/ocomponentaccess.cxx +++ b/framework/source/helper/ocomponentaccess.cxx @@ -55,7 +55,7 @@ css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration // Set default return value, if method failed. // If no desktop exist and there is no task container - return an empty enumeration! - css::uno::Reference< XEnumeration > xReturn = css::uno::Reference< XEnumeration >(); + css::uno::Reference< XEnumeration > xReturn; // Try to "lock" the desktop for access to task container. css::uno::Reference< XInterface > xLock = m_xOwner.get(); @@ -138,7 +138,7 @@ void OComponentAccess::impl_collectAllChildComponents( const css::uno::Refere css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( const css::uno::Reference< XFrame >& xFrame ) const { // Set default return value, if method failed. - css::uno::Reference< XComponent > xComponent = css::uno::Reference< XComponent >(); + css::uno::Reference< XComponent > xComponent; // Does no controller exists? css::uno::Reference< XController > xController = xFrame->getController(); if ( !xController.is() ) diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 56806fe2c35f..bde6b83204bd 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -1015,10 +1015,10 @@ void ToolbarLayoutManager::setParentWindow( { static const char DOCKINGAREASTRING[] = "dockingarea"; - uno::Reference< awt::XWindow > xTopDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xLeftDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xRightDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); - uno::Reference< awt::XWindow > xBottomDockWindow = uno::Reference< awt::XWindow >( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xTopDockWindow( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xLeftDockWindow( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xRightDockWindow( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); + uno::Reference< awt::XWindow > xBottomDockWindow( createToolkitWindow( m_xContext, xParentWindow, DOCKINGAREASTRING ), uno::UNO_QUERY ); SolarMutexClearableGuard aWriteLock; m_xContainerWindow = uno::Reference< awt::XWindow2 >( xParentWindow, uno::UNO_QUERY ); diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 2f02a4ce5e23..8ef42297d4f3 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -525,10 +525,10 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::getCurrentFrame() th // Start search with our direct active frame (if it exist!). // Search on his children for other active frames too. // Stop if no one could be found and return last of found ones. - css::uno::Reference< css::frame::XFramesSupplier > xLast = css::uno::Reference< css::frame::XFramesSupplier >( getActiveFrame(), css::uno::UNO_QUERY ); + css::uno::Reference< css::frame::XFramesSupplier > xLast( getActiveFrame(), css::uno::UNO_QUERY ); if( xLast.is() ) { - css::uno::Reference< css::frame::XFramesSupplier > xNext = css::uno::Reference< css::frame::XFramesSupplier >( xLast->getActiveFrame(), css::uno::UNO_QUERY ); + css::uno::Reference< css::frame::XFramesSupplier > xNext( xLast->getActiveFrame(), css::uno::UNO_QUERY ); while( xNext.is() ) { xLast = xNext; diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index 685e14a89a19..4dc434ca5235 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -135,7 +135,7 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 sta const OUString providerKey("com.sun.star.script.provider.ScriptProviderFor"); const OUString languageProviderName("com.sun.star.script.provider.LanguageScriptProvider"); sal_uInt16 itemId = startItemId; - Reference< XContentEnumerationAccess > xEnumAccess = Reference< XContentEnumerationAccess >( m_xContext->getServiceManager(), UNO_QUERY_THROW ); + Reference< XContentEnumerationAccess > xEnumAccess( m_xContext->getServiceManager(), UNO_QUERY_THROW ); Reference< XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( languageProviderName ); while ( xEnum->hasMoreElements() ) |