diff options
author | Muthu Subramanian <sumuthu@suse.com> | 2012-09-10 18:28:58 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@suse.com> | 2012-09-10 18:33:28 +0530 |
commit | 3a25a6503dea6dcbcca676f2d9ae741b8ed1696f (patch) | |
tree | 5cb473a7db2810e73b3cadb060adbfbbd3613445 /sd/qa | |
parent | 5b75c17f207d2156e17430ef3e31b5784804b9f7 (diff) |
n#778859: Add unit test case.
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/pptx/n778859.pptx | bin | 0 -> 32444 bytes | |||
-rw-r--r-- | sd/qa/unit/filters-test.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/n778859.pptx b/sd/qa/unit/data/pptx/n778859.pptx Binary files differnew file mode 100644 index 000000000000..034cfc5445b6 --- /dev/null +++ b/sd/qa/unit/data/pptx/n778859.pptx diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx index 2b474bc442c6..b5ae8032cc63 100644 --- a/sd/qa/unit/filters-test.cxx +++ b/sd/qa/unit/filters-test.cxx @@ -70,9 +70,11 @@ public: void test(); // Ensure CVEs remain unbroken void testCVEs(); + void testN778859(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(test); + CPPUNIT_TEST(testN778859); CPPUNIT_TEST(testCVEs); CPPUNIT_TEST_SUITE_END(); @@ -158,6 +160,24 @@ void SdFiltersTest::test() xDocShRef->DoClose(); } +void SdFiltersTest::testN778859() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/n778859.pptx")); + CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() ); + CPPUNIT_ASSERT_MESSAGE( "not in destruction", !xDocShRef->IsInDestruction() ); + + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + const SdrPage *pPage = pDoc->GetPage(1); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + { + // Get the object + SdrObject *pObj = pPage->GetObj(1); + SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj ); + CPPUNIT_ASSERT(!pTxtObj->IsAutoFit()); + } +} + bool SdFiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData) { |