Still able to copy text after disabling command

Maxim Monastirsky momonasmon at gmail.com
Sun May 1 23:05:13 UTC 2016


Hi,

On Fri, 2016-04-29 at 14:31 +0000, Lucas da Cunha wrote:
> I'm trying to disable Copy (ctrl + C) using java UNO API.

> The problem with Copy is that even the command not being in menu, I
> am still able to Copy text using Ctrl + C.
> 
> Is this a bug?
Well, sw/source/uibase/docvw/edtwin.cxx has this:

2322  // Because Sfx accelerators are only called when they were
2323  // enabled at the last status update, copy has to called
2324  // 'forcefully' by us if necessary.
2325  if( rKeyCode.GetFunction() == KeyFuncType::COPY )
2326      GetView().GetViewFrame()->GetBindings().Execute(SID_COPY);

So this is "by design".

Maxim


More information about the LibreOffice mailing list