summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-11-30 00:56:43 -0500
committerJan Holesovsky <kendy@collabora.com>2017-11-30 10:54:51 +0100
commit82fb0abc37320fb1157b21efbf31954190353d41 (patch)
treeaeeb4a98618cda82a0a91e41494a870bda12c32b
parentfe96bca99cf378579a204813eb88bef143c24fe4 (diff)
LOK: support password-protected PDF docs
Change-Id: I1a1177ae7eb5af4ade2863dedf8bab7188152c5e Reviewed-on: https://gerrit.libreoffice.org/45547 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit dc773e81bd360316a96b1b61c552d263e1d87e89) Reviewed-on: https://gerrit.libreoffice.org/45563 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r--desktop/source/lib/lokinteractionhandler.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx
index 58d4052324d7..b4fef17266c5 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -250,14 +250,22 @@ bool LOKInteractionHandler::handlePasswordRequest(const uno::Sequence<uno::Refer
OString sUrl;
- task::DocumentPasswordRequest2 passwordRequest;
+ task::DocumentPasswordRequest passwordRequest;
if (rRequest >>= passwordRequest)
{
- bIsRequestPasswordToModify = passwordRequest.IsRequestPasswordToModify;
+ bIsRequestPasswordToModify = false;
sUrl = passwordRequest.Name.toUtf8();
bPasswordRequestFound = true;
}
+ task::DocumentPasswordRequest2 passwordRequest2;
+ if (rRequest >>= passwordRequest2)
+ {
+ bIsRequestPasswordToModify = passwordRequest2.IsRequestPasswordToModify;
+ sUrl = passwordRequest2.Name.toUtf8();
+ bPasswordRequestFound = true;
+ }
+
task::DocumentMSPasswordRequest2 passwordMSRequest;
if (rRequest >>= passwordMSRequest)
{