diff options
author | Pranav Kant <pranavk@collabora.com> | 2016-05-24 16:52:27 +0530 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.com> | 2016-05-24 16:52:27 +0530 |
commit | 7e4711e642f6b085698a0d2912b0381cb7a2c9c3 (patch) | |
tree | b8ab5443783b7dac19e0124fdddcf6777bab00da | |
parent | lok context menu: Expose context menu (diff) | |
download | core-7e4711e642f6b085698a0d2912b0381cb7a2c9c3.tar.gz core-7e4711e642f6b085698a0d2912b0381cb7a2c9c3.zip |
lok context menu: Remove disabled items (set enabled to false)
Change-Id: I18a95cc53f9e79eab257baa4d7b23853cb05e039
-rw-r--r-- | sfx2/source/menu/mnumgr.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 715f9a6cbc60..bc6e473124b7 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -478,6 +478,8 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram pSVMenu = static_cast<PopupMenu*>( pMenu ); } + SfxPopupMenuManager aPop( pSVMenu, pFrame->GetBindings() ); + aPop.RemoveDisabledEntries(); if (comphelper::LibreOfficeKit::isActive()) { boost::property_tree::ptree aMenu = fillPopupMenu(pSVMenu); @@ -490,11 +492,7 @@ void SfxPopupMenuManager::ExecutePopup( const ResId& rResId, SfxViewFrame* pFram objSh->libreOfficeKitCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str()); } else - { - SfxPopupMenuManager aPop( pSVMenu, pFrame->GetBindings() ); - aPop.RemoveDisabledEntries(); aPop.Execute( rPoint, pWindow ); - } // #i112646 avoid crash when context menu is closed. // the (manually inserted) sub-menu needs to be destroyed before |