summaryrefslogtreecommitdiff
path: root/uui/source/iahndl.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-02-25 15:07:19 +0000
committerAndras Timar <andras.timar@collabora.com>2018-03-16 21:33:50 +0100
commit25e4b59b2e9805ebd3c38c40e5591125a05ed5b0 (patch)
treef8b27df1faf8cda23717a7686985e6bff279f824 /uui/source/iahndl.cxx
parent2937661f0e9381f84067a025f76e5554b8a1a457 (diff)
First cut at annotating 'exotic' filters.
The idea being that we can improve security by warning for these. Change-Id: I7d993417bfb6a8fe868bc3e07ccbcfe71bf285ff Reviewed-on: https://gerrit.libreoffice.org/50387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'uui/source/iahndl.cxx')
-rw-r--r--uui/source/iahndl.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 228ff20af632..6dbe7df63e76 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/configuration/backend/StratumCreationException.hpp>
#include <com/sun/star/container/XHierarchicalNameAccess.hpp>
#include <com/sun/star/document/BrokenPackageRequest.hpp>
+#include <com/sun/star/document/ExoticFileLoadException.hpp>
#include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
#include <com/sun/star/java/WrongJavaVersionException.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -434,6 +435,30 @@ UUIInteractionHelper::handleRequest_impl(
return true;
}
+ document::ExoticFileLoadException aExoticFileLoadException;
+ if (aAnyRequest >>= aExoticFileLoadException)
+ {
+ std::vector< OUString > aArguments;
+
+ if( !aExoticFileLoadException.URL.isEmpty() )
+ {
+ aArguments.push_back( aExoticFileLoadException.URL );
+ }
+ if( !aExoticFileLoadException.FilterUIName.isEmpty() )
+ {
+ aArguments.push_back( aExoticFileLoadException.FilterUIName );
+ }
+
+ handleErrorHandlerRequest( task::InteractionClassification_WARNING,
+ ERRCODE_UUI_IO_EXOTICFILEFORMAT,
+ aArguments,
+ rRequest->getContinuations(),
+ bObtainErrorStringOnly,
+ bHasErrorString,
+ rErrorString);
+ return true;
+ }
+
ucb::NameClashException aNCException;
if (aAnyRequest >>= aNCException)
{