diff options
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/Library_wpftqahelper.mk | 1 | ||||
-rw-r--r-- | writerperfect/qa/unit/WpftFilterTestBase.cxx | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/writerperfect/Library_wpftqahelper.mk b/writerperfect/Library_wpftqahelper.mk index 86aa03add564..59f4d05b504d 100644 --- a/writerperfect/Library_wpftqahelper.mk +++ b/writerperfect/Library_wpftqahelper.mk @@ -28,6 +28,7 @@ $(eval $(call gb_Library_use_libraries,wpftqahelper,\ cppu \ sal \ test \ + tl \ ucbhelper \ unotest \ )) diff --git a/writerperfect/qa/unit/WpftFilterTestBase.cxx b/writerperfect/qa/unit/WpftFilterTestBase.cxx index a0243349c990..dbb1ba27f7a0 100644 --- a/writerperfect/qa/unit/WpftFilterTestBase.cxx +++ b/writerperfect/qa/unit/WpftFilterTestBase.cxx @@ -11,6 +11,8 @@ #include <com/sun/star/document/XFilter.hpp> +#include <tools/urlobj.hxx> + #include "WpftLoader.hxx" namespace uno = com::sun::star::uno; @@ -31,6 +33,16 @@ WpftFilterTestBase::WpftFilterTestBase(const rtl::OUString &rFactoryURL) bool WpftFilterTestBase::load(const OUString &, const OUString &rURL, const OUString &, SfxFilterFlags, SotClipboardFormatId, unsigned int) { + + if (m_pOptionalMap) + { + // first check if this test file is supported by the used version of the library + const INetURLObject aUrl(rURL); + const WpftOptionalMap_t::const_iterator it(m_pOptionalMap->find(aUrl.getName())); + if ((it != m_pOptionalMap->end()) && !it->second) + return true; // skip the file + } + const WpftLoader aLoader(rURL, m_xFilter, m_aFactoryURL, m_xDesktop, m_xTypeMap, m_xContext); return aLoader.getDocument().is(); } |