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

tdf#119128 toggle INSERT/OVERWRITE is broken

Regression of 632bc11c
("tdf#117017 Pasting into the formula bar shouldn't
retain formatting"). Toggling the overwrite mode sets
the EVControlBits::OVERWRITE bit from inside the editeng
keyboard handler, so make sure to not override it.

Change-Id: I2b5e3fe9cb885ed20e7528fdfe2fd59f5ef05f42
Reviewed-on: https://gerrit.libreoffice.org/58658
Tested-by: Jenkins
Reviewed-by: 's avatarMaxim Monastirsky <momonasmon@gmail.com>
üst 2fa47f8c
...@@ -3412,15 +3412,14 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false ...@@ -3412,15 +3412,14 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
{ {
if (pTableView) if (pTableView)
{ {
EVControlBits nControl = pTableView->GetControlWord();
if (pTopView) if (pTopView)
pTableView->SetControlWord(nControl | EVControlBits::SINGLELINEPASTE); pTableView->SetControlWord(pTableView->GetControlWord() | EVControlBits::SINGLELINEPASTE);
vcl::Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : nullptr; vcl::Window* pFrameWin = pActiveViewSh ? pActiveViewSh->GetFrameWin() : nullptr;
if ( pTableView->PostKeyEvent( rKEvt, pFrameWin ) ) if ( pTableView->PostKeyEvent( rKEvt, pFrameWin ) )
bUsed = true; bUsed = true;
pTableView->SetControlWord(nControl); pTableView->SetControlWord(pTableView->GetControlWord() & ~EVControlBits::SINGLELINEPASTE);
} }
if (pTopView) if (pTopView)
{ {
......
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