From 78a40705290ffb431cfeb4ef1ff3780d207fe6de 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 Reviewed-on: https://gerrit.libreoffice.org/45547 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian (cherry picked from commit dc773e81bd360316a96b1b61c552d263e1d87e89) Reviewed-on: https://gerrit.libreoffice.org/45563 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky (cherry picked from commit 82fb0abc37320fb1157b21efbf31954190353d41) Change-Id: I48d959dba2c38b72d1d6fc0fa9171b96dbed0e7c Reviewed-on: https://gerrit.libreoffice.org/46986 Tested-by: Jenkins Reviewed-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 96d35a235efc..8c77471eb4be 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -248,14 +248,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