diff options
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r-- | sw/source/uibase/shells/annotsh.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtex.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 7 |
4 files changed, 12 insertions, 5 deletions
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 0c5467c16075..e6478adf3292 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -983,13 +983,13 @@ void SwAnnotationShell::StateClpbrd(SfxItemSet &rSet) { case SID_CUT: { - if ( (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus()==SwPostItHelper::DELETED) || !pOLV->HasSelection() ) + if (pPostItMgr->GetActiveSidebarWin()->GetLayoutStatus() == SwPostItHelper::DELETED) rSet.DisableItem( nWhich ); - break; + [[fallthrough]]; } case SID_COPY: { - if( !pOLV->HasSelection() ) + if (!pOLV->HasSelection() || rView.isContentExtractionLocked()) rSet.DisableItem( nWhich ); break; } diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 8da42ad496d4..89f4e3a00824 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -462,7 +462,7 @@ void SwBaseShell::StateClpbrd(SfxItemSet &rSet) } [[fallthrough]]; case SID_COPY: - if( !bCopy ) + if( !bCopy || GetView().isContentExtractionLocked()) rSet.DisableItem( nWhich ); break; diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index c975ecebfbae..702a08a3bedd 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -1144,7 +1144,7 @@ void SwDrawTextShell::StateClpbrd(SfxItemSet &rSet) { case SID_CUT: case SID_COPY: - if( !bCopy ) + if( !bCopy || GetView().isContentExtractionLocked()) rSet.DisableItem( nWhich ); break; diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 06ed752d11a3..57b37a1d7ef6 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1964,6 +1964,13 @@ void SwTextShell::GetState( SfxItemSet &rSet ) rSet.DisableItem(nWhich); } break; + case SID_COPY: + case SID_CUT: + { + if (GetShell().GetView().isContentExtractionLocked()) + rSet.DisableItem(nWhich); + break; + } } nWhich = aIter.NextWhich(); } |