[Libreoffice-commits] core.git: sc/source
Maxim Monastirsky
momonasmon at gmail.com
Tue May 1 21:17:24 UTC 2018
sc/source/ui/app/inputhdl.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit b9708df8179fd4db377bf1d2c399623149464dd5
Author: Maxim Monastirsky <momonasmon at 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 <ci at libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon at 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:
More information about the Libreoffice-commits
mailing list