diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2018-04-29 23:51:48 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2018-05-01 23:17:02 +0200 |
commit | b9708df8179fd4db377bf1d2c399623149464dd5 (patch) | |
tree | 4e5a41973a08de2ee56a8e15895543c1c645cda7 /sc | |
parent | 3def66880874e5d0f06a48abfb6d3a95b6b0dae4 (diff) |
tdf#110740 Wrong formatting when cutting from the input line
When the input line has the focus, and cutting text with a
keyboard shortcut, first we copy the contents of the cell to
the clipboard, and then immediately overwrite it with the
contents of the input line, which carries the wrong formatting.
Instead, just use the same logic as for SID_CUT (in
ScEditShell::Execute): Copy the cell contents, and delete the
contents of the input line.
Change-Id: I5f3fbdfebdee16d55af05ffcece142cd92918c5e
Reviewed-on: https://gerrit.libreoffice.org/53637
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index b734ff670033..63f5be6da1f5 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3411,8 +3411,12 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false pTableView->SetControlWord(nControl); } if (pTopView) - if ( pTopView->PostKeyEvent( rKEvt ) ) + { + if ( bUsed && rKEvt.GetKeyCode().GetFunction() == KeyFuncType::CUT ) + pTopView->DeleteSelected(); + else if ( pTopView->PostKeyEvent( rKEvt ) ) bUsed = true; + } } // AutoInput: |