diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-01-25 20:25:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-25 20:21:48 +0100 |
commit | 1aa31294b2d3fb562ba33d5d873da62439944f07 (patch) | |
tree | 79a604d51b0c54768c07ed8c4643cf43b29d8fca /framework | |
parent | 2dbc9266ec2207c2719c0104168cfcad9f6948da (diff) |
avoid some ref-counting
can just return a pointer here, instead of VclPtr.
Change-Id: I9ab8962cbbe84ed4dfcfd658a6d758112914cb89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109923
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 2 | ||||
-rw-r--r-- | framework/source/layoutmanager/toolbarlayoutmanager.cxx | 22 | ||||
-rw-r--r-- | framework/source/uielement/popuptoolbarcontroller.cxx | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index e080497b066b..d484ca108a95 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -719,7 +719,7 @@ void LayoutManager::implts_writeWindowStateData( const OUString& aName, const UI // Retrieve output size from container Window SolarMutexGuard aGuard; - pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ).get(); + pContainerWindow = VCLUnoHelper::GetWindow( m_xContainerWindow ); if ( pContainerWindow ) aContainerWinSize = pContainerWindow->GetOutputSizePixel(); diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 154374ee0d56..4182dba99590 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -820,7 +820,7 @@ bool ToolbarLayoutManager::dockToolbar( std::u16string_view rResourceURL, ui::Do { SolarMutexGuard aGuard; - pWindow = VCLUnoHelper::GetWindow( xWindow ).get(); + pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX ) { pToolBox = static_cast<ToolBox *>(pWindow); @@ -1026,16 +1026,16 @@ void ToolbarLayoutManager::setParentWindow( if ( xParentWindow.is() ) { SolarMutexGuard aGuard; - VclPtr< ::DockingAreaWindow > pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xTopDockWindow ).get() ); + VclPtr< ::DockingAreaWindow > pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xTopDockWindow ) ); if( pWindow ) pWindow->SetAlign( WindowAlign::Top ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xBottomDockWindow ).get() ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xBottomDockWindow ) ); if( pWindow ) pWindow->SetAlign( WindowAlign::Bottom ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xLeftDockWindow ).get() ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xLeftDockWindow ) ); if( pWindow ) pWindow->SetAlign( WindowAlign::Left ); - pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xRightDockWindow ).get() ); + pWindow = dynamic_cast< ::DockingAreaWindow* >(VCLUnoHelper::GetWindow( xRightDockWindow ) ); if( pWindow ) pWindow->SetAlign( WindowAlign::Right ); implts_reparentToolbars(); @@ -1399,7 +1399,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno { SolarMutexGuard aGuard; - pWindow = VCLUnoHelper::GetWindow( xWindow ).get(); + pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow ) { OUString aText = pWindow->GetText(); @@ -2252,7 +2252,7 @@ void ToolbarLayoutManager::implts_findNextDockingPos( ui::DockingArea DockingAre ::Size aDockingWinSize; // Retrieve output size from container Window - vcl::Window* pDockingWindow = VCLUnoHelper::GetWindow( xDockingWindow ).get(); + vcl::Window* pDockingWindow = VCLUnoHelper::GetWindow( xDockingWindow ); if ( pDockingWindow ) aDockingWinSize = pDockingWindow->GetOutputSizePixel(); aReadLock.clear(); @@ -2601,7 +2601,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( { // Retrieve output size from container Window SolarMutexGuard aGuard; - pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ).get(); + pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); aContainerWinSize = pContainerWindow->GetOutputSizePixel(); } @@ -2627,7 +2627,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize( { SolarMutexGuard aGuard; - pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ).get(); + pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); VclPtr<vcl::Window> pDockWindow = VCLUnoHelper::GetWindow( xWindow ); ToolBox* pToolBox( nullptr ); if ( pDockWindow && pDockWindow->GetType() == WindowType::TOOLBOX ) @@ -3063,7 +3063,7 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d sal_Int32 nDockPosY( 0 ); { SolarMutexGuard aGuard; - vcl::Window* pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ).get(); + vcl::Window* pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ); VclPtr<vcl::Window> pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); nDockPosY = pDockingAreaWindow->ScreenToOutputPixel( pContainerWindow->OutputToScreenPixel( ::Point( 0, nPosY ))).Y(); } @@ -3608,7 +3608,7 @@ void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( const lang::EventObject& { SolarMutexGuard aGuard; xWindow.set( e.Source, uno::UNO_QUERY ); - pWindow = VCLUnoHelper::GetWindow( xWindow ).get(); + pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX ) pToolBox = static_cast<ToolBox *>(pWindow); diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 36ad65f19cc2..51fcd4f4ee13 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -192,7 +192,7 @@ PopupMenuToolbarController::createPopupWindow() createPopupMenuController(); SolarMutexGuard aSolarLock; - VclPtr< ToolBox > pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ).get() ); + VclPtr< ToolBox > pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) ); if ( !pToolBox ) return xRet; @@ -744,7 +744,7 @@ sal_uInt16 NewToolbarController::getMenuIdForCommand( std::u16string_view rComma void SAL_CALL NewToolbarController::updateImage() { SolarMutexGuard aSolarLock; - VclPtr< ToolBox> pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ).get() ); + VclPtr< ToolBox> pToolBox = static_cast< ToolBox* >( VCLUnoHelper::GetWindow( getParent() ) ); if ( !pToolBox ) return; |