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 <[email protected]> AuthorDate: Tue Oct 8 11:46:05 2019 +0300 Commit: Vasily Melenchuk <[email protected]> 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 <[email protected]> Tested-by: Vasily Melenchuk <[email protected]> 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, _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
