framework/source/uielement/menubarmanager.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 591ca0f1e734431ec76c2c30f25a10fbc1388507 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Jul 8 08:55:49 2025 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Jul 11 08:35:47 2025 +0200 LOK: Don't enable paste unconditionally The special case for .uno:Paste*, even if still needed (?), is for system clipboard deficiency, which is not relevant for LOK. Change-Id: I85a78ad6ce6be7413c405e3dfa7a42589d4eafaa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187528 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index caa0aaa36ce3..dc34ebbc6882 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/frame/status/Visibility.hpp> #include <com/sun/star/util/URLTransformer.hpp> +#include <comphelper/lok.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/propertyvalue.hxx> #include <officecfg/Office/Common.hxx> @@ -269,9 +270,10 @@ void SAL_CALL MenuBarManager::statusChanged( const FeatureStateEvent& Event ) * in 2009 with commit 426ab2c0e8f6e3fe2b766f74f6b8da873d860260 * as some "metropatch" and the other places it touched seem to * be gone. */ - if ( (menuItemHandler->aMenuItemURL == ".uno:Paste" && + if (!comphelper::LibreOfficeKit::isActive() && + ((menuItemHandler->aMenuItemURL == ".uno:Paste" && m_aModuleIdentifier != "com.sun.star.sheet.SpreadsheetDocument") - || menuItemHandler->aMenuItemURL == ".uno:PasteClipboard" ) // special for draw/impress + || menuItemHandler->aMenuItemURL == ".uno:PasteClipboard")) // special for draw/impress bEnabledItem = true; #endif