diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-19 09:14:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-19 10:55:10 +0200 |
commit | ef19c82f6ade323e2708b93d77cf50ffe8b9fcfd (patch) | |
tree | 791e5c7535c255f29e23344035fb80b58c7c5bad /framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | |
parent | 7d1259319931eaa045198d55ce25bf2e1b27c806 (diff) |
merge ModuleImageManager into ImageManager
they share an underlying impl, so no need to have separate classes
Change-Id: I1093f72265f67c7ccf3c2a064c86441d792512d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119156
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx')
-rw-r--r-- | framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx index 27cb2974cf8d..d59c0158afac 100644 --- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx @@ -18,7 +18,7 @@ */ #include <accelerators/presethandler.hxx> -#include <uiconfiguration/moduleimagemanager.hxx> +#include <uiconfiguration/imagemanager.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/uielementtypenames.hxx> @@ -212,7 +212,7 @@ private: css::uno::Reference< css::uno::XComponentContext > m_xContext; osl::Mutex m_mutex; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener - css::uno::Reference< css::lang::XComponent > m_xModuleImageManager; + rtl::Reference< ImageManager > m_xModuleImageManager; css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager; }; @@ -1394,9 +1394,7 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager() if ( !m_xModuleImageManager.is() ) { - m_xModuleImageManager.set( static_cast< cppu::OWeakObject *>( new ModuleImageManager( m_xContext )), - UNO_QUERY ); - Reference< XInitialization > xInit( m_xModuleImageManager, UNO_QUERY ); + m_xModuleImageManager = new ImageManager( m_xContext, /*bForModule*/true ); uno::Sequence<uno::Any> aPropSeq(comphelper::InitAnyPropertySequence( { @@ -1404,10 +1402,10 @@ Reference< XInterface > SAL_CALL ModuleUIConfigurationManager::getImageManager() {"ModuleIdentifier", uno::Any(m_aModuleIdentifier)}, {"UserRootCommit", uno::Any(m_xUserRootCommit)}, })); - xInit->initialize( aPropSeq ); + m_xModuleImageManager->initialize( aPropSeq ); } - return Reference< XInterface >( m_xModuleImageManager, UNO_QUERY ); + return Reference< XInterface >( static_cast<cppu::OWeakObject*>(m_xModuleImageManager.get()), UNO_QUERY ); } Reference< ui::XAcceleratorConfiguration > SAL_CALL ModuleUIConfigurationManager::getShortCutManager() |