filter/source/config/cache/typedetection.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit fc77f9a257a0d5f1755689aa8fd3561d82ffe67b Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Jun 14 19:03:30 2024 +0500 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jun 17 11:18:34 2024 +0200 tdf#161573: Do not show unrelated messages during broken ZIP detection Change-Id: Iab7f4bb492e24eb2ca6448f3540d219a18c15d79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168869 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit 278008f76835a128025b2a37ba8c9a7613284b6d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168883 Reviewed-by: Justin Luth <jl...@mail.com> (cherry picked from commit 0612048edb676d2c4f2e7dbefa0fcb464c25f016) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168884 diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 065fe483a3dd..66706a027259 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -926,6 +926,12 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& r { try { + // tdf#161573: do not interact with the user about possible unrelated failures (e.g., + // missing file). If needed, that will happen later, in the main detection phase. + auto aInteraction(rDescriptor.getValue(utl::MediaDescriptor::PROP_INTERACTIONHANDLER)); + rDescriptor.erase(utl::MediaDescriptor::PROP_INTERACTIONHANDLER); + comphelper::ScopeGuard interactionHelperGuard([&rDescriptor, &aInteraction] + { rDescriptor[utl::MediaDescriptor::PROP_INTERACTIONHANDLER] = aInteraction; }); impl_openStream(rDescriptor); if (auto xStream = rDescriptor.getUnpackedValueOrDefault( utl::MediaDescriptor::PROP_INPUTSTREAM, @@ -943,7 +949,7 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep( utl::MediaDescriptor& r if (isBrokenZIP(xStream, xContext)) { if (css::uno::Reference<css::task::XInteractionHandler> xInteraction{ - rDescriptor.getValue(utl::MediaDescriptor::PROP_INTERACTIONHANDLER), + aInteraction, css::uno::UNO_QUERY }) { INetURLObject aURL(rDescriptor.getUnpackedValueOrDefault(