diff options
author | David Tardon <dtardon@redhat.com> | 2017-01-11 17:24:59 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2017-01-11 17:35:35 +0100 |
commit | c2447d0b6aeffe0c76a549467036df573642a303 (patch) | |
tree | 590b0b8047d43af1d28dc179e7f7866030341f72 /writerperfect | |
parent | aa1ee198b5b55d0a92418eb3294c93553e8513dd (diff) |
honor lib version in import tests again
Change-Id: Idf99aab4bc136ac4a8a07945001e4f34a34a0e17
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(); } |