summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-10-09 18:46:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-10-09 22:13:18 +0200
commitdd009cffc38a280d3b072ae4dc9ee9cda2e1f13f (patch)
tree572790205a946d6f91c43695ac1f7dc4d100f28b /uui
parent4dade552c67a36f83cb419f90369722dc913d9fe (diff)
tdf#157650 Unhelpful error when XML in content.xml is malformed
regression from commit d9e322d60f65ff20631dab87baa5a2c7c71daaa2 replace ErrorInfo with simpler mechanism we need to tunnel the necessary information through the uui stuff, so add a new Exception class to do that. Change-Id: Ie1fde486e8637b802340795348a5e5aad6a54e96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl.cxx20
-rw-r--r--uui/source/iahndl.hxx2
2 files changed, 16 insertions, 6 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index bc6f12742b47..85c820bd3f1c 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -32,7 +32,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/script/ModuleSizeExceededRequest.hpp>
#include <com/sun/star/task/ErrorCodeIOException.hpp>
-#include <com/sun/star/task/ErrorCodeRequest.hpp>
+#include <com/sun/star/task/ErrorCodeRequest2.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/XInteractionAbort.hpp>
#include <com/sun/star/task/XInteractionApprove.hpp>
@@ -710,6 +710,17 @@ UUIInteractionHelper::handleRequest_impl(
return true;
}
+ task::ErrorCodeRequest2 aErrorCodeRequest2;
+ if (aAnyRequest >>= aErrorCodeRequest2)
+ {
+ handleGenericErrorRequest(
+ ErrCodeMsg(ErrCode(aErrorCodeRequest2.ErrCode), aErrorCodeRequest2.Arg1, aErrorCodeRequest2.Arg2, static_cast<DialogMask>(aErrorCodeRequest2.DialogMask)),
+ rRequest->getContinuations(),
+ bObtainErrorStringOnly,
+ bHasErrorString,
+ rErrorString);
+ return true;
+ }
task::ErrorCodeRequest aErrorCodeRequest;
if (aAnyRequest >>= aErrorCodeRequest)
{
@@ -1047,7 +1058,7 @@ UUIInteractionHelper::handleNameClashResolveRequest(
void
UUIInteractionHelper::handleGenericErrorRequest(
- ErrCode nErrorCode,
+ ErrCodeMsg nErrorCode,
uno::Sequence< uno::Reference<
task::XInteractionContinuation > > const & rContinuations,
bool bObtainErrorStringOnly,
@@ -1073,10 +1084,9 @@ UUIInteractionHelper::handleGenericErrorRequest(
// Note: It's important to convert the transported long to the
// required unsigned long value. Otherwise using as flag field
// can fail ...
- ErrCode nError(nErrorCode);
- bool bWarning = !nError.IgnoreWarning();
+ bool bWarning = !nErrorCode.IgnoreWarning();
- if ( nError == ERRCODE_SFX_INCOMPLETE_ENCRYPTION )
+ if ( nErrorCode == ERRCODE_SFX_INCOMPLETE_ENCRYPTION )
{
// the security warning box needs a special title
OUString aErrorString;
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index cf468f57dbcf..284fb685a902 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -190,7 +190,7 @@ private:
void
handleGenericErrorRequest(
- ErrCode nErrorCode,
+ ErrCodeMsg nErrorCode,
css::uno::Sequence<
css::uno::Reference< css::task::XInteractionContinuation > > const & rContinuations,
bool bObtainErrorStringOnly,