diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-27 18:22:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-01 19:34:08 +0100 |
commit | 05d6dae5ebd172c6738dc8cd7c94b57f671f698e (patch) | |
tree | e21bb9218d09f52c0c700357ae814797657a6cea /framework/source | |
parent | ee7368f6289ffc46425e4f3db1f7b40b7e6e089e (diff) |
loplugin:refcounting in sfx2
Change-Id: Iba7b1be688f1a7c1b0947c2423cc1965362386b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111682
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/fwe/classes/sfxhelperfunctions.cxx | 6 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/framework/source/fwe/classes/sfxhelperfunctions.cxx b/framework/source/fwe/classes/sfxhelperfunctions.cxx index c6fe0bf030f1..c96791c2f422 100644 --- a/framework/source/fwe/classes/sfxhelperfunctions.cxx +++ b/framework/source/fwe/classes/sfxhelperfunctions.cxx @@ -20,6 +20,8 @@ #include <framework/sfxhelperfunctions.hxx> #include <framework/ContextChangeEventMultiplexerTunnel.hxx> #include <helper/mischelper.hxx> +#include <svtools/toolboxcontroller.hxx> +#include <svtools/statusbarcontroller.hxx> static pfunc_setToolBoxControllerCreator pToolBoxControllerCreator = nullptr; static pfunc_setStatusBarControllerCreator pStatusBarControllerCreator = nullptr; @@ -41,7 +43,7 @@ pfunc_setToolBoxControllerCreator SetToolBoxControllerCreator( pfunc_setToolBoxC return pOldSetToolBoxControllerCreator; } -svt::ToolboxController* CreateToolBoxController( const Reference< XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const OUString& aCommandURL ) +rtl::Reference<svt::ToolboxController> CreateToolBoxController( const Reference< XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const OUString& aCommandURL ) { pfunc_setToolBoxControllerCreator pFactory = nullptr; { @@ -63,7 +65,7 @@ pfunc_setStatusBarControllerCreator SetStatusBarControllerCreator( pfunc_setStat return pOldSetStatusBarControllerCreator; } -svt::StatusbarController* CreateStatusBarController( const Reference< XFrame >& rFrame, StatusBar* pStatusBar, unsigned short nID, const OUString& aCommandURL ) +rtl::Reference<svt::StatusbarController> CreateStatusBarController( const Reference< XFrame >& rFrame, StatusBar* pStatusBar, unsigned short nID, const OUString& aCommandURL ) { pfunc_setStatusBarControllerCreator pFactory = nullptr; { diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 6902bcf49e00..d88ba1384f39 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -669,7 +669,7 @@ void ToolBarManager::CreateControllers() bool bCreate( true ); Reference< XStatusListener > xController; - svt::ToolboxController* pController( nullptr ); + rtl::Reference<svt::ToolboxController> pController; OUString aCommandURL( m_pToolBar->GetItemCommand( nId ) ); // Command can be just an alias to another command. @@ -768,7 +768,7 @@ void ToolBarManager::CreateControllers() } else if ( pController ) { - xController.set( static_cast< ::cppu::OWeakObject *>( pController ), UNO_QUERY ); + xController = pController; } } |