diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2013-11-25 19:39:20 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@collabora.com> | 2013-11-25 19:39:20 +0530 |
commit | 32f700a683b7faa17c58e6d1aad85915ebd40a1a (patch) | |
tree | d081391fbe7570ecc5436a8f81f7f0163bcd0475 /sd | |
parent | 20f9413f17d397c7b097809d8c168a0a78e6c084 (diff) |
fdo#68594: Adding unit test.
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/ppt/fdo68594.ppt | bin | 0 -> 100864 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 23 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sd/qa/unit/data/ppt/fdo68594.ppt b/sd/qa/unit/data/ppt/fdo68594.ppt Binary files differnew file mode 100644 index 000000000000..83a95cd4d8ef --- /dev/null +++ b/sd/qa/unit/data/ppt/fdo68594.ppt diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 23ddec36fcc5..bd65a309f4a9 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -15,6 +15,8 @@ #include <editeng/ulspitem.hxx> #include <editeng/fhgtitem.hxx> #include <editeng/escapementitem.hxx> +#include <editeng/colritem.hxx> +#include <rsc/rscsfx.hxx> #include <svx/svdotext.hxx> #include <animations/animationnodehelper.hxx> @@ -47,6 +49,7 @@ public: void testFdo64512(); void testFdo71075(); void testN828390(); + void testFdo68594(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testDocumentLayout); @@ -56,6 +59,7 @@ public: CPPUNIT_TEST(testFdo64512); CPPUNIT_TEST(testFdo71075); CPPUNIT_TEST(testN828390); + CPPUNIT_TEST(testFdo68594); CPPUNIT_TEST_SUITE_END(); }; @@ -240,6 +244,25 @@ void SdFiltersTest::testN778859() } } +void SdFiltersTest::testFdo68594() +{ + ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/ppt/fdo68594.ppt")); + 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)->TRG_GetMasterPage()); + CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL ); + SdrObject *pObj = pPage->GetObj(1); + SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj ); + CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL); + const SvxColorItem *pC = dynamic_cast<const SvxColorItem *>(&pTxtObj->GetMergedItem(EE_CHAR_COLOR)); + CPPUNIT_ASSERT_MESSAGE( "no color item", pC != NULL); + // Color should be black + CPPUNIT_ASSERT_MESSAGE( "Placeholder color mismatch", pC->GetValue().GetColor() == 0); +} + void SdFiltersTest::testFdo64512() { ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo64512.odp")); |