[Libreoffice-commits] core.git: Branch 'feature/cib_contract3756' - offapi/com sfx2/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 10 07:42:08 UTC 2019
offapi/com/sun/star/frame/XModel2.idl | 1 +
sfx2/source/doc/sfxbasemodel.cxx | 4 ++++
2 files changed, 5 insertions(+)
New commits:
commit 69c5e70a2edb46c1c8921130548fcb41224777eb
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Tue Oct 8 11:46:05 2019 +0300
Commit: Vasily Melenchuk <vasily.melenchuk at cib.de>
CommitDate: Thu Oct 10 09:41:31 2019 +0200
uno: XModel2->setArgs() now able to set "EncryptionData"
setArgs is able to set only limited media descriptor parameters.
Extending this list by one more.
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>
diff --git a/offapi/com/sun/star/frame/XModel2.idl b/offapi/com/sun/star/frame/XModel2.idl
index 22d1ff9f82ec..a67dc346f23d 100644
--- a/offapi/com/sun/star/frame/XModel2.idl
+++ b/offapi/com/sun/star/frame/XModel2.idl
@@ -142,6 +142,7 @@ interface XModel2 : com::sun::star::frame::XModel
<ul>
<li>com::sun::star::document::MediaDescriptor::SuggestedSaveAsDir</li>
<li>com::sun::star::document::MediaDescriptor::SuggestedSaveAsName</li>
+ <li>com::sun::star::document::MediaDescriptor::EncryptionData</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 5c61dfb047fa..6cb264118b72 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1070,6 +1070,10 @@ void SAL_CALL SfxBaseModel::setArgs(const Sequence<beans::PropertyValue>& aArgs)
{
pMedium->GetItemSet()->Put(SfxStringItem(SID_SUGGESTEDSAVEASDIR, sValue));
}
+ else if (rArg.Name == "EncryptionData")
+ {
+ pMedium->GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, rArg.Value));
+ }
else
{
throw lang::IllegalArgumentException("Setting property not supported: " + rArg.Name,
More information about the Libreoffice-commits
mailing list