summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-10-10 08:13:51 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-10-14 08:15:31 +0200
commit075f20a4b696f9e85d11dc977806e41a49e6de61 (patch)
tree30827954123e3dd54764c74ccad37302f05b2816 /sc/source/ui/drawfunc
parent03ec3b7dd11656c8b64a94efb172e17d97ea662e (diff)
Add document-level option to lock down content extraction
Setting this option will prevent copying/dragging any content from LO to another program or even another LO window. Change-Id: Ifbc032a4fa69ac1a17d4b500f5a30f5399d84ed7 Reviewed-on: https://gerrit.libreoffice.org/80586 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx6
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx6
2 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index 4f7c591339bb..a3da77fd7296 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -147,6 +147,12 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
rSet.DisableItem( SID_FLIP_VERTICAL );
}
+ if (pViewData->GetViewShell()->isContentExtractionLocked())
+ {
+ rSet.DisableItem(SID_COPY);
+ rSet.DisableItem(SID_CUT);
+ }
+
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
const size_t nMarkCount = rMarkList.GetMarkCount();
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 92910b2dea87..17f8321d58e2 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -466,6 +466,12 @@ void ScDrawTextObjectBar::GetState( SfxItemSet& rSet )
if (!bCanDoThesaurus)
rSet.DisableItem( SID_THESAURUS );
}
+
+ if (pViewData->GetViewShell()->isContentExtractionLocked())
+ {
+ rSet.DisableItem(SID_COPY);
+ rSet.DisableItem(SID_CUT);
+ }
}
IMPL_LINK( ScDrawTextObjectBar, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )