diff options
author | Eike Rathke <erack@redhat.com> | 2016-07-28 19:01:39 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-07-28 19:04:08 +0200 |
commit | fe46041a6b2fd29715389cc5eb2dfbaf65f7f1f9 (patch) | |
tree | a8dd6210a903c7e7345eba81a3026711ebc0e226 /framework/source/uielement | |
parent | 984b0d1599ff1672cb0d28019bd652d58d6bdefa (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
Diffstat (limited to 'framework/source/uielement')
-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 d47fdbe045ea..fdeda1fbc2b2 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -401,8 +401,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 |