Kaydet (Commit) 3cc3dc17 authored tarafından Caolán McNamara's avatar Caolán McNamara

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 0af43608.

Change-Id: Iae355ed6099086fd3cc1c79203786017507d4ed4
üst 3a747453
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment