diff options
author | Eike Rathke <erack@redhat.com> | 2016-07-28 19:01:39 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-07-28 21:21:24 +0000 |
commit | 849b2dcf38893608b3bce0c86668a0b9db802f55 (patch) | |
tree | f4d8e0c4fcb19cbd4cd9755e28f195844e9b6930 | |
parent | 7d40a0b8fcba1bda84c8e756d8000b92e768f9e2 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 6d4792420798..daa0a455a40b 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 |