From dc773e81bd360316a96b1b61c552d263e1d87e89 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Thu, 30 Nov 2017 00:56:43 -0500 Subject: LOK: support password-protected PDF docs Change-Id: I1a1177ae7eb5af4ade2863dedf8bab7188152c5e Reviewed-on: https://gerrit.libreoffice.org/45547 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian --- desktop/source/lib/lokinteractionhandler.cxx | 12 ++++++++++-- 1 file 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>= 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) { -- cgit v1.2.3