sc/source/ui/app/inputhdl.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit b9708df8179fd4db377bf1d2c399623149464dd5 Author: Maxim Monastirsky <momonas...@gmail.com> Date: Sun Apr 29 23:51:48 2018 +0300 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 <c...@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonas...@gmail.com> 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: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits