summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/lib/lokinteractionhandler.cxx24
-rw-r--r--desktop/source/lib/lokinteractionhandler.hxx2
-rw-r--r--uui/source/iahndl-errorhandler.cxx1
3 files changed, 26 insertions, 1 deletions
diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx
index 6df4fe2d98e5..a05091cedf5e 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -23,6 +23,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/document/BrokenPackageRequest.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/task/XInteractionAbort.hpp>
#include <com/sun/star/task/XInteractionApprove.hpp>
#include <com/sun/star/task/XInteractionPassword2.hpp>
@@ -368,6 +369,26 @@ bool LOKInteractionHandler::handlePackageReparationRequest(const uno::Reference<
return false;
}
+bool LOKInteractionHandler::handleLoadReadOnlyRequest(const uno::Reference<task::XInteractionRequest>& xRequest)
+{
+ uno::Any const request(xRequest->getRequest());
+
+ OUString aFileName;
+ beans::NamedValue aLoadReadOnlyRequest;
+ if ((request >>= aLoadReadOnlyRequest) &&
+ aLoadReadOnlyRequest.Name == "LoadReadOnlyRequest" &&
+ (aLoadReadOnlyRequest.Value >>= aFileName))
+ {
+ auto xInteraction(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), nullptr));
+
+ if (xInteraction.is())
+ xInteraction->handleInteractionRequest(xRequest);
+
+ return true;
+ }
+ return false;
+}
+
bool LOKInteractionHandler::handleFilterOptionsRequest(const uno::Reference<task::XInteractionRequest>& xRequest)
{
document::FilterOptionsRequest aFilterOptionsRequest;
@@ -410,6 +431,9 @@ sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest(
if (handlePackageReparationRequest(xRequest))
return true;
+ if (handleLoadReadOnlyRequest(xRequest))
+ return true;
+
// TODO: perform more interactions 'for real' like the above
selectApproved(rContinuations);
diff --git a/desktop/source/lib/lokinteractionhandler.hxx b/desktop/source/lib/lokinteractionhandler.hxx
index fc2bf12b48cc..c3641db0762f 100644
--- a/desktop/source/lib/lokinteractionhandler.hxx
+++ b/desktop/source/lib/lokinteractionhandler.hxx
@@ -79,6 +79,8 @@ private:
static bool handleFilterOptionsRequest(const ::com::sun::star::uno::Reference<::com::sun::star::task::XInteractionRequest>& Request);
static bool handlePackageReparationRequest(const css::uno::Reference<css::task::XInteractionRequest>& xRequest);
+ static bool handleLoadReadOnlyRequest(const css::uno::Reference<css::task::XInteractionRequest>& xRequest);
+
public:
void SetPassword(char const* pPassword);
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index c89e66b93c35..e4be8a713911 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -94,7 +94,6 @@ executeErrorDialog(
break;
}
-
switch (nButtonMask)
{
case MessageBoxStyle::NONE: