summaryrefslogtreecommitdiff
path: root/filter/qa/unit/textfilterdetect.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'filter/qa/unit/textfilterdetect.cxx')
-rw-r--r--filter/qa/unit/textfilterdetect.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/filter/qa/unit/textfilterdetect.cxx b/filter/qa/unit/textfilterdetect.cxx
index cc86fe04c3d5..3bd019aa0685 100644
--- a/filter/qa/unit/textfilterdetect.cxx
+++ b/filter/qa/unit/textfilterdetect.cxx
@@ -94,6 +94,26 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile)
// Without the accompanying fix in place, this test would have failed, as it was opened in
// Writer instead.
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument"));
+
+ getComponent()->dispose();
+
+ // Now also test ODT
+ aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "empty.odt";
+ getComponent() = loadFromDesktop(aURL);
+ xServiceInfo.set(getComponent(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo.is());
+ // Make sure it opens in Writer.
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextDocument"));
+ getComponent()->dispose();
+
+ // ... and ODP
+ aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "empty.odp";
+ getComponent() = loadFromDesktop(aURL);
+ xServiceInfo.set(getComponent(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo.is());
+ // Without the accompanying fix in place, this test would have failed, as it was opened in
+ // Writer instead.
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument"));
}
}