framework/source/uielement/menubarmanager.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 5cd1a727430559ccc9bf3008eaff7d9ec37e4958 Author: Mike Kaganski <[email protected]> AuthorDate: Tue Jul 8 08:55:49 2025 +0200 Commit: Mike Kaganski <[email protected]> CommitDate: Fri Jul 11 08:36:49 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/+/187614 Reviewed-by: Mike Kaganski <[email protected]> Tested-by: Jenkins diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index f740121f386c..9627d7d9f437 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
