summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/textsh1.cxx
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 /sw/source/uibase/shells/textsh1.cxx
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 'sw/source/uibase/shells/textsh1.cxx')
-rw-r--r--sw/source/uibase/shells/textsh1.cxx7
1 files changed, 7 insertions, 0 deletions
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();
}