diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-06-28 02:15:04 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-07-03 21:08:46 +0200 |
commit | 967fd3e7a6e37495be17c2dfa62e05944cfa6af8 (patch) | |
tree | 21dc68b3685bd29103506a9477437b45954730e1 | |
parent | 0acf23e1ad2bee0e2405c138619e2bb6ed0fba19 (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/39336
Reviewed-by: Eike Rathke <erack@redhat.com>
-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 1cd085e0b3aa..bc4a8a8df386 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2441,6 +2441,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( |