diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2013-12-12 13:19:36 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@collabora.com> | 2013-12-12 13:21:33 +0530 |
commit | 0b578e51cd1eabbbe375e25927df86fac7552641 (patch) | |
tree | 99c557ff242de8ba0daee2161cd48afb8d1eba97 /sd/qa | |
parent | de68d46d745f67e1f4e9e10dcbf1b534ec7aea39 (diff) |
n#828390: Add unit test for new line import.
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/pptx/n828390_2.pptx | bin | 0 -> 32749 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/n828390_2.pptx b/sd/qa/unit/data/pptx/n828390_2.pptx Binary files differnew file mode 100644 index 000000000000..e30948fd7354 --- /dev/null +++ b/sd/qa/unit/data/pptx/n828390_2.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 9b004038dc1c..f912d11a8ae1 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -49,6 +49,7 @@ public: void testFdo64512(); void testFdo71075(); void testN828390(); + void testN828390_2(); void testFdo68594(); CPPUNIT_TEST_SUITE(SdFiltersTest); @@ -59,6 +60,7 @@ public: CPPUNIT_TEST(testFdo64512); CPPUNIT_TEST(testFdo71075); CPPUNIT_TEST(testN828390); + CPPUNIT_TEST(testN828390_2); CPPUNIT_TEST(testFdo68594); CPPUNIT_TEST_SUITE_END(); @@ -227,6 +229,25 @@ void SdFiltersTest::testN828390() CPPUNIT_ASSERT_MESSAGE("Subscript not exported properly", bPassed); } +void SdFiltersTest::testN828390_2() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n828390_2.pptx") ); + CPPUNIT_ASSERT_MESSAGE( "failed to load", xDocShRef.Is() ); + 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 ); + + SdrObject *pObj = pPage->GetObj(0); + SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj ); + const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); + CPPUNIT_ASSERT(aEdit.GetText(0) == OUString("Linux ")); + CPPUNIT_ASSERT(aEdit.GetText(1) == OUString("Standard Platform")); +} + void SdFiltersTest::testN778859() { ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/n778859.pptx")); |