From fa4a87bc539865962dabf00aea465479d34faf92 Mon Sep 17 00:00:00 2001 From: Trent MacAlpine Date: Sun, 26 Apr 2015 18:31:17 -0400 Subject: tdf#86850 Always display clipboard functions in context menu Change-Id: I6e8b750662894050453932dd60830e7ae4ae27f4 Reviewed-on: https://gerrit.libreoffice.org/15546 Tested-by: Jenkins Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos --- vcl/source/window/menu.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'vcl/source/window') diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 0731254ff6c9..98f95310478d 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -64,6 +64,8 @@ #include "vcl/lazydelete.hxx" +#include + #include #include @@ -1326,8 +1328,12 @@ bool Menu::ImplIsVisible( sal_uInt16 nPos ) const bVisible = false; else if ( pData->eType != MenuItemType::SEPARATOR ) // separators handled above { - // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( true ) ); - bVisible = pData->bEnabled; // do not check submenus as they might be filled at Activate(). + // tdf#86850 Always display clipboard functions + if ( pData->nId == SID_CUT || pData->nId == SID_COPY || pData->nId == SID_PASTE || pData->nId == SID_MENU_PASTE_SPECIAL ) + bVisible = true; + else + // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( true ) ); + bVisible = pData->bEnabled; // do not check submenus as they might be filled at Activate(). } } -- cgit