summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/core/filters-test.cxx7
-rw-r--r--sw/qa/core/filters-test2.cxx7
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx
index c39f4e48edf5..e3dbdafdaa07 100644
--- a/sw/qa/core/filters-test.cxx
+++ b/sw/qa/core/filters-test.cxx
@@ -42,6 +42,7 @@ public:
const OUString &rUserData, SfxFilterFlags nFilterFlags,
SotClipboardFormatId nClipboardID, unsigned int nFilterVersion) override;
virtual void setUp() override;
+ virtual void tearDown() override;
// Ensure CVEs remain unbroken
void testCVEs();
@@ -208,6 +209,12 @@ void SwFiltersTest::setUp()
CPPUNIT_ASSERT_MESSAGE("no writer component!", m_xWriterComponent.is());
}
+void SwFiltersTest::tearDown()
+{
+ uno::Reference<lang::XComponent>(m_xWriterComponent, uno::UNO_QUERY_THROW)->dispose();
+ m_xWriterComponent.clear();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwFiltersTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/core/filters-test2.cxx b/sw/qa/core/filters-test2.cxx
index 22fd9cfe525a..965645c3be57 100644
--- a/sw/qa/core/filters-test2.cxx
+++ b/sw/qa/core/filters-test2.cxx
@@ -38,6 +38,7 @@ public:
SfxFilterFlags nFilterFlags, SotClipboardFormatId nClipboardID,
unsigned int nFilterVersion) override;
virtual void setUp() override;
+ virtual void tearDown() override;
// Ensure CVEs remain unbroken
void testCVEs();
@@ -136,6 +137,12 @@ void SwFiltersTest2::setUp()
CPPUNIT_ASSERT_MESSAGE("no writer component!", m_xWriterComponent.is());
}
+void SwFiltersTest2::tearDown()
+{
+ uno::Reference<lang::XComponent>(m_xWriterComponent, uno::UNO_QUERY_THROW)->dispose();
+ m_xWriterComponent.clear();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwFiltersTest2);
CPPUNIT_PLUGIN_IMPLEMENT();