diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-10-10 08:13:51 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-10-14 08:15:31 +0200 |
commit | 075f20a4b696f9e85d11dc977806e41a49e6de61 (patch) | |
tree | 30827954123e3dd54764c74ccad37302f05b2816 /sfx2/source/doc | |
parent | 03ec3b7dd11656c8b64a94efb172e17d97ea662e (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 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index cc2aae255542..f4019db6b98d 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1062,16 +1062,23 @@ void SAL_CALL SfxBaseModel::setArgs(const Sequence<beans::PropertyValue>& aArgs) for (const auto& rArg : aArgs) { OUString sValue; - rArg.Value >>= sValue; + bool bValue; if (rArg.Name == "SuggestedSaveAsName") { + rArg.Value >>= sValue; pMedium->GetItemSet()->Put(SfxStringItem(SID_SUGGESTEDSAVEASNAME, sValue)); } else if (rArg.Name == "SuggestedSaveAsDir") { + rArg.Value >>= sValue; pMedium->GetItemSet()->Put(SfxStringItem(SID_SUGGESTEDSAVEASDIR, sValue)); } + else if (rArg.Name == "LockContentExtraction") + { + rArg.Value >>= bValue; + pMedium->GetItemSet()->Put(SfxBoolItem(SID_LOCK_CONTENT_EXTRACTION, bValue)); + } else { throw lang::IllegalArgumentException("Setting property not supported: " + rArg.Name, |