[Libreoffice-commits] core.git: offapi/com sfx2/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 25 08:04:24 UTC 2020
offapi/com/sun/star/frame/XModel2.idl | 1 +
sfx2/source/doc/sfxbasemodel.cxx | 5 +++++
2 files changed, 6 insertions(+)
New commits:
commit 99f8714280d3d451cadce63e59aec27f584bc6d3
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Tue Oct 8 11:46:05 2019 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon May 25 10:03:37 2020 +0200
sfx2 UNO API: XModel2::setArgs() now also supports "EncryptionData"
XModel2::setArgs() only permits hand-picked set of media descriptor
parameters. Add one more in preparation to API-based MS crypto rework.
Change-Id: I179a1cfc2cdd7b04becba0d7dfe9740d920ae4ee
Reviewed-on: https://gerrit.libreoffice.org/80432
Reviewed-by: Vasily Melenchuk <vasily.melenchuk at cib.de>
Tested-by: Vasily Melenchuk <vasily.melenchuk at cib.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84434
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/offapi/com/sun/star/frame/XModel2.idl b/offapi/com/sun/star/frame/XModel2.idl
index 4221a527c380..f6cb57d72500 100644
--- a/offapi/com/sun/star/frame/XModel2.idl
+++ b/offapi/com/sun/star/frame/XModel2.idl
@@ -147,6 +147,7 @@ interface XModel2 : com::sun::star::frame::XModel
<li>com::sun::star::document::MediaDescriptor::LockPrint</li>
<li>com::sun::star::document::MediaDescriptor::LockSave</li>
<li>com::sun::star::document::MediaDescriptor::LockEditDoc</li>
+ <li>com::sun::star::document::MediaDescriptor::EncryptionData @since LibreOffice 7.0</li>
</ul>
@throws com::sun::star::lang::IllegalArgumentException When trying to set an unsupported property
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 4cee94d0d95c..d647c80a4d48 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1106,6 +1106,11 @@ void SAL_CALL SfxBaseModel::setArgs(const Sequence<beans::PropertyValue>& aArgs)
ok = true;
}
}
+ else if (rArg.Name == "EncryptionData")
+ {
+ pMedium->GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, rArg.Value));
+ ok = true;
+ }
if (!ok)
{
throw lang::IllegalArgumentException("Setting property not supported: " + rArg.Name,
More information about the Libreoffice-commits
mailing list