diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-06-28 02:15:04 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-07-06 15:34:32 +0200 |
commit | 18c1755460f57a626e72987d1f3e8c326c82f441 (patch) | |
tree | 931c12e9f4da2362a7458dc318f1aa1bd019d7c8 /sc | |
parent | f79c4146930bd20deb0a2e399d31c1f1275fbfee (diff) |
handle SID_ENCRYPTIONDATA for shared password protected docs, tdf#56173
Change-Id: Iadfe880b7be3186410a08568844d8812f176005d
Reviewed-on: https://gerrit.libreoffice.org/39332
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 669c12d59b6131f44945f166c77ae98df52ebb9e)
Reviewed-on: https://gerrit.libreoffice.org/39337
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 20ca5b5fae58ee46362fbd4c5f51ee21e89c3c35)
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 0bc4581359c7..20f962546326 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2458,6 +2458,13 @@ uno::Reference< frame::XModel > ScDocShell::LoadSharedDocument() aArgs[1].Name = "Password"; aArgs[1].Value <<= pPasswordItem->GetValue(); } + const SfxUnoAnyItem* pEncryptionItem = SfxItemSet::GetItem<SfxUnoAnyItem>(GetMedium()->GetItemSet(), SID_ENCRYPTIONDATA, false); + if (pEncryptionItem) + { + aArgs.realloc(aArgs.getLength() + 1); + aArgs[aArgs.getLength() - 1].Name = "EncryptionData"; + aArgs[aArgs.getLength() - 1].Value = pEncryptionItem->GetValue(); + } } xModel.set( |