diff options
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtdd.cxx | 3 | ||||
-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 |
6 files changed, 18 insertions, 5 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 20639bacd8bf..67a5d390c2e0 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1108,6 +1108,9 @@ int SwTransferable::PrepareForCopy( bool bIsCut ) int SwTransferable::Copy( bool bIsCut ) { + if (m_pWrtShell->GetView().isContentExtractionLocked()) + return 0; + int nRet = PrepareForCopy( bIsCut ); if ( nRet ) { diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index 2a4fdb2eb9e9..f9488aca1b38 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -66,6 +66,9 @@ void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt) void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) { + if (m_rView.isContentExtractionLocked()) + return; + SwWrtShell &rSh = m_rView.GetWrtShell(); if( rSh.GetDrawView() ) { 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(); } |