summaryrefslogtreecommitdiff
path: root/hwpfilter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-02-24 15:16:27 +0000
committerAndras Timar <andras.timar@collabora.com>2017-03-01 13:46:47 +0100
commit1460da4985fa9036ee298c4974da97d0e6f2b75a (patch)
tree312901f1f3cf613c869d0214fbb294c3100899a4 /hwpfilter
parent4aa87a5ebf1fb19b0dc24441305a833a2bdf3d8b (diff)
hwpfilter needs a new filter for each document
setUp is called just once at the start of the sequence of loads so we're reusing the previous import state which isn't what this filter expects This reverts commit 0af436083e12516eb9251d4cc6f594f80ed06d3d. Change-Id: Iae355ed6099086fd3cc1c79203786017507d4ed4 (cherry picked from commit 3cc3dc176e00062d8395d9f3d83b49ab24542a61) Reviewed-on: https://gerrit.libreoffice.org/34619 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit bc873190b708ae2f403be11f337fa0facaec557d)
Diffstat (limited to 'hwpfilter')
-rw-r--r--hwpfilter/qa/cppunit/data/fail/skipblock-1.hwpbin0 -> 10225 bytes
-rw-r--r--hwpfilter/qa/cppunit/test_hwpfilter.cxx16
2 files changed, 4 insertions, 12 deletions
diff --git a/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp
new file mode 100644
index 000000000000..8fd8e7abf9fc
--- /dev/null
+++ b/hwpfilter/qa/cppunit/data/fail/skipblock-1.hwp
Binary files differ
diff --git a/hwpfilter/qa/cppunit/test_hwpfilter.cxx b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
index f497d12ec3e6..040c98edb1b7 100644
--- a/hwpfilter/qa/cppunit/test_hwpfilter.cxx
+++ b/hwpfilter/qa/cppunit/test_hwpfilter.cxx
@@ -24,7 +24,6 @@ namespace
, public test::BootstrapFixture
{
public:
- virtual void setUp() override;
virtual bool load(const OUString &,
const OUString &rURL, const OUString &,
@@ -35,26 +34,19 @@ namespace
CPPUNIT_TEST_SUITE(HwpFilterTest);
CPPUNIT_TEST(test);
CPPUNIT_TEST_SUITE_END();
- private:
- uno::Reference<document::XFilter> m_xFilter;
};
- void HwpFilterTest::setUp()
- {
- test::BootstrapFixture::setUp();
-
- m_xFilter.set(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"),
- uno::UNO_QUERY_THROW);
- }
-
bool HwpFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
SfxFilterFlags, SotClipboardFormatId, unsigned int)
{
+ uno::Reference<document::XFilter> xFilter(m_xSFactory->createInstance("com.sun.comp.hwpimport.HwpImportFilter"),
+ uno::UNO_QUERY_THROW);
+
uno::Sequence< beans::PropertyValue > aDescriptor(1);
aDescriptor[0].Name = "URL";
aDescriptor[0].Value <<= rURL;
- return m_xFilter->filter(aDescriptor);
+ return xFilter->filter(aDescriptor);
}
void HwpFilterTest::test()