framework/source/uielement/menubarmanager.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 849b2dcf38893608b3bce0c86668a0b9db802f55 Author: Eike Rathke <er...@redhat.com> Date: Thu Jul 28 19:01:39 2016 +0200 do not force the Paste command to enabled for Calc, tdf#60021 related ... so it actually gets disabled in menu or removed from context menu if we say so. Used with disallowing Paste for Ctrl+A selection or protected cells. Change-Id: I7d5f8bdc7b7adee65d08b93ddee015aef953d95d (cherry picked from commit fe46041a6b2fd29715389cc5eb2dfbaf65f7f1f9) Reviewed-on: https://gerrit.libreoffice.org/27648 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 6d47924..daa0a45 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -403,8 +403,14 @@ throw ( RuntimeException, std::exception ) //enable some slots hardly, because UNIX clipboard does not notify all changes // Can be removed if follow up task will be fixed directly within applications. // Note: PasteSpecial is handled specifically by calc - if ( pMenuItemHandler->aMenuItemURL == ".uno:Paste" - || pMenuItemHandler->aMenuItemURL == ".uno:PasteClipboard" ) // special for draw/impress + // Calc also disables Paste under some circumstances, do not override. + /* TODO: is this workaround even needed anymore? Was introduced + * in 2009 with commit 426ab2c0e8f6e3fe2b766f74f6b8da873d860260 + * as some "metropatch" and the other places it touched seem to + * be gone. */ + if ( (pMenuItemHandler->aMenuItemURL == ".uno:Paste" && + m_aModuleIdentifier != "com.sun.star.sheet.SpreadsheetDocument") + || pMenuItemHandler->aMenuItemURL == ".uno:PasteClipboard" ) // special for draw/impress bEnabledItem = true; #endif _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits