Kaydet (Commit) b9708df8 authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

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/53637Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst 3def6688
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment