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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index e6160a5f65ed..3b5207437059 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -113,7 +113,7 @@ private: sal_uIntPtr mnObjectPos; bool mbPreview; ScopedVclPtr<PopupMenu> mpPopupMenu; - ScopedVclPtr<PopupMenu> mpBackgroundPopup; + VclPtr<PopupMenu> mpBackgroundPopup; VclPtr<GalleryBrowser2> mpBrowser; typedef std::map< int, CommandInfo > CommandInfoMap; @@ -150,6 +150,7 @@ GalleryThemePopup::GalleryThemePopup( , mpBackgroundPopup( VclPtr<PopupMenu>::Create() ) , mpBrowser( pBrowser ) { + mpPopupMenu->SetPopupMenu( MN_BACKGROUND, mpBackgroundPopup ); // SID_GALLERY_ENABLE_ADDCOPY m_aCommandInfo.insert( @@ -308,7 +309,6 @@ void GalleryThemePopup::ExecutePopup( vcl::Window *pWindow, const ::Point &aPos else { mpPopupMenu->EnableItem( MN_BACKGROUND ); - mpPopupMenu->SetPopupMenu( MN_BACKGROUND, mpBackgroundPopup ); mpBackgroundPopup->SetSelectHdl( LINK( this, GalleryThemePopup, BackgroundMenuSelectHdl ) ); } |