diff options
Diffstat (limited to 'sw/source/uibase/docvw/edtwin.cxx')
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 687786b51bfa..dfb09bcaa23c 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5354,7 +5354,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) { bool bIsDocReadOnly = m_rView.GetDocShell()->IsReadOnly() && rSh.IsCursorReadonly(); - if(!bIsDocReadOnly) + if (!bIsDocReadOnly && !rSh.HasReadonlySel()) { if( m_pQuickHlpData->m_bIsDisplayed ) m_pQuickHlpData->Stop( rSh ); @@ -5388,6 +5388,14 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) } } } + + if (rSh.HasReadonlySel()) + { + // Inform the user that the request has been ignored. + auto xInfo = std::make_shared<weld::GenericDialogController>( + GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui", "InfoReadonlyDialog"); + weld::DialogController::runAsync(xInfo, [](sal_Int32 /*nResult*/) {}); + } } break; case CommandEventId::CursorPos: |