diff options
author | Ilhan Yesil <ilhanyesil@gmx.de> | 2018-07-31 14:36:28 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-09-10 11:03:21 +0200 |
commit | 66838c2418df4d016be0da0ef1c7e54934c03421 (patch) | |
tree | c32b23cd054b69214bd0fc1c175f6f841c0a26c5 | |
parent | eb34a6a93fcdebe545ab267d7cc7c5c72bab22c8 (diff) |
tdf#119016 Editing a read-only section shall popup a dialog
While processing the key input, an additional if statement for the
paste command (Ctrl+V) is added.
Change-Id: If205589256855422ac93f8a5ed8a1ee394ca9310
Reviewed-on: https://gerrit.libreoffice.org/58360
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 93d922967bd7..b14bad0a80d8 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2250,7 +2250,13 @@ KEYINPUT_CHECKTABLE_INSDEL: if( !m_aInBuffer.isEmpty() && ( !bNormalChar || bIsDocReadOnly )) FlushInBuffer(); - if( m_rView.KeyInput( aKeyEvent ) ) + if (rSh.HasReadonlySel() && rKeyCode.GetFunction() == KeyFuncType::PASTE) + { + auto xInfo(std::make_shared<weld::GenericDialogController>(GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui", "InfoReadonlyDialog")); + weld::DialogController::runAsync(xInfo, [](int) {}); + eKeyState = SwKeyState::End; + } + else if( m_rView.KeyInput( aKeyEvent ) ) { bFlushBuffer = true; bNormalChar = false; |