summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlhan Yesil <ilhanyesil@gmx.de>2018-07-31 14:36:28 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-09-14 13:21:19 +0200
commitb6310c1e403b80e2c6b87f2cfc1ab9132ecd90e0 (patch)
tree1a4d42cc0c4e2d5440830c3fa56e20029d86a21b
parent19759611473383003773d55c104ae6c7f3d0230b (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> (cherry picked from commit 66838c2418df4d016be0da0ef1c7e54934c03421) Reviewed-on: https://gerrit.libreoffice.org/60269 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@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 b8b8b588c296..cd8347f707ef 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2321,7 +2321,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;