From 402e2ab0bbb6ee1b154bc5087044639201832b00 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Fri, 25 Dec 2020 13:40:33 -0400 Subject: lok: add interaction handler "macro security" confirmation When a client side request to load document with macros embedded, it will show the "Macro Security Warning" message dialog. Change-Id: Id848980a4fd3a5138bc98c43e57044f7d5ce3189 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108292 Tested-by: Jenkins Reviewed-by: Henry Castro --- desktop/source/lib/lokinteractionhandler.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'desktop') diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx index 0933e4c230a7..7561bb968dd4 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -21,11 +21,14 @@ #include +#include #include #include #include #include +#include +#include #include #include @@ -345,6 +348,19 @@ sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest( if (handlePasswordRequest(rContinuations, request)) return true; + task::DocumentMacroConfirmationRequest aConfirmRequest; + if (request >>= aConfirmRequest) + { + uno::Reference< task::XInteractionHandler2 > xInteraction( + task::InteractionHandler::createWithParent( + ::comphelper::getProcessComponentContext(), nullptr)); + + if (xInteraction.is()) + xInteraction->handleInteractionRequest(xRequest); + + return true; + } + // TODO: perform more interactions 'for real' like the above selectApproved(rContinuations); -- cgit