summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlhan Yesil <ilhanyesil@gmx.de>2018-07-31 14:36:28 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-11-28 00:42:54 +0100
commit3047cc95f329f253ecd488e70afb44a20b9b3ea4 (patch)
treea8244c8ba8ceeb873b6dd42f446ca8f44d7fda73
parentLet's calm down and end message with a period (diff)
downloadcore-3047cc95f329f253ecd488e70afb44a20b9b3ea4.tar.gz
core-3047cc95f329f253ecd488e70afb44a20b9b3ea4.zip
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.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 3be0d47726de..b5d9c1857e1d 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2251,7 +2251,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;