From 48c9586e0797871e519d1cf68aa59bcc4ba02651 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 23 Oct 2012 14:50:24 +0200 Subject: RtfFilter::filter: not allowed to throw WrongFormatException: throw a WrappedTargetRuntimeException instead :( Change-Id: Iebf2b709beea738ba513ec5ce884874b76fbf243 --- writerfilter/qa/cppunittests/rtftok/testrtftok.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'writerfilter/qa') diff --git a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx index 7cdec4979f9d..e5e656c8d549 100644 --- a/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx +++ b/writerfilter/qa/cppunittests/rtftok/testrtftok.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -70,9 +71,14 @@ bool RtfTest::load(const OUString &, const OUString &rURL, const OUString &) { return m_xFilter->filter(aDescriptor); } - catch (const io::WrongFormatException&) + catch (const lang::WrappedTargetRuntimeException& rWrapped) { - return false; + io::WrongFormatException e; + if (rWrapped.TargetException >>= e) + { + return false; + } + throw; } } -- cgit