diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2019-11-06 15:07:42 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2019-11-07 23:57:05 +0100 |
commit | f17fb8824ce511270f23b00a425e0b839f77a46c (patch) | |
tree | 3d49b8bf6ea653434df6a2d686770e0810011c20 /framework/inc | |
parent | 2e9322d7655f1ed162c2d29c6a4cb566d07c1605 (diff) |
MenuBarManager: Honor visible property of menu items
This became a problem recently with the introduction of
notebookbar customization, as it allows to hide menu items.
As a solution, use the same approach as for toolbars (see
GenericToolbarController::statusChanged): Force menu item
visibility only if it was previously hidden via a special
status update of css::frame::status::Visibility.
Change-Id: Ief9f70a289bd2e6a4855c1f92dbc20e31c62924c
Reviewed-on: https://gerrit.libreoffice.org/82222
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'framework/inc')
-rw-r--r-- | framework/inc/uielement/menubarmanager.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/framework/inc/uielement/menubarmanager.hxx b/framework/inc/uielement/menubarmanager.hxx index a1fbdb82d0fe..407814a7640b 100644 --- a/framework/inc/uielement/menubarmanager.hxx +++ b/framework/inc/uielement/menubarmanager.hxx @@ -153,10 +153,12 @@ class MenuBarManager final : css::uno::Reference< css::frame::XStatusListener > const & xManager, css::uno::Reference< css::frame::XDispatch > const & rDispatch ) : nItemId( aItemId ), + bMadeInvisible ( false ), xSubMenuManager( xManager ), xMenuItemDispatch( rDispatch ) {} sal_uInt16 nItemId; + bool bMadeInvisible; OUString aTargetFrame; OUString aMenuItemURL; OUString aParsedItemURL; |