diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-30 14:34:18 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-10-30 15:50:31 +0200 |
commit | 94876fe2704cb5107234ad76c86122ac9d95f866 (patch) | |
tree | d55701606099ce3db9f3b051166a4ba33fb58e7f /framework/inc | |
parent | 99da628e17e873a5fa2f726e7a1732b21c3d4b33 (diff) |
Let Menu dispose submenus
(I'm not sure about how good are the changes from ScopedVclPtr
to non-scoped, and disposeAndClear to clear. They aren't really
needed, because of the VclReferenceBase::mbDisposed logic. But
at least they should be safe, as long as we have disposeOnce
calls in Menu's dtor.)
See also previous commits:
4433d95b374c13a3501cdf3a6e273f68eb49873a
("MenuItemData now properly disposes the submenu")
89c23b4aaef931b5d6009efaf44ce6e6c976e8d4
("Sub menus no longer need manual disposing")
Change-Id: I9d455a94590f5eec9b097947f6984f1b3e477b52
Diffstat (limited to 'framework/inc')
-rw-r--r-- | framework/inc/uielement/menubarmanager.hxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index b462d8d88659..e8f1e65ae2c3 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -81,9 +81,7 @@ class MenuBarManager : public css::frame::XStatusListener , const css::uno::Reference< css::frame::XFrame >& rFrame, const css::uno::Reference< css::util::XURLTransformer >& _xURLTransformer, Menu* pAddonMenu, - bool bDelete, - bool bDeleteChildren, - bool popup); + bool popup); public: MenuBarManager( @@ -94,7 +92,6 @@ class MenuBarManager : public css::frame::XStatusListener , const OUString& aModuleIdentifier, Menu* pMenu, bool bDelete, - bool bDeleteChildren, bool bHasMenuBar = true ); virtual ~MenuBarManager() override; @@ -145,8 +142,7 @@ class MenuBarManager : public css::frame::XStatusListener , const css::uno::Reference< css::frame::XFrame >& rFrame, const css::uno::Reference< css::frame::XDispatchProvider >& rDispatchProvider, const OUString& rModuleIdentifier, - bool bDelete, - bool bDeleteChildren ); + bool bDelete ); void SetItemContainer( const css::uno::Reference< css::container::XIndexAccess >& rItemContainer ); void GetPopupController( PopupControllerCache& rPopupController ); @@ -197,12 +193,11 @@ class MenuBarManager : public css::frame::XStatusListener , bool CreatePopupMenuController( MenuItemHandler* pMenuItemHandler ); void AddMenu(MenuBarManager* pSubMenuManager,const OUString& _sItemCommand,sal_uInt16 _nItemId); sal_uInt16 FillItemCommand(OUString& _rItemCommand, Menu* _pMenu,sal_uInt16 _nIndex) const; - void Init(const css::uno::Reference< css::frame::XFrame >& rFrame,Menu* pAddonMenu,bool bDelete,bool bDeleteChildren,bool _bHandlePopUp); + void Init(const css::uno::Reference< css::frame::XFrame >& rFrame,Menu* pAddonMenu,bool _bHandlePopUp); void SetHdl(); bool m_bDisposed; bool m_bDeleteMenu; - bool m_bDeleteChildren; bool m_bActive; bool m_bIsBookmarkMenu; bool m_bShowMenuImages; |