Kaydet (Commit) 56907b06 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

Cleanup toolbarmanager

* Remove unused fields/methods/includes
* Formatting

Change-Id: Ia4a2fba258ddf00e8fe507338f7f8c7388631f0b
Reviewed-on: https://gerrit.libreoffice.org/20164Reviewed-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: 's avatarSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
üst 52d01bb5
...@@ -139,8 +139,6 @@ class ToolBarManager : public ToolbarManager_Base ...@@ -139,8 +139,6 @@ class ToolBarManager : public ToolbarManager_Base
virtual bool MenuItemAllowed( sal_uInt16 ) const; virtual bool MenuItemAllowed( sal_uInt16 ) const;
void RemoveControllers(); void RemoveControllers();
sal_Int32 RetrievePropertiesFromCommand( const OUString& aCmdURL );
css::uno::Sequence< css::beans::PropertyValue > GetPropsForCommand( const OUString& rCmdURL );
void CreateControllers(); void CreateControllers();
void UpdateControllers(); void UpdateControllers();
//for update controller via Support Visiable //for update controller via Support Visiable
...@@ -160,9 +158,9 @@ class ToolBarManager : public ToolbarManager_Base ...@@ -160,9 +158,9 @@ class ToolBarManager : public ToolbarManager_Base
void impl_elementChanged(bool _bRemove,const css::ui::ConfigurationEvent& Event ); void impl_elementChanged(bool _bRemove,const css::ui::ConfigurationEvent& Event );
protected: protected:
typedef std::unordered_map< sal_uInt16, css::uno::Reference< css::frame::XStatusListener > > ToolBarControllerMap; typedef std::unordered_map< sal_uInt16, css::uno::Reference< css::frame::XStatusListener > > ToolBarControllerMap;
typedef ::std::vector< css::uno::Reference< css::frame::XSubToolbarController > > SubToolBarControllerVector; typedef ::std::vector< css::uno::Reference< css::frame::XSubToolbarController > > SubToolBarControllerVector;
typedef BaseHash< SubToolBarControllerVector > SubToolBarToSubToolBarControllerMap; typedef BaseHash< SubToolBarControllerVector > SubToolBarToSubToolBarControllerMap;
typedef std::unordered_map< sal_uInt16, css::uno::Reference< css::container::XIndexAccess > > MenuDescriptionMap; typedef std::unordered_map< sal_uInt16, css::uno::Reference< css::container::XIndexAccess > > MenuDescriptionMap;
...@@ -176,7 +174,7 @@ class ToolBarManager : public ToolbarManager_Base ...@@ -176,7 +174,7 @@ class ToolBarManager : public ToolbarManager_Base
long m_lImageRotation; long m_lImageRotation;
VclPtr<ToolBox> m_pToolBar; VclPtr<ToolBox> m_pToolBar;
OUString m_aModuleIdentifier; OUString m_aModuleIdentifier;
OUString m_aResourceName; OUString m_aResourceName;
...@@ -195,14 +193,11 @@ class ToolBarManager : public ToolbarManager_Base ...@@ -195,14 +193,11 @@ class ToolBarManager : public ToolbarManager_Base
css::uno::Reference< css::ui::XUIConfigurationManager > m_xUICfgMgr; css::uno::Reference< css::ui::XUIConfigurationManager > m_xUICfgMgr;
css::uno::Reference< css::ui::XUIConfigurationManager > m_xDocUICfgMgr; css::uno::Reference< css::ui::XUIConfigurationManager > m_xDocUICfgMgr;
CommandToInfoMap m_aCommandMap; CommandToInfoMap m_aCommandMap;
SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap; SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap;
Timer m_aAsyncUpdateControllersTimer; Timer m_aAsyncUpdateControllersTimer;
OUString m_sIconTheme; OUString m_sIconTheme;
MenuDescriptionMap m_aMenuMap; MenuDescriptionMap m_aMenuMap;
css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xDocAcceleratorManager;
css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xModuleAcceleratorManager;
css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager;
}; };
} }
......
...@@ -31,34 +31,29 @@ ...@@ -31,34 +31,29 @@
#include <com/sun/star/ui/ItemType.hpp> #include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/XDockableWindow.hpp> #include <com/sun/star/awt/XDockableWindow.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/ui/DockingArea.hpp> #include <com/sun/star/ui/DockingArea.hpp>
#include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/ModuleManager.hpp> #include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/theToolbarControllerFactory.hpp> #include <com/sun/star/frame/theToolbarControllerFactory.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp> #include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp> #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ImageType.hpp> #include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/UIElementType.hpp> #include <com/sun/star/ui/UIElementType.hpp>
#include <comphelper/sequence.hxx>
#include <com/sun/star/frame/status/Visibility.hpp>
#include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/URLTransformer.hpp>
#include <svtools/imgdef.hxx>
#include <svtools/toolboxcontroller.hxx> #include <svtools/toolboxcontroller.hxx>
#include <unotools/cmdoptions.hxx> #include <unotools/cmdoptions.hxx>
#include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/vclunohelper.hxx>
#include <unotools/mediadescriptor.hxx> #include <unotools/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <svtools/miscopt.hxx> #include <svtools/miscopt.hxx>
#include <svl/imageitm.hxx> #include <svl/imageitm.hxx>
#include <svtools/framestatuslistener.hxx> #include <svtools/framestatuslistener.hxx>
...@@ -621,12 +616,6 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception ...@@ -621,12 +616,6 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception
m_xFrame.clear(); m_xFrame.clear();
m_xContext.clear(); m_xContext.clear();
Reference< XComponent > xCompGAM( m_xGlobalAcceleratorManager, UNO_QUERY );
if ( xCompGAM.is() )
xCompGAM->dispose();
m_xGlobalAcceleratorManager.clear();
m_xModuleAcceleratorManager.clear();
m_xDocAcceleratorManager.clear();
// stop timer to prevent timer events after dispose // stop timer to prevent timer events after dispose
// do it last because other calls could restart timer in StateChanged() // do it last because other calls could restart timer in StateChanged()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment